Vehicle and Control Structure bug.
#2

With
pawn Код:
if(GetPlayerVehicleID(playerid) == VMManana1 || VMManana2 || VMManana3 || VMManana4 || VMManana5 || VMManana6 || VMManana7 || VMManana8)
you are actually doing this check:
pawn Код:
if( GetPlayerVehicleID( playerid ) == VMManana1 || VMManana2 != 0 || VMManana3 != 0 || VMManana4 != 0 || VMManana5 != 0 || VMManana6 != 0 || VMManana7 != 0 || VMManana8 != 0 )
which is always 1 because vehicle IDs start from 1, and a check like 0 || VEHICLEID || VEHICLEID || VEHICLEID is always 1 because it's an OR.

what you actually want is this:
pawn Код:
if(GetPlayerVehicleID(playerid) == VMManana1 || GetPlayerVehicleID(playerid) == VMManana2 || GetPlayerVehicleID(playerid) == VMManana3 || GetPlayerVehicleID(playerid) == VMManana4 || GetPlayerVehicleID(playerid) == VMManana5 || GetPlayerVehicleID(playerid) == VMManana6 || GetPlayerVehicleID(playerid) == VMManana7 || GetPlayerVehicleID(playerid) == VMManana8)
Reply


Messages In This Thread
Vehicle and Control Structure bug. - by Sheperc - 13.12.2015, 19:22
Re: Vehicle and Control Structure bug. - by IstuntmanI - 13.12.2015, 19:58
Re: Vehicle and Control Structure bug. - by Sheperc - 13.12.2015, 20:38

Forum Jump:


Users browsing this thread: 2 Guest(s)