14.12.2014, 23:48
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;
}