Win money when you kill someone
#1

Hey

I'd like to script but I need help. When a player kill another, killer win +$500. Can you help?
Thx
Reply
#2

below OnPlayerDeath:
GivePlayerMoney(killerid,500);
Reply
#3

Easy enough, rofl.

I can see you're new to scripting so I'll keep it simple:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) //This code gets called when somebody dies.
{
  if(IsPlayerConnected(killerid)) //Checks if there really is a "killer" - more ways of death are for example falling from great heights, so there isn't a killer there!
  {
    GivePlayerMoney(killerid, 500); //Give the player 500 dollars
  }
  return 1;
}
Reply
#4

Thank you for you nice help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)