repsawn car
#6

actually, iGetty's code great but it has a little mistake, atfer 10 min it will destroy every other vehicles which has a driver.. xD

make a little changes

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        SetTimerEx("QuitDestroy", 600000, false, "i", GetPlayerVehicleID(playerid));
    }
    return 1;
}
I'm not sure this code works or not, i couldn't test it, let's have a try
pawn Код:
forward QuitDestroy(vehicleid);
public QuitDestroy(vehicleid)
{
    new Inveh = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) {continue;}
        if(!IsPlayerInAnyVehicle(i)) {continue;}
        if(GetPlayerVehicleID(i) == vehicleid)
        {
                Inveh = 1;
        }
    }
    if(Inveh == 0) SetVehicleToRespawn(vehicleid);
}
Reply


Messages In This Thread
repsawn car - by pelani - 02.02.2013, 10:54
Re: repsawn car - by iGetty - 02.02.2013, 12:16
Re: repsawn car - by Jewell - 02.02.2013, 12:20
Re: repsawn car - by pelani - 02.02.2013, 12:36
Re: repsawn car - by pelani - 02.02.2013, 12:40
Re: repsawn car - by Jewell - 02.02.2013, 13:04
Re: repsawn car - by pelani - 02.02.2013, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)