Medical Fees
#1

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

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;
Reply
#3

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

bump do know no one
?
Reply
#5

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

it worked thanx btw i seen that code before but didn't test.
Reply
#7

You're right, I didn't see Ockad's code, sorry for double posting the solution ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)