28.08.2013, 04:17
Hey guys, I made a "cheap" payday system for my server but I got a small problem. When It gives the payday it doesn't gives me only 1 exp point it gives me like 37 xD. Yeah I can see the "Payday: You aquired 1 exp point" message but is sent like 37/38 times. How can I make it to send only one time?
Placed under my SaveDataTimer (saves all the stats at every sec [less lag than OnPlayerUpdate])
This is not placed under SaveDataTimer
Placed under my SaveDataTimer (saves all the stats at every sec [less lag than OnPlayerUpdate])
pawn Код:
gettime(hour,minute);
if(minute == 0)
{
SetTimerEx("payday", 1, false, "i", playerid);
}
pawn Код:
public payday(playerid)
{
PlayerInfo[playerid][pExp]++;
SendClientMessageToAll(-1, "-------------PAYDAY-------------");
SendClientMessageToAll(-1, "Ai primit 1 punct de experienta.");
}