SA-MP Forums Archive
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: Payday (/showthread.php?tid=599309)



Payday - AndreiWow - 24.01.2016

I need a good payday system, I don't really know how to make a payday system, can someone link one to me?


Re: Payday - Arshman - 24.01.2016

i think the code will be like this not tested yet.

PHP код:
new paydayactivetimer[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid)
{
paydayactivetimer[playerid] = SetTimerEx("paytheplayer"30000false"d"playerid);// 30000 is the time here you can change it.
return 1;
}
// paste in the end of the script.
forward paytheplayer(playerid);
public 
paytheplayer(playerid)
{
GivePlayerMoney(playerid1000);// its depends on you how much cash you want to give him
SendClientMessage(playerid, -1"You Received $1000 its PayDay");
paydayactivetimer[playerid] = SetTimerEx("paytheplayer"30000false"d"playerid);// 30000 is the time here
return 1;