16.10.2013, 17:17
Quote:
Код:
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; } |
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;
}