Need some help
#1

How can I destroy a vehicle if it is not used, if someone will get in to it and if will exit it a vehicle will destroy after 3 mins. there must be killtimer if the timer is running and someone will get into vehicle which has a timer with destroy option.

Plese help.

Thanks
Reply
#2

AddStaticVehicleEx
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
So for 3 Minutes you have to set 180 as respawn delay
Reply
#3

Well instead of the 'timer', why don't u use AddStaticVehiceEx ?
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx


You can use this function to add vehicles to your gamemode. This function can only create vehicles in the OnGameModeInit callback, and vehicles created with this function cannot be removed. Check CreateVehicle if you are interested in creating vehicles during game-runtime.
Reply
#4

i need to use createvehice because I am using it as vehicle spawner
so i can't use AddStaticVehicleEx because it respawns vehicle and doesn't delete it
Reply
#5

I would suggest you create a variable which is set to 1 OnPLayerExitVehicle. Create a timer OnGameModeInIt and within the timers public check the variables status 0 or 1. If 1 destroy the vehicle and reset the variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)