SA-MP Forums Archive
[Tutorial] How to make Simple PayDay System - 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)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make Simple PayDay System (/showthread.php?tid=522980)



How to make Simple PayDay System - kirostar - 30.06.2014

Hey,
This tutorial shows you how to make simple payday system

Under
Code:
public OnGameModeInit()
{
Add :
Code:
SetTimer("payday", 600000, 1); // You can change the timer if you want.
Example :
Code:
puplic OnGameModeInit()
{
SetTimer("payday", 600000, 1); // You can change the timer if you want.
return 1;
}
Then, Any where in your script add :
Code:
forward payday();
public payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        GameTextForPlayer(i, "PAYDAY", 1000, 1);
        GivePlayerMoney(i, 1000); // You can change the ammount of money. 
    }
    return 1;
}
Done.
Hope it worked , If you got any error post it here.
Thanks


Re: How to make Simple PayDay System - KayJ - 30.06.2014

Not much explained
good for newbies


Re: How to make Simple PayDay System - kirostar - 30.06.2014

Quote:
Originally Posted by SturtIndia
View Post
Not much explained
good for newbies
Tell me please what is that not much explained
BTW Thanks.


Re: How to make Simple PayDay System - KayJ - 30.06.2014

See this: https://sampforum.blast.hk/showthread.php?tid=166680
I think you will explain like that


Re: How to make Simple PayDay System - AviPeker - 30.06.2014

Good Tutorial


Re: How to make Simple PayDay System - kirostar - 30.06.2014

Quote:
Originally Posted by AviPeker
View Post
Good Tutorial
Thank You.


Re: How to make Simple PayDay System - Team_PRO - 30.06.2014

its great but explain it more

Nice anyway


Re: How to make Simple PayDay System - LivingLikeYouDo - 30.06.2014

Really? Payday after 1 minute?

Also, you should also reset the timer after it is completed, so players will be experiencing the next payday too.


Re: How to make Simple PayDay System - kirostar - 30.06.2014

Quote:
Originally Posted by Team_PRO
View Post
its great but explain it more

Nice anyway
Thanks, I will explain more in another tutorials

Quote:
Originally Posted by LivingLikeYouDo
View Post
Really? Payday after 1 minute?

Also, you should also reset the timer after it is completed, so players will be experiencing the next payday too.
It's a tutorial, and i said that you can change the timer!


Re: How to make Simple PayDay System - anou1 - 07.07.2014

I don't recommend this type of payday.
A player who connect just before can get it.

You recommand something like this:

Every minute a player variable increase. exemple: pInfow[playerid][MinutePlayed] += 1;

And then when it equals 60, you give a payday or something like that.