08.01.2015, 13:47
Guys.
This command bring all players, But something wrong with the countdown.
If you fix it, Add to freeze the players when i use /getall and unfreeze them when the countdown finishes.
This command bring all players, But something wrong with the countdown.
If you fix it, Add to freeze the players when i use /getall and unfreeze them when the countdown finishes.
Code:
dcmd_getall(playerid, params[])
{
if(AdminLevel[playerid] < 4)return SendClientMessage(playerid,-1,"{AFAFAF}[Error]:{FFFFFF} You do not have the right admin level to use this command.");
new string[128], time;
if(sscanf(params,"d",time))
{
SendClientMessage(playerid, -1, ""COL_USAGE"[SYNTAX]{FFFFFF} /getall [TIME]");
return 1;
}
KillTimer(CountDownTimer);
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
foreach(Player, i)
{
if(i != playerid)
if(IsSpawned[i] == 1)
if(at[i] == 1)
SetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
SetPlayerArmour(i, 0);
SetPlayerHealth(i, 100);
SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(i, GetPlayerInterior(playerid));
}
CountDownVar = time + 1;
CountDownTimer = SetTimer("CountDown", 1000, true);
format(string,sizeof(string),"%s(%d) has circled all.", PlayerName(playerid),playerid);
SendALogMessage(string);
return 1;
}


