Vehicle IDs - 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: Vehicle IDs (
/showthread.php?tid=305977)
Vehicle IDs -
Tee - 24.12.2011
Well I'm just curious. Does it make sense to set a vehicleid to 0 when the vehicle gets destroyed?
Example:
pawn Код:
for(new i=0; i<8; i++)
{
DestroyVehicle(OrgInfo[orgid][Vehicle][i]);
OrgInfo[orgid][Vehicle][i] = 0;
}
Re: Vehicle IDs -
vassilis - 24.12.2011
actually yes.. i think yes because when you destroy it it's actually dissapeared so it's actually vehicleid 0 dunno prbbly yes
Re: Vehicle IDs -
Tee - 24.12.2011
Well okay, anyone else has the same opinion?
Re: Vehicle IDs -
Mosslah - 24.12.2011
I don't think there's anything wrong with it, but if a car is destroyed accidently and you want it back - then leaving it with the original ID may help to bring it back to you (if you have the command for it, that is
)
But yeah, it's your choice - I guess!
Re: Vehicle IDs -
Dark_Kostas - 24.12.2011
That's ok because normal IDs start from 1 and over. So this won't cause any bugs and you will be able to use it like "YourVehicle == 0" to know if it's alive.