SSCANF 2 Command Issue
#1

Hey, folks. So I have this command (/say) but it does not fully work.

pawn Код:
command(say, playerid, params[])
{
    new message, string[128];
    if(PlayerStatistics[playerid][pAdminLevel] >= 3)
    {
        if(sscanf(params, "s[119]", message))
        {
            SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /say [message]");
        }
        else
        {
            if(IsPlayerConnectedEx(playerid))
            {
                format(string, sizeof(string), "* Admin: %s", message);
                SendClientMessageToAll(0x2587CEFF, string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "You are not logged in!");
            }
        }
    }
    return 1;
}
The command will actually display only numbers, not letters or special characters. Plus, it gives the "SERVER: UNKNOWN COMMAND!" message...
Reply


Messages In This Thread
SSCANF 2 Command Issue - by Scenario - 28.09.2010, 23:53
Re: SSCANF 2 Command Issue - by bigcomfycouch - 29.09.2010, 00:03
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:11
Re: SSCANF 2 Command Issue - by bigcomfycouch - 29.09.2010, 00:12
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:19
Re: SSCANF 2 Command Issue - by [L3th4l] - 29.09.2010, 00:23
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:26
Re: SSCANF 2 Command Issue - by [L3th4l] - 29.09.2010, 00:33
Re: SSCANF 2 Command Issue - by Grim_ - 29.09.2010, 00:34
Re: SSCANF 2 Command Issue - by Scenario - 29.09.2010, 00:39

Forum Jump:


Users browsing this thread: 1 Guest(s)