Double text on caht...
#1

Код:
public OnPlayerText(playerid,text[])
{
    if((GetTickCount() - GetPVarInt(playerid, "AntiSpam")) > 1)
    {
        SendClientMessageToAll(-1, text);
        SetPVarInt(playerid, "AntiSpam", GetTickCount());
    }
    else
    {
        SendClientMessage(playerid, -1, "You must wait 10 seconds before using another Command!");
    }
    if(text[0] == '#')
    {
        new string[128];  GetPlayerName(playerid, string, sizeof(string));
        format(string, sizeof(string), "[Team Radio] %s: %s", string, text[1]);
        printf("%s", string);

        for(new i = 0; i < MAX_PLAYERS; i++) 
        {
            if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, GetPlayerColor(playerid), string);
        }
        return 0;
    }
    return 0;
}
I rally cant find anything...

Maybe someone can help.. In chat it shows like

Код:
ha
Nick: ha
Reply
#2

Have you looked in your Filterscripts ?
Reply
#3

Don't have them!
Reply
#4

return 1 when you sent your text
Reply
#5

That ain't a answer!
Reply
#6

Yes, read to fast.

Remove SendClientMessageToAll();
Код:
    if((GetTickCount() - GetPVarInt(playerid, "AntiSpam")) > 1)
    {
        SendClientMessageToAll(-1, text);
        SetPVarInt(playerid, "AntiSpam", GetTickCount());
    }
Reply
#7

You need to return 0 if you don't want the text to be sent.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)