if(strcmp(cmdtext, "/mute", true, 5)==0)
{
if(!strlen(cmdtext[6]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /mute [playerid]");
return 1;
}
new ID = strval(cmdtext[6]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been muted!", pName);
SendClientMessageToAll(COLOR_ORED, str);
format(str, 64, "You have been muted!");
SendClientMessage(ID, COLOR_ORANGE, str);
Muted[ID] = 1;
}
return 1;
}
if(strcmp(cmdtext, "/unmute", true, 5)==0)
{
if(!strlen(cmdtext[6]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
return 1;
}
new ID = strval(cmdtext[6]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been unmuted!", pName);
SendClientMessageToAll(COLOR_ORED, str);
format(str, 64, "You have been unmuted!");
SendClientMessage(ID, COLOR_ORANGE, str);
Muted[ID] = 0;
}
return 1;
}
if(strcmp(cmdtext, "/mute", true, 5)==0)
{
if(strcmp(cmdtext, "/unmute", true, 5)==0)
{
if(strcmp(cmdtext, "/unmute", true, 7)==0)
{
if(!strlen(cmdtext[8]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
return 1;
}
new ID = strval(cmdtext[8]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been unmuted!", pName);
SendClientMessageToAll(COLOR_ORED, str);
format(str, 64, "You have been unmuted!");
SendClientMessage(ID, COLOR_ORANGE, str);
Muted[ID] = 0;
}
return 1;
}
if(strcmp(cmdtext, "/unmute", true)==0)
if(strcmp(cmdtext, "/mute", true)==0)
if(!strcmp(cmdtext, "/unmute", true, 7))
{
if(!strlen(cmdtext[8]))
{
SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
return 1;
}
new ID = strval(cmdtext[8]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been unmuted!", pName);
SendClientMessageToAll(COLOR_ORED, str);
format(str, 64, "You have been unmuted!");
SendClientMessage(ID, COLOR_ORANGE, str);
Muted[ID] = 0;
}
return 1;
}
Originally Posted by ۞●•λвнiиаv•●۞
dont use this thing .... i have seen it many times that commands don work when you didnt specify thier sizes ....
Just try this and nothing else and then tell me.... pawn Код:
|