10.02.2009, 00:14
Well this is not exactly what you want but will work for an id. As I was looking at your code I noticed you want to do a id/name command. Im not sure as to how it would be done exactly. Maybe you can figure it out. Or maybe just do yourself a seperate command that will give you the id from the name then with the id do the /mute [id] [reason].
Hope it helps. [edit] Removed the ! from if(!strlen(reason))
Hope it helps. [edit] Removed the ! from if(!strlen(reason))
pawn Код:
dcmd_mute(playerid,params[])
{
new string[256], reason[128], Name[24];
new tomute;
if(IsPlayerAdmin(playerid))
{
if(sscanf(params, "ds", tomute, reason))
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: /mute [playerid] [reason]");
}
else
{
GetPlayerName(Player, Name, sizeof(Name));
if(strlen(reason))
{
format(string, sizeof(string), "MUTE: %s (%d) Reason: %s", Name, tomute, reason);
}
else
{
format(string, sizeof(string), "MUTE: %s (%d) Reason: No Reason", Name, tomute);
}
SendClientMessageToAll(COLOR_PINK, string);
pmuted[tomute] = 1;
}
}
return 1;
}

