Posts: 241
Threads: 53
Joined: Jan 2008
Reputation:
0
I want to create a timer for 1 second that will check if the player is driving a vehicle ID 100 for example, if he does and he's not member of ID 3 he will be removed from the vehicle. I know how to do that, but I don't know about actually making it, I mean will it cause lag? I usually play with 130 players.
Posts: 1,781
Threads: 13
Joined: Sep 2009
Reputation:
0
if the vehicles amount to be checked is small enough, it could be done with a timer. there is no need to loop rhrough all players tho, but i agree at avoiding timers whereever possible.
you could use the OnPlayerStateChange() callback and check if a player enters a certain VehicleModelID and trigger the (custom) eject-player routine. this could be possible w/o loops and w/o cycling through maybe 20 (forbidden) vehicles by setting a gVariableForbiddenForACertainTeam[212]=1; - if its set, then simply eject that player...