SA-MP Forums Archive
Help me with payday - 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: Help me with payday (/showthread.php?tid=620509)



Help me with payday - ImVictor - 30.10.2016

well guys, i want to do a 30 min interval payday, like 12:00 12:30 13:00 etc...
some1 help me please!


Re: Help me with payday - AMouldyLemon - 30.10.2016

Setup a timer on repeat.
gettime each second, check for minute == 30 || minute == 0.
Give player payday

Код:
OnGameModeInit() {
    SetTimer("PaydayTimer", 1000, true);
}

PaydayTimer() {
    new hour, minute, second;
    gettime(hour, minute, second);
    if(minute == 0 || minute == 30) {
        GivePlayerMoney(playerid, 3000);
        // Or whatever.
    }
}



Re: Help me with payday - ImVictor - 30.10.2016

Thanks brooo!