23.12.2013, 20:43
Well I have made /unmute command, syntax is:
/unmute [playerid] [reason]
But how to make reason' param optional, so if player type /unmute 7
It will send message to playerid 7 'Admin xx have unmuted you !'
And if player type /unmute 7 do not repeat it.
Gonna send message 'Admin xx have unmuted you, reason: do not repait it.'
My unmute command:
/unmute [playerid] [reason]
But how to make reason' param optional, so if player type /unmute 7
It will send message to playerid 7 'Admin xx have unmuted you !'
And if player type /unmute 7 do not repeat it.
Gonna send message 'Admin xx have unmuted you, reason: do not repait it.'
My unmute command:
pawn Код:
YCMD:unmute(playerid, params[], help)
{
#pragma unused help
if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 1)
return SCM(playerid,-1,"Admins and Helpers only!");
new player, reason[128];
if(sscanf(params, "us[128]", player, reason))
return SCM(playerid, -1, "Syntax: /unmute [playerid/PartOfName] [reason]");
else if(player== INVALID_PLAYER_ID)
return SCM(playerid, -1, "* Wrong ID!");
else if(!Logged[player])
return SCM(playerid, -1, " Player not logged in yet !");
else if(!PlayerInfo[player][pMuted])
return SCM(playerid, -1, " *Player not muted !");
PlayerInfo[player][pMuted] = 0;
new string[128];
format(string, sizeof(string), " Admin %s have unmuted you. Reason: %s", RPname(playerid), reason);
SCM(player, DARKGREEN, string);
format(string, sizeof(string), " *Player %s is not muted anymore ! ", RPname(player));
SCM(playerid, YELLOW, string);
return 1;
}