how to delete every vehicle that isnt in the ongamemodeinit, and when nobody is driving it
#1

hey everyone,

i already checked ****** for this abit and samp forum, but couldnt really find one for my problem.

how can i make it that when doing /deleteallvehs or /deleteallcars, it will delete EVERY SINGLE car that isnt loaded in Ongamemodeinit and when NOBODY is driving it, meaning its just a car that is once spawned by someone and then left behind, also is this possible in a timer, which works every 30 mins or 60 mins?

greets niels
Reply
#2

Well.. When the player/admin spawns the car, make a variable such as admcar = blah and it spawns then when you /despawnvehs, it detects if it's a admcar and if it is it deletes it.
Reply
#3

ye but, when i use /car infernus, and it spawns it, then admcar is that car, but then when someone else does. that one is too, but when someone is driving it, then it will also delete right?
Reply
#4

Yes but you need to alter the code so it's like if player state is driver then return 0; else continue to code.
Reply
#5

hmm i still dont really understand you...
Reply
#6

pawn Код:
for(new v=0;v<MAX_VEHICLES;v++) if(!IsVehicleOccupied(v)) EraseVeh(v);
Reply
#7

this aint working, all it does it removing me from my vehicle, nothing more
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)