From aad10948b94c11f216babd55d864d49a0bb9ae88 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 26 Jun 2016 16:30:19 +0300 Subject: [PATCH] Emit the ScriptLoaded event before importing server entities to allow the scripts to prepare. --- source/Core.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Core.cpp b/source/Core.cpp index 02b882e8..62f6f8bb 100644 --- a/source/Core.cpp +++ b/source/Core.cpp @@ -385,6 +385,9 @@ bool Core::Execute() LogScs("Successfully executed script: %s", s.mPath.c_str()); } + // Notify the script callback that the scripts were loaded + EmitScriptLoaded(); + // Import already existing entities ImportPlayers(); ImportBlips(); @@ -394,9 +397,6 @@ bool Core::Execute() ImportPickups(); ImportVehicles(); - // Notify the script callback that the scripts were loaded - EmitScriptLoaded(); - // Successfully executed return (m_Executed = true); }