Problem with sending hit contract message on death
#1

Hey,

I'm currently scripting a Hit Contract system, and its going quite well except for one thing. When the player is killed by a bounty hunter, they receive the money and a message is sent, but it doesn't work.

Here is the code for it,

pawn Код:
if( hasHit[playerid] == true && gTeam[ killerid ] == TEAM_CIV_BOUNTY )
    {
        new
            str[128];

        format(str, sizeof(str), "[HIT] %s[%d] has been killed by Bounty Hunter %s[%d] for $%d", GetName(playerid), playerid, GetName(killerid), killerid, hitAmount[playerid]);
        SendClientMessageToAll(SERVER_MESSAGE, str);

        GivePlayerMoney(killerid, hitAmount[playerid]);
        hasHit[playerid] = false;
        hitAmount[playerid] = 0;
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
    }
How am I able to fix this?

Thanks,

FunnyBear
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)