SA-MP Forums Archive
How to stop this - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to stop this (/showthread.php?tid=275774)



How to stop this - Rabbayazza - 11.08.2011

When I exit a car, it disappears and respawns back at its spawn


Re: How to stop this - Kingunit - 11.08.2011

Check this function

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{

}



Re: How to stop this - Rabbayazza - 11.08.2011

What do I do with it? Just put it in?


Re: How to stop this - Kingunit - 11.08.2011

Drop it here


Re: How to stop this - Rabbayazza - 11.08.2011

It's not there, it's only there if I copy and paste it in.


Re: How to stop this - JaTochNietDan - 11.08.2011

Quote:
Originally Posted by Rabbayazza
Посмотреть сообщение
When I exit a car, it disappears and respawns back at its spawn
Check the respawn_delay set in your CreateVehicle/AddStaticVehicleEx functions, it might be set very low, read more about that function here:

https://sampwiki.blast.hk/wiki/CreateVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx


AW: How to stop this - Blokkmonsta - 11.08.2011

I have the same problem.
Is there a way to turn the respawn delay off?
"-1" and "0" doesnґt work.


Re: How to stop this - Jay. - 11.08.2011

(modelid, Floatpawn_x, Floatpawn_y, Floatpawn_z, Float:angle, color1, color2)

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

Is basically AddStaticVehicleEx without the respawn_delay.
Try it.


Re: How to stop this - MadeMan - 11.08.2011

Vehicle created with AddStaticVehicle respawns in about 5 minutes.

Use AddStaticVehicleEx or CreateVehicle and set the respawn_delay higher, like 3600 (1 hour).


AW: Re: How to stop this - Blokkmonsta - 11.08.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Vehicle created with AddStaticVehicle respawns in about 5 minutes.

Use AddStaticVehicleEx or CreateVehicle and set the respawn_delay higher, like 3600 (1 hour).
but i want that the vehicles NEVER respawn


Re: How to stop this - Tautwis - 11.08.2011

He already explained to you what to do. Change the vehicle respawn delay to 0. This will make, that the car will never respawn, exept when you repsawn it with a command...


Re: How to stop this - JaTochNietDan - 11.08.2011

Quote:
Originally Posted by Tautwis
Посмотреть сообщение
He already explained to you what to do. Change the vehicle respawn delay to 0. This will make, that the car will never respawn, exept when you repsawn it with a command...
Actually that's what will cause the problem, changing it to 0 will make it instantly re-spawn as soon as you exit it. You need to change it to -1 if you don't want it to ever re-spawn because of inactivity.

Now if you want it so that they will never respawn, then you need to work with the OnVehicleSpawn callback, you can read more about that callback here:

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