IsValidVehicle And INVALID_VEHICLE_ID
#1

Hi,

What difference if i check isvalidvehicle or if( vehicleid != INVALID_VEHICLE_ID )
Reply
#2

Nothing, they both return the same thing pretty much.
Reply
#3

It depends. If you do something like this:
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
vehicleid will be either 0 (not in vehicle) or the vehicle ID so IsValidVehicle would check whether the vehicle exists or not and the check about INVALID_VEHICLE_ID would fail.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)