How to stop this
#1

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

Check this function

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

}
Reply
#3

What do I do with it? Just put it in?
Reply
#4

Drop it here
Reply
#5

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

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

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

(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.
Reply
#9

Vehicle created with AddStaticVehicle respawns in about 5 minutes.

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)