Medical Fees - 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: Medical Fees (
/showthread.php?tid=413340)
Medical Fees -
sscarface - 04.02.2013
PHP код:
new mstring[150];
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = 20*wealth/100;
GivePlayerCash(playerid, -medfee); new mstring[150];
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = 20*wealth/100;
GivePlayerCash(playerid, -medfee);
i tried alots time but nothing happen and i want medical fees remove from bank money not hands money. any help?
Re: Medical Fees -
Ockad - 05.02.2013
The code is there two times it seems.
To reduct it from bank only, do this:
Код:
new mstring[150];
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = 20*wealth/100;
BankInfo[playerid][Balance] - medfee;
Re: Medical Fees -
sscarface - 05.02.2013
not work and i did this
PHP код:
new mstring[150];
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = 20*wealth/100;
GivePlayerCash(BankInfo[playerid][Balance], -medfee);
edit not work too
Re: Medical Fees -
sscarface - 06.02.2013
bump do know no one
?
Re: Medical Fees -
antonio112 - 06.02.2013
pawn Код:
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = (20*wealth)/100;
BankInfo[playerid][Balance] = BankInfo[playerid][Balance] - medfee;
If you want to 'fee' the players bank account, why would you use GivePlayerCash?
This should work ...
Re: Medical Fees -
sscarface - 06.02.2013
it worked thanx btw i seen that code before but didn't test.
Re: Medical Fees -
antonio112 - 06.02.2013
You're right, I didn't see
Ockad's code, sorry for double posting the solution ...