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=575254)



PayDay - JaKe Elite - 25.05.2015

I was wondering on how do you create a payday check?
I wanted to be a realistic one ~ $100-$500 give out, Tax and Stuffs.

How am i suppose to create it, what variables / mechanics are required?

Help would be appreciated ~ Sorry if i posted on a wrong section.


Re: PayDay - MikE1990 - 25.05.2015

If i'm right you want to give player 100$ - 500$ every hour ? You can make this with timer,every hour to give all players 100$ - 500$.


Re: PayDay - JaKe Elite - 25.05.2015

I knew that but the problem is the taxes, i don't know how could i make them

* Waiting for Mr.Emmet to reply down here ~ meh meh face *


Re: PayDay - Beckett - 25.05.2015

How do you want taxes to apply, what do you base them on? Do you have a variable that stores bank-cash that you could take tax from, elaborate please.


Re: PayDay - JaKe Elite - 25.05.2015

I haven't started anything yet, I was seeking for help / tips on how could i make it, The jobs & banks and everything which the tax system relies on is still on development.


Re: PayDay - Beckett - 25.05.2015

I understand, but could you explain to me briefly how do you want it to be like, like tax if you own a house, business, tax based on your total wealth? If so give me the variables you are using and I'll create you an example.

pawn Код:
new playerbank[MAX_PLAYERS];

// Assuming you already have a timer which does the payday.
forward pDayTimer();
public pDayTimer()
{
new highest_id = GetPlayerPoolSize();
for(new i = 0; i < highest_id;i++)
{
// Your checks here if he deserves the paycheck yet or not, etcetera.
if(DeservePaycheck)
{
new tax = player_bank[playerid]*0.01;
if(OwnHouse) tax += Houses[HouseID][HousePrice]*0.01;
i(OwnBusiness) tax += Houses[BusinessID][BusinessPrice]*0.01;
player_bank[playerid] -= tax;
}
}
That's just the idea. ^


Re: PayDay - JaKe Elite - 25.05.2015

As i have mentioned nothing is created so far but the basic things like Age,Gender registration ~ factions.
But at least you have given me an idea.