When a hitman kills you, you loose the Contract Amount?
#1

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
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)