DestroyVehicle question - 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: DestroyVehicle question (
/showthread.php?tid=620182)
DestroyVehicle question -
NeXoR - 27.10.2016
Hey guys, if I am saving a vehicleid in an array
Example:
Код:
Veh[i] = CreateVehicle bla bla bla
And I do this:
Код:
DestroyVehicle(Veh[i])
Would that turn the Array value to 0 aswell ?
I mean would it make Veh[i] = 0; after the vehicle destroy ?
Re: DestroyVehicle question -
Threshold - 27.10.2016
No? Why would it possibly do that? Unless you've hooked the function to reset the variable yourself..
If I do 'DestroyVehicle(1002)' to destroy vehicle ID 1002, does that mean 1002 = 0? Don't think so.
Re: DestroyVehicle question -
NeXoR - 27.10.2016
Thanks
Re: DestroyVehicle question -
Dignity - 27.10.2016
Quote:
Originally Posted by NeXoR
Thanks
|
You can just DestroyVehicle and set the array value to 0 below it.
You can then use something like this to find the slot you just emptied:
https://sampwiki.blast.hk/wiki/Advanced..._slot_properly
Re: DestroyVehicle question -
NeXoR - 27.10.2016
Quote:
Originally Posted by Satori_Komeiji
|
Learned something new, thanks.