HELP: About OnPlayerText..
#1

Hi When I type aq in my server the server answers otomaticly 'Server:Bende senin aq' but it Spams when I do that.
I used Timer to look like a real player is typing. Anybody can Solve this problem

pawn Код:
forward Aq();
//////////////////////////////////////////////////////////////////////////////
public OnPlayerText(playerid, text[])
{

    if((strfind(text,"aq",true,0))== 0){
    SetTimer("Aq",1000,1);
    return 1;
    }
///////////////////////////////////////////////////////////////////////////////
public Aq()
{
    SendClientMessageToAll(0xFFFF00AA, "Server: Bende senin a.q");
    return 1;
}
Reply
#2

The timer is the 'spamming bot'. Don't forget to kill your timer when you want it to stop.
Reply
#3

Quote:
Originally Posted by cοοp
The timer is the 'spamming bot'. Don't forget to kill your timer when you want it to stop.
Ow yes Right I forgot it Thank you
I'll Try If there's a problem I'll write
Reply
#4

Or just set timer's repeat to 0 so it won't repeat.
pawn Код:
SetTimer("Aq",1000,0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)