SA-MP Forums Archive
When a hitman kills you, you loose the Contract Amount? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: When a hitman kills you, you loose the Contract Amount? (/showthread.php?tid=75662)



When a hitman kills you, you loose the Contract Amount? - marszim - 03.05.2009

I need help with above, the title.. if there is, lets say.. a 2.5k hit on someone, how can i make it so when they die.. by a hitman they lose that amount?

Код:
	if(PlayerInfo[playerid][pHeadValue] > 0)
	{
	  if(IsPlayerConnected(killerid))
	  {
		  if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
		  {
		    if(GoChase[killerid] == playerid)
		    {
		      //ConsumingMoney[killerid] = 1;
					new killer[MAX_PLAYER_NAME];
					GetPlayerName(killerid, killer, sizeof(killer));
					SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
					format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
					SendFamilyMessage(8, COLOR_YELLOW, string);
					PlayerInfo[playerid][pHeadValue] = 0;
					GotHit[playerid] = 0;
					GetChased[playerid] = 999;
					GoChase[killerid] = 999;
				}
			}
		}
	}
Hope ya can help


Re: When a hitman kills you, you loose the Contract Amount? - Danut - 03.05.2009

GivePlayerMoney(playerid, -PlayerInfo[playerid][pHeadValue]);