/mute command little problem.
#1

Hello guys, i've created a mute command with reason parameters but the problem is when i type the reason with numbers it works, but with caracteres ain't working!

Here is my code!

PHP код:
CMD:mute(playerid, params[])
{
    if(
Spawned[playerid] == 0) return SendClientMessage(playerid, 0xf8f8f8fff,"ERROR: {F00f00}You can't use this command while you are not spawned!");
    new 
ID;
    new 
string[128];
    new 
name[MAX_PLAYER_NAME];
    new 
tname[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, name, sizeof(name));
    
GetPlayerName(ID, tname,sizeof(tname));
    if(
sscanf(params,"ii",ID,params)) return SCM(playerid, -1,"Syntax: {FFFFFF}/mute <id> <reason>");
    if(
PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, 0xf8f8f8fff, "ERROR: {FFFFFF}You aren't authorized to use this command!");
    if(!
IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xf8f8f8fff,"ERROR: {FFFFFF}Player is not connected");
    
format(string, sizeof(string),"%s was muted by an administrator Reason: %d",tname,params);
    
SCMTA(-1,string);
    
PlayerInfo[ID][pMute] = 1;
    return 
1;
} 
Reply


Messages In This Thread
/mute command little problem. - by RxErT - 21.05.2017, 19:03
Re: /mute command little problem. - by Abagail - 21.05.2017, 19:06
Re: /mute command little problem. - by Banditul18 - 21.05.2017, 19:06
Re: /mute command little problem. - by RxErT - 21.05.2017, 19:24
Re: /mute command little problem. - by J0sh... - 21.05.2017, 19:38
Re: /mute command little problem. - by DarkSkull - 22.05.2017, 06:11

Forum Jump:


Users browsing this thread: 1 Guest(s)