1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update Events.inc

This commit is contained in:
Sandu Liviu Catalin 2022-03-16 17:02:11 +02:00
parent 8dc0ca18f5
commit 11fb1fa25c

View File

@ -392,7 +392,8 @@ void Core::EmitPlayerRequestSpawn(int32_t player_id)
#ifdef VCMP_ENABLE_OFFICIAL
if (IsOfficial())
{
ExecuteLegacyEvent(m_VM, _SC("onPlayerRequestSpawn"), _player.mLgObj);
LightObj r = EvaluateLegacyEvent(m_VM, _SC("onPlayerRequestSpawn"), _player.mLgObj);
SetState(r.IsNull() ? 1 : r.Cast< int32_t >());
}
#endif
}