12.06.2011, 11:43
PHP код:
new Tick;
forward Tres(playerid);
forward Dois(playerid);
forward Um(playerid);
forward Congelar(playerid);
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/contar", true) == 0)
{
if(GetTickCount() - Tick < 5000) return SendClientMessage(playerid, -1, "Aguarde 5 segundo para usar este comando !");
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(IsPlayerInRangeOfPoint(i, 12.0, Pos[0], Pos[1], Pos[2]);
{
Tres(i);
SetTimerEx("Congelar", 4000, false, "i", i);
Tick = GetTickCount();
return 1;
}
}
}
else return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON.");
}
return 0;
}
public Tres(playerid)
{
SetTimerEx("Dois", 1000, false, "i", playerid);
GameTextForPlayer(playerid, "~r~3", 1000, 0);
return 1;
}
public Dois(playerid)
{
SetTimerEx("Um", 1000, false, "i", playerid);
GameTextForPlayer(playerid, "~b~2", 1000, 0);
return 1;
}
public Um(playerid)
{
GameTextForPlayer(playerid, "~g~1", 1000, 0);
return 1;
}
public Congelar(playerid)
{
TooglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~y~CONGELADO !", 1000, 0);
return 1;
}