IsValidVehicle And INVALID_VEHICLE_ID - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IsValidVehicle And INVALID_VEHICLE_ID (
/showthread.php?tid=572840)
IsValidVehicle And INVALID_VEHICLE_ID -
Banditukas - 02.05.2015
Hi,
What difference if i check isvalidvehicle or if( vehicleid != INVALID_VEHICLE_ID )
Re: IsValidVehicle And INVALID_VEHICLE_ID -
Luis- - 02.05.2015
Nothing, they both return the same thing pretty much.
Re: IsValidVehicle And INVALID_VEHICLE_ID -
Konstantinos - 02.05.2015
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.