28.02.2017, 12:15
Quote:
Hey, that looks really clean and seemed like it fixed my issues. Care to explain what you changed?
![]() |
Код:
CMD:mute(playerid,params[]) { new targetid,string[128]; if(Muted[playerid] == 0) // this mute check should be under sscanf and you are checking if you are muted yourself instead of the target player. { if(PlayerInfo[playerid][pAdmin] >1) // I check if player admin level is 0, what you did here is also correct. { if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, -1, "Syntax - /mute [playerid]"); { Muted[playerid] = 1; // same here, instead of muting the targetid - you mute yourself. format(string,sizeof(string), "%s has been muted by an administrator.",targetid); // you are quoting the targetid, not targetname. To get targetname, you need to create a different variable for that and use GetPlayerName. SendClientMessageToAll(-1, string); } } } return 1; }