Posts: 229
Threads: 37
Joined: Jan 2010
Reputation:
0
Already done that. Thanks for response tho.
Posts: 6,340
Threads: 58
Joined: May 2009
Reputation:
0
Are you logged as RCON admin then? Because I see that you used IsPlayerAdmin-check.
Posts: 6,340
Threads: 58
Joined: May 2009
Reputation:
0
Check your code again. And by the way, you're not formatting the message correctly.
Posts: 209
Threads: 19
Joined: Dec 2008
pawn Код:
public OnPlayerText(playerid, text[])
{
if(mute[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000,"ERROR: You are muted!");
return 0;
}
}
//---------------------------------------------------------------
dcmd_mute(playerid, params[])
{
new pid;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /mute [playerid]");
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been muted",name);
SendClientMessageToAll(0xF60000AA,string);
mute[pid]= 1;
return 1;
}
dcmd_unmute(playerid, params[])
{
new pid;
if(!IsPlayerAdmin(playerid)) return 1;
if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /mute [playerid]");
new name[MAX_PLAYER_NAME],string[128];
GetPlayerName(pid,name,sizeof(name));
format(string,sizeof(string),"%s has been unmuted",name);
SendClientMessageToAll(0xF60000AA,string);
mute[pid]= 0;
return 1;
}
Posts: 209
Threads: 19
Joined: Dec 2008
The OnPlayerText thingy should work. What does it say?