Administrative chat
#1

Hello everyone. I have a question regarding the admin chat.

Using this:
pawn Код:
dcmd_a(playerid, params[])
{
    new message[128], sendername[MAX_PLAYER_NAME], string[128];
    if(!sscanf(params, "s[128]", message))return SendClientMessage(playerid, -1, "Type: /a (your message)");
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            new d, m, y, h, mi, s;
            gettime(h, mi, s);
            getdate(y, m, d);
            GetPlayerName(playerid,sendername,sizeof(sendername));

            new arank[24];
            switch(PlayerInfo[playerid][pAdmin])
            {
                case 1:arank = "Trial Administrator";
                case 2:arank = "Normal Administrator";
                case 3:arank = "Senior Administrator";
                case 4:arank = "Lead Administrator";
                case 5:arank = "Head Administrator";
                case 6:arank = "Head of Admins";
                case 1337:arank = "Scripter";
                case 1338:arank = "Server Owner";
                default:arank = "Unknown / Player";
            }
            format(string, sizeof(string), "[%s] %s (%d): %s", arank, sendername, playerid, message);
            SendAdminMessage(COLOR_LIGHTRED, string);

            printf("%s %s: %s",arank, sendername, message);

            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s %s: %s", arank, d, m, y, h, mi, s, sendername, message);
            AdminChatLog(string);
        }
    }
    return true;
}
Whenever I write /a Hello my name is bla bla bla

The only thing that comes up are /a Hello

I cannot add sentences somehow. Any ideas on how to fix that? Cheers!
Reply


Messages In This Thread
Administrative chat - by Fell - 06.05.2013, 18:46
Re: Administrative chat - by Face9000 - 06.05.2013, 18:57
Re: Administrative chat - by MattyG - 06.05.2013, 19:07
Re: Administrative chat - by Fell - 06.05.2013, 19:13
Re: Administrative chat - by Fell - 06.05.2013, 19:16
Re: Administrative chat - by Fell - 06.05.2013, 19:22
Re: Administrative chat - by Jf - 06.05.2013, 20:31
Re: Administrative chat - by Fell - 06.05.2013, 20:36
Re: Administrative chat - by Jf - 06.05.2013, 21:00
Re: Administrative chat - by Fell - 07.05.2013, 00:33

Forum Jump:


Users browsing this thread: 1 Guest(s)