DestroyVehicle question
#1

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 ?
Reply
#2

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.
Reply
#3

Thanks
Reply
#4

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
Reply
#5

Quote:
Originally Posted by Satori_Komeiji
Посмотреть сообщение
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
Learned something new, thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)