SA-MP Forums Archive
Vehicle despawns after afking for longer in it. - 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)
+--- Thread: Vehicle despawns after afking for longer in it. (/showthread.php?tid=510201)



Vehicle despawns after afking for longer in it. - [WSF]ThA_Devil - 30.04.2014

I've never had this problem, but now, it appeared.
The way vehicle is created:

There are no errors what so ever, but it makes it despawn after a while in afk.

pawn Код:
CreateVehicle(vid, X+5,Y,Z, 0, -1, -1, -1);
I have only 2 instances in script that would delete vehicle:
1. command,
2. Minute timer, and when the server time is **:00 ( Each hour )

so I doubt they're messing with it.


Re: Vehicle despawns after afking for longer in it. - Galletziz - 30.04.2014

Why you set the respawn delay at -1 ?

pawn Код:
CreateVehicle(vid, X+5,Y,Z, 0, -1, -1, 600000);
This respawn your vehicle after 10 min, in all cases.


Re: Vehicle despawns after afking for longer in it. - [WSF]ThA_Devil - 30.04.2014

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
Why you set the respawn delay at -1 ?

pawn Код:
CreateVehicle(vid, X+5,Y,Z, 0, -1, -1, 600000);
This respawn your vehicle after 10 min, in all cases.
-1 is told to not respawn at all, 10 minutes is as unacceptable as respawning in 2 minutes.
It does not work for me.

respawn_delay The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning.
copied from sa-mp wiki


Re: Vehicle despawns after afking for longer in it. - Galletziz - 30.04.2014

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
-1 is told to not respawn at all, 10 minutes is as unacceptable as respawning in 2 minutes.
It does not work for me.
ah sorry, i don't have understand what you mean, anyway, i have make an example with 10 minutes.. sure -1 don't respawn the vehicle i know.


Re: Vehicle despawns after afking for longer in it. - [WSF]ThA_Devil - 30.04.2014

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
ah sorry, i don't have understand what you mean, anyway, i have make an example with 10 minutes.. sure -1 don't respawn the vehicle i know.
Vehicle does respawn, when player goes alt + tab for like 2 minutes and comes back.
I don't really know why. Because respawn is set to -1.