Prevent player from exiting vehicle
#2

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if (newkeys & KEY_SECONDARY_ATTACK)
        {
            TogglePlayerControllable(playerid, 0);
            SetTimerEx("Putbackin", 500, 0, "d", playerid);
        }
    }
    return 1;
}

forward Putbackin(playerid);
public Putbackin(playerid)
{
    TogglePlayerControllable(playerid, 1);
    SetTimerEx("Putbackin2", 400, 0, "d", playerid);
    return 1;
}

forward Putbackin2(playerid);
public Putbackin2(playerid)
{
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("Putbackin3", 500, 0, "d", playerid);
    return 1;
}

forward Putbackin3(playerid);
public Putbackin3(playerid)
{
    TogglePlayerControllable(playerid, 0);
    SetTimerEx("Putbackin4", 500, 0, "d", playerid);
    return 1;
}

forward Putbackin4(playerid);
public Putbackin4(playerid)
{
    TogglePlayerControllable(playerid, 1);
    return 1;
}
Reply


Messages In This Thread
[SOLVED] Prevent player from exiting vehicle - by pcp - 14.12.2014, 21:57
Re: Prevent player from exiting vehicle - by Write - 14.12.2014, 23:48
Re: Prevent player from exiting vehicle - by pcp - 15.12.2014, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)