Posts: 303
Threads: 71
Joined: Mar 2011
So I have tested my server and every time I die, I get charged $100 so (-$100). How can I change that so that whenever I die, I get charged more money? Thanks,
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by introzen
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { new money = GetPlayerMoney(playerid); SetPlayerMoney(playerid, money-*Amount of cash to be withdrawn*); return 1; }
|
Yes this works. +rep. Thanks!
Posts: 303
Threads: 71
Joined: Mar 2011
Quote:
Originally Posted by DJGama101
or
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(playerid, -*Amount of cash to be withdrawn*);
return 1;
}
|
What's the difference though?
Posts: 44
Threads: 19
Joined: Mar 2011
Reputation:
0
.pwn and .amx will have less kb and code will be faster. :P
Posts: 303
Threads: 71
Joined: Mar 2011
Oh okay thanks. And last question. Anyone know how to subtract a certain amount of money depending on how much money you currently have?
For example:
I have $100000 but I died therefore my medical fees (or death fees) will be $10000
OR
I have $200000 but I died therefore my medical fees (or death fees) will be $20000
Anyone know how to do this?