Destroycars
#1

How to destroycars With Type "CreateVehicleEx" When the player exit from vehicle "Iv many cars spawned in server",
I tried this code
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("delcar", 15000, 0, "i", vehicleid);
return 1;
}

forward delcar(vehicleid);
public delcar(vehicleid)
{
SetVehicleToRespawn(vehicleid);
return 1;
}
but its destroy the car even if u r in vehicle or press CTRL while you are in vehicle!
Reply
#2

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER)
    {
         SetTimerEx("delcar", 15000, 0, "i", vehicleid);
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by newbie scripter
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER)
    {
         SetTimerEx("delcar", 15000, 0, "i", vehicleid);
    }
    return 1;
}
Thanks can i do like that:-
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER)
    {
         SetTimerEx("delcar", 15000, 0, "i", vehicleid);
    }
    return 1;
}
forward delcar(vehicleid);
public delcar(vehicleid)
{
DestroyVehicle(vehicleid);
return 1;
}
Reply
#4

yes you can
Reply
#5

When i exit from vehicle and enter another vehicle the old one not destroyed and the new one destroy! Error.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)