Payday f&*ked - 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)
+--- Thread: Payday f&*ked (
/showthread.php?tid=546736)
Payday f&*ked -
Addons - 17.11.2014
I have a problem with my payday system. Some players receive payday, other no. I found that players who receive payday have even IDs (example: 0, 2, 4, 6).
Код:
synctimer = SetTimer("SyncUp", 60000, 1);
Код:
public SyncUp()
{
SyncTime();
DollahScoreUpdate();
}
public SyncTime()
{
new string[64];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
BroadCast(COLOR_WHITE,string);
ghour = tmphour;
PayDay();
if (realtime)
{
SetWorldTime(tmphour);
}
}
}
Код:
public FixHour(hour)
{
hour = timeshift+hour;
if (hour < 0)
{
hour = hour+24;
}
else if (hour > 23)
{
hour = hour-24;
}
shifthour = hour;
return 1;
}
Re: Payday f&*ked -
Simeon87 - 18.11.2014
Could you please post the code for your PayDay() function? There are no obvious errors elsewhere and I would assume that the problem lies within that code.
Re: Payday f&*ked -
xCrazyMonkey - 19.11.2014
What Simeon87 says.
Did you accidentally placed something like " var = var *2; somewhere in your PayDay() function?