Admin chat won't allow spaces
#1

Ok so i made a simple admin chat and it works but if a player types with spaces it dosn't show the words after the spaces here is my code.

pawn Код:
COMMAND:ac(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] > 1)
    {
        new message[200];
        if(sscanf(params, "s[32]", message))
        {
            new string1[252];
            new pname[MAX_PLAYER_NAME];
            GetPlayerName(playerid,pname,sizeof(pname));
            format(string1,sizeof(string1),"Server Admin %s: %s", pname, message);
            SendMessageToAdmins(COLOR_GREEN,string1);
        }
        else return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /ac [message]");
    }
    else return SendClientMessage(playerid, COLOR_YELLOW, "You are not an admin");
    return 1;
}
Reply


Messages In This Thread
Admin chat won't allow spaces - by jueix - 26.08.2012, 08:36
Re: Admin chat won't allow spaces - by Sniper Kitty - 26.08.2012, 08:39
Re: Admin chat won't allow spaces - by Dan. - 26.08.2012, 08:41
Re: Admin chat won't allow spaces - by leonardo1434 - 26.08.2012, 09:29
Re: Admin chat won't allow spaces - by jueix - 26.08.2012, 09:57
Re: Admin chat won't allow spaces - by jueix - 26.08.2012, 10:20

Forum Jump:


Users browsing this thread: 1 Guest(s)