Respawn all free trailers?
#7

Quote:
Originally Posted by Kaliber
View Post
PHP Code:
for(new ii<sizeof(TruckTrailer); i++) 
If TruckTrailer has size of 50 and there are 100 vehicles, half of them will be ignored.

https://sampwiki.blast.hk/wiki/OnTrailerUpdate

You can track when a trailer is attached/detached in this callback and store in in an array of MAX_VEHICLES. When you want to respawn trailers, you loop from 0 to sizeof(TruckTrailer)-1 and you check if the value of the array for the vehicleid is not attached and you respawn it.
Reply


Messages In This Thread
Respawn all free trailers? - by rOps - 23.01.2019, 10:59
Re: Respawn all free trailers? - by rOps - 23.01.2019, 11:12
Re: Respawn all free trailers? - by rOps - 23.01.2019, 12:23
Re: Respawn all free trailers? - by JaKe Elite - 23.01.2019, 14:30
Re: Respawn all free trailers? - by MEGADETHS - 24.01.2019, 04:05
Re: Respawn all free trailers? - by Kaliber - 24.01.2019, 07:26
Re: Respawn all free trailers? - by Calisthenics - 24.01.2019, 08:30
Re: Respawn all free trailers? - by Kaliber - 24.01.2019, 09:50
Re: Respawn all free trailers? - by MEGADETHS - 24.01.2019, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)