В конец мода:
Freeze(playerid,sec)
{
SetPVarInt(playerid,"freeze",1);
SetPVarInt(playerid,"freeze_sec",gettime()+sec);
TogglePlayerControllable(playerid,0);
}
В секундный таймер:
if(GetPVarInt(playerid,"freeze"))
{
if(GetPVarInt(playerid,"freeze_sec") <= gettime())
{
DPVR(playerid,"freeze");
DPVR(playerid,"freeze_sec");
TogglePlayerControllable(playerid,1);
}
}
Пример использования:
Код:
Freeze(playerid,10);//Заморозить игрока playerid на 10 секунд