Help with > OnPlayerDeath
#1

Hi, I have this on sv but it resets the full money of the player who gets killed.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerChatBubble(playerid, "XC", 0xFFFF0000, 100.0, 3000);
new playercash;
    if(killerid == INVALID_PLAYER_ID) {
        ResetPlayerMoney(playerid);
    } else {
            SendDeathMessage(killerid,playerid,reason);
            SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
            playercash = GetPlayerMoney(playerid);
            if (playercash > 0)  {
                GivePlayerMoney(killerid, playercash);
                ResetPlayerMoney(playerid);
            }
            else
            {
            }
        }
    return 1;
}
What I want is to give the killer +2 score and $100 and to the victim -1 score and $-100. Can anyone help me with this . Thank you.
Reply


Messages In This Thread
Help with > OnPlayerDeath - by RiChArD_A - 01.04.2013, 00:16
Re: Help with > OnPlayerDeath - by Pawnie - 01.04.2013, 00:59
Re: Help with > OnPlayerDeath - by Pawnie - 01.04.2013, 01:11
AW: Help with > OnPlayerDeath - by [AK]Nazgul - 01.04.2013, 06:09
Respuesta: Help with > OnPlayerDeath - by RiChArD_A - 01.04.2013, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)