07.01.2011, 11:42
Hello ladies and guys,
I wrote yesterday a timer for my server. This timer should write every 60 minutes the date of the day to every player only once. But in fact the server send this message 30+ times. I don't know what a failure I made. I hope anybody can help me with this:
Under GameModeInit
The whole code:
Regards, ThomasTailor93
I wrote yesterday a timer for my server. This timer should write every 60 minutes the date of the day to every player only once. But in fact the server send this message 30+ times. I don't know what a failure I made. I hope anybody can help me with this:
pawn Код:
forward DatumTimer();
pawn Код:
SetTimer("DatumTimer",36000000,true);
pawn Код:
public DatumTimer()
{
new year, month, day;
getdate (year, month, day);
new coordsstring[256];
format(coordsstring, sizeof(coordsstring),"SERVER: Datum: %d.%d.%d",day,month,year);
SendClientMessageToAll(0xFF0000FF,coordsstring);
return 1;
}