07.07.2013, 01:24
I think I see what you mean.....
So now only one timer can run makes sense.
But again I still don't like the use of PVars you don't need them, at all when you can make a simplistic include that uses CallRemoteFunction() to make calls to the gamemode for filterscripts. Yes CallRemoteFunction() is slower than PVars but overall the trade off will favor using normal variables hands down when you take into account the bottleneck they cause littered all over the include.
I also don't see the need of setting a timer every time a player connects when one timer with a foreach() loop would make a lot more sense and save a small handful of calls.
One more thing for me if I decided to use this is I don't use OnPlayerDeath() at all so I'd have to make some modifications but that would be fine with me.
pawn Код:
if(!GetPVarType(playerid, "FP_PlayerDetectionTimer"))
{
SetPVarInt(playerid, "FP_PlayerDetectionTimer", SetTimerEx("FP_Detection", FP_TIMER_INTERVAL, true, "d", playerid));
}
But again I still don't like the use of PVars you don't need them, at all when you can make a simplistic include that uses CallRemoteFunction() to make calls to the gamemode for filterscripts. Yes CallRemoteFunction() is slower than PVars but overall the trade off will favor using normal variables hands down when you take into account the bottleneck they cause littered all over the include.
I also don't see the need of setting a timer every time a player connects when one timer with a foreach() loop would make a lot more sense and save a small handful of calls.
One more thing for me if I decided to use this is I don't use OnPlayerDeath() at all so I'd have to make some modifications but that would be fine with me.