06.01.2012, 17:23
Well i want if player is near the admin that uses /countdown, it freeze people around him (i test it and froze everyone in the server)
pawn Код:
CMD:countdown(playerid,params[])
{
if(PlayerData[playerid][AdminLevel] < 2) return 0;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerName(playerid,Nam,sizeof(Nam));
format(str,sizeof(str),"%s has started a countdown",Nam);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,5,X,Y,Z))
{
TogglePlayerControllable(i,0);
SetTimer("countdown3",1000,0);
GameTextForAll("~g~3",1000,3);
SendClientMessage(i,COLOR_YELLOW,str);
}
}
return 1;
}