uh... percentage help
#1

How do i make it so it says to the killerid how much money it lost in the percentage deduction of his cash? here is my code..

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
    {
    if(killerid == INVALID_PLAYER_ID)
    {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
    }
    else
    {
        SendDeathMessage(killerid,playerid,reason);
        new integer:money, s[64];
        GivePlayerMoney(killerid, -(GetPlayerMoney(playerid) / 50));
        format(s, sizeof(s), "You've lost $%i For DeathMatching!", money);
        SendClientMessage(killerid, 0xFFFFFFAA, s);
      ResetPlayerWeapons(killerid);
    }
    return 1;
    }

all it says in-game is "You've lost $0 For DeathMatching!"

a little help? :S
Reply
#2

nobody knows?
Reply
#3

maybe try to store something in money ^^"

and for the perantage

pawn Код:
new percentage = GetPlayerMoney(playerid) / 50 * 100 / GetPlayerMoney(killerid);
sure that the killer gets -2% of the victims money ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)