unspawned vehicle in game after offline.
#1

I wonder, how can I make unspawned vehicle for offline-player? Because when they're offline, the vehicle is still available in game.
Reply
#2

When they leave the server: DestroyVehicle.
When they join the server: CreateVehicle.
To destroy the vehicle, you will need to store the vehicleID somewhere.
Reply
#3

I mean, I don't want to use any command to destroy the vehicle
Since it's RP server, I want the server automatically unspawn the vehicle..
Reply
#4

Yeah exactly. So it'll be for example

PHP код:
public OnPlayerConnect(playerid)
{
    if(
PlayerInfo[playerid][VehicleOwned] == 1)
    {
          
CreateVehicle.....etc
    
}
    return 
1;
}

OnPlayerDisconnect(playeridreason)
{
    if(
PlayerInfo[playerid][VehicleOwned] == 1)
    {
          
DestoryVehicle.....etc
    
}
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)