string errorz
#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

well, the "new integer:money" is useless just "new money" is enough
then, money is always 0, because you didnt define what money is
try:
money = GivePlayerMoney(killerid, -(GetPlayerMoney(playerid) / 50));
then it will work.
oh and the "you've lost %d money" doesnt make sence because now your telling the killerid(who should be rewarded) losses the %d money.
so that should be playerid instead of killerid
Reply
#4

thx u
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)