02.01.2015, 01:09
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,
How am I able to fix this?
Thanks,
FunnyBear
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);
}
Thanks,
FunnyBear