My chat commands don't work..
#5

Try this. Untested. Let me know if it returns any errors.
pawn Код:
CMD:b(playerid, params[])
{
    new
        str[128];
       
    if (!strlen(params[0])) {
        SendClientMessage(playerid, -1, "Error: parameter is missing.");
    }
   
    else
    {
        if(AdminDuty[playerid])
        {
            switch(PlayerInfo[playerid][pAdmin])
            {
                case 0: format(str, sizeof(string), "%s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
                case 1: format(str, sizeof(string), "<Mod> %s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
                case 2: format(str, sizeof(string), "<Admin> %s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
            }
        }
        ProxDetector(20.0, playerid, str, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        printf("%s", str);
    }
    return 1;
}
You don't need to use sscanf when dealing with one parameter only.
Are you running the latest updated version of sscanf also?
Reply


Messages In This Thread
My chat commands don't work.. - by Luke_James - 08.08.2012, 23:15
Re: My chat commands don't work.. - by shitbird - 08.08.2012, 23:22
Respuesta: Re: My chat commands don't work.. - by [DOG]irinel1996 - 08.08.2012, 23:26
Re: My chat commands don't work.. - by Luke_James - 08.08.2012, 23:33
Re: My chat commands don't work.. - by shitbird - 08.08.2012, 23:37
Re: My chat commands don't work.. - by Emmet_ - 08.08.2012, 23:41
Re: My chat commands don't work.. - by Luke_James - 08.08.2012, 23:45

Forum Jump:


Users browsing this thread: 2 Guest(s)