12.08.2011, 14:28
Код:
public OnPlayerEnterCheckpoint(playerid) { //-------------courier-------------- { SetTimer("freeze", 3000, false); new freeze = TogglePlayerControllable(playerid, 0); freeze(playerid);
Thanks, bigal
public OnPlayerEnterCheckpoint(playerid) { //-------------courier-------------- { SetTimer("freeze", 3000, false); new freeze = TogglePlayerControllable(playerid, 0); freeze(playerid);
public UnfreezePlayer(playerid)
{
TogglePlayerControllable(playerid, 1);
}
TogglePlayerControllable(playerid, 0);
SetTimerEx("UnfreezePlayer", 3000, false, "d", playerid);
forward freeze(playerid)
public freeze(playerid)
{
TogglePlayerControllable(playerid, 0);
return 1;
}
function FreezePlayer(playerid, time)
{
new string[16];
if(time > 0)
{
TogglePlayerControllable(playerid, false);
SetTimerEx("FreezePlayer", 1000, 0, "ii", playerid, time-1);
}
else
{
TogglePlayerControllable(playerid, true);
}
return true;
}
FreezePlayer(playerid, Your_time);