"ClearChatbox"
#2

pawn Code:
if (strcmp(cmd, "/clearchat", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    return SendClientMessage(playerid, 0xAFAFAFAA, "[USAGE]: /clearchat [line]");
                }
                new lin = strval(tmp);
                if(lin < 1) return SendClientMessage(playerid,0xAFAFAFAA, "    Error !");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                for(new i=0; i<GetMaxPlayers(); i++) ClearChatbox(i,lin);
            }
        }
        return 1;
    }
 
stock ClearChatbox(playerid, lines)
{
        if (IsPlayerConnected(playerid))
        {
                for(new i=0; i<lines; i++)
                {
                        SendClientMessage(playerid, 0xAFAFAFAA, " ");
                }
        }
        return 1;
}
Reply


Messages In This Thread
"ClearChatbox" - by KoDeX - 13.10.2011, 09:24
Re: "ClearChatbox" - by Dripac - 13.10.2011, 09:27
Re: "ClearChatbox" - by KoDeX - 13.10.2011, 09:29
Re: "ClearChatbox" - by Dripac - 13.10.2011, 09:31
Re: "ClearChatbox" - by KoDeX - 13.10.2011, 09:34
Re: "ClearChatbox" - by Dripac - 13.10.2011, 09:36
Re: "ClearChatbox" - by KoDeX - 13.10.2011, 09:37
Re: "ClearChatbox" - by Joe Staff - 13.10.2011, 10:51
Re: "ClearChatbox" - by Dripac - 13.10.2011, 10:53
Re: "ClearChatbox" - by Joe Staff - 13.10.2011, 19:25

Forum Jump:


Users browsing this thread: 4 Guest(s)