ALS hooking conflicts with game mode - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ALS hooking conflicts with game mode (
/showthread.php?tid=338972)
ALS hooking conflicts with game mode -
Hanger - 01.05.2012
Currently I have done my "Anti Vehicle Spawning" include - PnP compatible. Unfortinately it wont hook callbacks properly for me with no reason. Some of the Callbacks located in GameMode script does not execute, only include does instead. Gamemode compiles with no warnings.
Callbacks which I tested and does not execute, scripted in GM:
pawn Код:
OnVehicleSpawn
OnPlayerStateChange
The hooked natives seems to function properly.
Part of code from AVS include:
pawn Код:
public OnVehicleSpawn(vehicleid)
{
IsVehicleUsed{vehicleid} = false;
AllowReset{vehicleid} = true;
SpamCheck{vehicleid} = false;
GetVehiclePos(vehicleid, VehiclePosition[vehicleid][0], VehiclePosition[vehicleid][1],VehiclePosition[vehicleid][2]);
}
#if defined _ALS_OnVehicleSpawn
#undef OnVehicleSpawn
#else
#define _ALS_OnVehicleSpawn
#endif
#define OnVehicleSpawn avs_OnVehicleSpawn
forward avs_OnVehicleSpawn(vehicleid);
Edit:
Even lvdm gamemode provided by sa-mp servers package wont work properly - using 0.3eRC7-3