Turning off serv - 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: Turning off serv (
/showthread.php?tid=452974)
Turning off serv -
edzis84 - 23.07.2013
Hello, i have problem like if player has spawned vehicle and i close server then car despawns but in player stats it is still spawned, how can i make that when i close server it automaticly removes spawned veh from player?
Is it under ongamemodeexit?
Re: Turning off serv -
NaClchemistryK - 23.07.2013
Use DestroyVehicle. That should do it.
Re: Turning off serv -
JimmyCh - 23.07.2013
If you mean when they disconnect, you should put it under OnPlayerDisconnect.
But if you want it to remove the vehicle when you shut down the server, it's OnGameModeExit.
Re: Turning off serv -
edzis84 - 23.07.2013
Just if im closing server with "X" then what callback is it? Ongamemodeexit?
Re: Turning off serv -
Luis- - 23.07.2013
It will delete it anyway, closing the server will CLOSE the server, thus deleting pickups, map icons,
vehicles.
Re: Turning off serv -
NaClchemistryK - 23.07.2013
@ Luis,
as far as I have understood, that is exactly the problem.
In his Server, the car stays spawned FOR A CERTAIN PLAYER.
On Topic:
I would say that Jimmy is right. put DestroyVehicle under OnGameModeExit.
Re: Turning off serv -
edzis84 - 23.07.2013
Nevermind