SA-MP Forums Archive
My Timer Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: My Timer Problem (/showthread.php?tid=275377)



My Timer Problem - Soumi - 09.08.2011

I made a simple timer that will be called every one second, i wanted to test But it didn't work here's my code, please tell me if i'm doing something wrong.

pawn Код:
//At the top of the script
forward OnPlayerOneSecondUpdate();

//Under OnGameModeInit

SetTimer("OnPlayerOneSecondUpdate", 1000, true);

//And here's the callback

public OnPlayerOneSecondUpdate()
{
    SendClientMessageToAll(GREY, "Testing..."); //This should send "Testing" every second to All the players right? but its not..
    return 1
}



Re: My Timer Problem - Sascha - 09.08.2011

pawn Код:
forward OnPlayerOneSecondUpdate
has to be
pawn Код:
forward OnPlayerOneSecondUpdate();



Re : Re: My Timer Problem - Soumi - 09.08.2011

Quote:
Originally Posted by Sascha
Посмотреть сообщение
pawn Код:
forward OnPlayerOneSecondUpdate
has to be
pawn Код:
forward OnPlayerOneSecondUpdate();
I forgot to make that in my Post but its done in my Script i will edit the post.