getall
#1

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.


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;
}
Reply
#2

Anyone help please ?!
Reply
#3

Show your CountDown public Func...
Reply
#4

Quote:
Originally Posted by danish007
View Post
Show your CountDown public Func...
Code:
forward CountDown();
public CountDown()
{
     CountDownVar--;
     new str[128];

     format(str, sizeof(str), "~y~%d", CountDownVar);
     GameTextForAll(str, 1500, 3);
     SoundForAll(1056);

	 if(CountDownVar == 0)
	 {
        KillTimer(CountDownTimer);
        SoundForAll(1057);
        GameTextForAll("~g~~h~~h~GO!", 2000, 3);
        CountDownVar = 0;
        for (new i = 0; i<MAX_PLAYERS; i++)
    	{
    	    if(IsAod[i] == 1) continue;
        	if(IsPlayerConnected(i))
        	{
        	TogglePlayerControllable(i, true);
			}
		}
	 }

     return 1;
}
Reply
#5

Help fast
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)