Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: Willian_Luigi on October 05, 2013, 01:47:32 am

Title: Head Value System
Post by: Willian_Luigi on October 05, 2013, 01:47:32 am
[pawn]new gHeadValue[MAX_PLAYERS];[/pawn]

[pawn]
public OnPlayerSpawn(playerid)
{
   gHeadValue[playerid] = 300; //Set player head value 300
   return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
   if (killerid != INVALID_PLAYER_ID) //Verify if the player has died by another player.
   {
      GivePlayerMoney(killerid, gHeadValue[playerid]); //Give to killer the worth of player head...

      gHeadValue[killerid] += 1000; //Set killer head value = value + 1000
      
      //msgs
      SendClientMessage(killerid, -1, "You have killed +1 noob, so, now your head worth +$1.000");
      SendClientMessage(playerid, -1, "You died, now your head start into the original price($300)");
   }
   return 1;
}[/pawn]

Title: Re: Head Value System
Post by: sseebbyy on October 05, 2013, 02:04:46 am
lol. Nice, simple and original idea. I like it, good job :)
Title: Re: Head Value System
Post by: MatheuS on October 05, 2013, 05:37:24 am
lol. Nice, simple and original idea. I like it, good job :)

  :)
Title: Re: Head Value System
Post by: tyler12 on October 06, 2013, 04:47:11 pm
Simple, but you could format a string telling them their total head value.

For example:
Code: (pawn) [Select]
format(string,sizeof(string),"You have killed +1 noob, so no your head worth +$%d",gHeadValue[killerid]);