PDA

View Full Version : Medical Fees


sscarface
04/02/2013, 10:27 PM
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?

Ockad
05/02/2013, 10:18 AM
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;

sscarface
05/02/2013, 09:10 PM
not work and i did this

new mstring[150];
new wealth = GetPlayerCash(playerid) + BankInfo[playerid][Balance];
new medfee = 20*wealth/100;
GivePlayerCash(BankInfo[playerid][Balance], -medfee);


edit not work too

sscarface
06/02/2013, 06:12 AM
bump do know no one
?

antonio112
06/02/2013, 06:34 AM
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 ...

sscarface
06/02/2013, 06:41 AM
it worked thanx btw i seen that code before but didn't test.

antonio112
06/02/2013, 06:43 AM
You're right, I didn't see Ockad's code, sorry for double posting the solution ... :)