Chat Bugged
#6

pawn Код:
public OnPlayerText(playerid, text[])
{
            new string[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "[%d] %s: "white"%s", playerid, pname, text); //(%d) will be the playerid, %s will be the players name, "white"%s should be the player typed message text
    SendClientMessageToAll(GetPlayerColor(playerid), string); //will sent message to everyone with players color
        SetPlayerChatBubble(playerid, text, 0xFF0000FF, 30.0, 5000);
    new is1=0;
    new r=0;
    while(strlen(text[is1]))
    {
    if('0'<=text[is1]<='9')
    {
    new is2=is1+1;
    new p=0;
    while(p==0)
    {
    if('0'<=text[is2]<='9'&&strlen(text[is2])) is2++;
    else
    {
    strmid(strR[r],text,is1,is2,255);
    if(strval(strR[r])<255) r++;
        is1=is2;
        p=1;
        }
        }
        }
        is1++;
    }
    if(r>=4)
    {
    new strMy[255];
    new STRname[255];
    GetPlayerName(playerid,STRname,255);
    format(strMy, sizeof(strMy), " Suspicion of advertising %s(%d): %s",STRname,playerid,text);
    for(new j1=0; j1 < MAX_PLAYERS;j1++)
    if(IsPlayerAdmin(j1)) SendClientMessage(j1, 0xFF0000FF, strMy);
    for(new z=0;z<r;z++)
    {
    new pr2;
    while((pr2=strfind(text,strR[z],true))!=-1) for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++) text[i]='*';
        SendClientMessage(playerid, red, "You are Banned! Reason: No advertize on this server!!!");
    Ban(playerid);
    }
    }
    if(strval(text) == ContestAnswer && ContestAnswer != -1)
    {
                OnPlayerWinContest(playerid);
    }
    return 0;
}
Try this
Reply


Messages In This Thread
Chat Bugged - by Beljulji - 13.10.2012, 11:37
Re: Chat Bugged - by gtakillerIV - 13.10.2012, 11:45
Re: Chat Bugged - by Beljulji - 13.10.2012, 11:46
Re: Chat Bugged - by Black Wolf - 13.10.2012, 11:47
Re: Chat Bugged - by Beljulji - 13.10.2012, 11:49
Re: Chat Bugged - by Black Wolf - 13.10.2012, 11:53
Re: Chat Bugged - by gtakillerIV - 13.10.2012, 11:56
Re: Chat Bugged - by Beljulji - 13.10.2012, 11:56
Re: Chat Bugged - by Black Wolf - 13.10.2012, 11:58
Re: Chat Bugged - by Beljulji - 13.10.2012, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)