Posts: 152
Threads: 40
Joined: Jan 2013
Reputation:
0
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?
Posts: 260
Threads: 4
Joined: Jun 2013
Reputation:
0
Use DestroyVehicle. That should do it.
Posts: 658
Threads: 32
Joined: Mar 2013
Reputation:
0
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.
Posts: 152
Threads: 40
Joined: Jan 2013
Reputation:
0
Just if im closing server with "X" then what callback is it? Ongamemodeexit?
Posts: 3,934
Threads: 353
Joined: Jan 2010
Reputation:
0
It will delete it anyway, closing the server will CLOSE the server, thus deleting pickups, map icons, vehicles.
Posts: 260
Threads: 4
Joined: Jun 2013
Reputation:
0
@ 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.