21.05.2017, 19:06
PHP код:
CMD:mute(playerid, params[])
{
if(Spawned[playerid] == 0) return SendClientMessage(playerid, 0xf8f8f8fff,"ERROR: {F00f00}You can't use this command while you are not spawned!");
new ID,string[128],name[MAX_PLAYER_NAME],tname[MAX_PLAYER_NAME],reason[64];
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(params,"us[64]",ID,reason)) return SCM(playerid, -1,"Syntax: {FFFFFF}/mute <id> <reason>");
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {FFFFFF}You aren't authorized to use this command!");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xf8f8f8fff,"ERROR: {FFFFFF}Player is not connected");
GetPlayerName(ID, tname,sizeof(tname));
format(string, sizeof(string),"%s was muted by an administrator Reason: %s",tname,reason);
SCMTA(-1,string);
PlayerInfo[ID][pMute] = 1;
return 1;
}

