[FilterScript] Prevent AFK Drivers Bug
#10

Quote:
Originally Posted by Nanory
Посмотреть сообщение
What is with vehicleid 0 ?

if (vehicleid>0) {
should be:
if(vehicleid != INVALID_VEHICLE_ID)
That won't work because INVALID_VEHICLE_ID is 0xFFFF. However GetPlayerVehicleID returns 0 if the player is not inside a vehicle. So if you were to check if the result is INVALID_VEHICLE_ID you'd always loop through the players even if they are not in a vehicle.

EDIT:

What you however could have mentioned is that if the state of the player is "PLAYER_STATE_DRIVER" he MUST be inside of a vehicle so how could it return 0?
Reply


Messages In This Thread
Prevent AFK Drivers Bug - by Grimrandomer - 14.06.2012, 08:17
AW: Prevent AFK Drivers Bug - by Nanory - 14.06.2012, 12:33
Re: Prevent AFK Drivers Bug - by Master_Gangster - 14.06.2012, 15:39
Re: Prevent AFK Drivers Bug - by Littlehelper - 14.06.2012, 15:54
Re: Prevent AFK Drivers Bug - by Faisal_khan - 14.06.2012, 16:08
Re: Prevent AFK Drivers Bug - by Niko_boy - 14.06.2012, 17:35
Re: Prevent AFK Drivers Bug - by Master_Gangster - 14.06.2012, 18:03
Re: Prevent AFK Drivers Bug - by RedWingz - 14.06.2012, 18:39
Respuesta: AW: Prevent AFK Drivers Bug - by [DOG]irinel1996 - 14.06.2012, 19:47
AW: Prevent AFK Drivers Bug - by Extremo - 14.06.2012, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)