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



Script Help - lwilson - 26.06.2014

How to make script ,
For Example ,i deposit my 100k to the bank and someone robbed the bank successfully, my balance will decrease 50% due to robbery how to make like that Script?


Re: Script Help - Rittik - 26.06.2014

Код:
previous value of player's account - ((50/100)*robbed value) = new value of the player's account



Re: Script Help - Lynn - 26.06.2014

Create the Bank robbery command.
Then once the robbery is complete, loop through the players.
Inside of the loop do the following:
new balance = pInfo[i][pBankBalance];
pInfo[i][pBankBalance] = balance/2;
If you need help writing the entire system Forum PM me.


Re: Script Help - lwilson - 26.06.2014

@Lynn sure sir/ma'am but i need take my files first , i'll appreciate your help mister/ma'am i'll PM you later when i have my GAMEMODE