OnPlayerExitVehicle(thevhicule, destroys no matter what)
#9

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Set this timer to the player variable and kill it when player entered his vehicle again (OnPlayerStateChange)
why?? he's doing it correctly!

@op, say ahh:

pawn Код:
new timer[MAX_PLAYERS];

forward _DestroyVehicle(vehicleid);

public _DestroyVehicle(vehicleid)
{
    DestroyVehicle(vehicleid);
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    KillTimer(timer[playerid]);
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    timer[playerid] = SetTimerEx("_DestroyVehicle", 5000, false, "i", vehicleid);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)