Help with freezeall command
#3

Quote:
Originally Posted by xdarren
Посмотреть сообщение
Код:
COMMAND:freezeall(playerid, params[])
{
    if(PlayerInfo[playerid][power] < 4) return SendClientError(playerid, CANT_USE_CMD);
    PlayerLoop(i)
    {
        SendClientMSG(i, COLOR_YELLOW, "[Admin] All players have been frozen by Admin %s", RPName(playerid));
        frozen[i] = 1;
        TogglePlayerControllable(i, false);
	}
	return 1;
}
COMMAND:unfreezeall(playerid, params[])
{
    if(PlayerInfo[playerid][power] < 4) return SendClientError(playerid, CANT_USE_CMD);
    PlayerLoop(i)
    {
        SendClientMSG(i, COLOR_YELLOW, "[Admin] All players have been un-frozen by Admin %s", RPName(playerid));
        frozen[i] = 0;
        TogglePlayerControllable(i, true);
		SetPVarInt(i, "Tied", 0);
	}
	return 1;
}
There you go +rep if it helped
your code is very different from his code.

Try these
pawn Код:
dcmd_adfreezeall(playerid,params[])
{
    new
        string[ 128 ],
        ID,
        cmdreason[ 100 ]
    ;

    for(new i = 0; i < MAX_PLAYERS; i++) IsFrozen[i] =1, TogglePlayerControllable(i,0);


    format(string,sizeof(string),"[ADMIN] %s(%d) has frozen all the players for reason: %s.",PlayerName(playerid),playerid,PlayerName(ID), cmdreason);
    SendClientMessageToAll(COLOR_ADMIN,string);

    format(string,sizeof(string),"9[ADMIN] Administrator has frozen %s(%d) for reason: %s.",PlayerName(ID),ID,cmdreason);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
    return 1;
}
Reply


Messages In This Thread
Help with freezeall command - by SFA7X - 16.10.2013, 17:12
Re: Help with freezeall command - by xdarren - 16.10.2013, 17:14
Re: Help with freezeall command - by Patrick - 16.10.2013, 17:17

Forum Jump:


Users browsing this thread: 4 Guest(s)