PayDay Bug! - 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 Bug! (
/showthread.php?tid=442900)
PayDay Bug! -
KrishkoW - 09.06.2013
My PayDay is not working correctlyt!
Always after stats restart everything is ok till one moment, idk why!
I think the problem is the database, but it is not!
Then found that by the time the timer stops working, becouse weather didnt change and game time too!
This is the timer which stops working:
Код:
stock Timer()
{
new newhour,newminute,newsecond;
gettime(newhour, newminute, newsecond);
if ((newhour > ghour) || (newhour == 0 && ghour == 23))
{
ghour = newhour;
PayDayTime();
SetWorldTime(newhour);
}
}
If anyone have any solutions please help!
Re: PayDay Bug! -
ReVo_ - 09.06.2013
Timer is called by SetTimer(Ex) ?
If yes, should be
forward Timer();
public Timer() {
}
Re: PayDay Bug! -
KrishkoW - 09.06.2013
No, this is different timer~!
Re: PayDay Bug! -
OrMisicL - 09.06.2013
The only problem i can see, is either u're stopping the timer somewhere in the code, or the "ghour" variable is not properly initialized, otherwise the code looks fine to me
Re: PayDay Bug! -
Aly - 09.06.2013
Show us the Timer u are using to initialize the function Timer()
Re: PayDay Bug! -
KrishkoW - 09.06.2013
you mean this ?
Код:
forward SecUpdate();
public SecUpdate()
{
Timer();
HealCheck();
HealthCheck();
ArmourCheck();
//GunsCheck();
MoneyCheck();
GzCheck();
GlobalAfkCheck();
Re: PayDay Bug! -
Aly - 09.06.2013
Everything looks fine unless you kill the timer.
Re: PayDay Bug! -
KrishkoW - 09.06.2013
How could I ?
Re: PayDay Bug! -
Aly - 09.06.2013
Look into your gamemode and see if there's "KillTimer(SecUpdate);" or look at the functions/stocks HealCheck,HealthCheck,ArmourCheck,MoneyCheck,GzChe ck,GlobalAfkCheck and check if they return 1.
If they do ,delete return 1;
Re: PayDay Bug! -
OrMisicL - 09.06.2013
make sure u're not killing the "SecUpdate()" timer somewhere in ur script, show us how u create that timer in the first place