Hitman bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hitman bug (
/showthread.php?tid=323367)
Hitman bug -
cotyzor - 05.03.2012
When I kill someone (as assassin) I don't recive money .. Why ?
pawn Код:
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(PlayerInfo[killerid][pLeader] == 8 || PlayerInfo[killerid][pMember] == 8)
{
if(GoChase[killerid] == playerid)
{
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
GivePlayerCash(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"<< Assasin %s a omorat pe %s si a primit $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
SendClientMessage(playerid,COLOR_YELLOW,"<< Nimic personal. Cineva a pus un contract pe tine si asasinul l-a indeplinit >>");
PlayerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
Re: Hitman bug -
Twisted_Insane - 05.03.2012
Try it in this kind of function:
pawn Код:
GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
Re: Hitman bug -
cotyzor - 05.03.2012
This is not the solution! I think the server don't know where is victim and where is assasin
Re: Hitman bug -
Walsh - 05.03.2012
Somewhere in your script, pHeadVaule is automatically returning zero.