25.11.2015, 12:27
An example of my unmute command should give you hints.
Код:
CMD:unmute(playerid, params[]) { if(pData[playerid][Admin] >= 3) { new id, str[128]; if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_CMY,"Usage: /mute <playerid>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CMY,"target is not connected"); if(pMuted[id] == false) return SendClientMessage(playerid, COLOR_RED,"Player is not muted "); pMuted[id] = false; format(str, sizeof(str),"Admin %s (ID:%d) has unmuted %s (ID:%d)",GetName(playerid), playerid, GetName(id), id); SendClientMessageToAll(COLOR_RED, str); } return 1; }