[Tutorial] How to make Simple PayDay System
#1

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
Reply
#2

Not much explained
good for newbies
Reply
#3

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

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

Good Tutorial
Reply
#6

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

its great but explain it more

Nice anyway
Reply
#8

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.
Reply
#9

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!
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)