[Help] Money system
#1

I have added money in the game, but I don't know how
to set it so that when you kill someone it gives you money.
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
   //Award $10,000 to the killer
   GivePlayerMoney(killerid, 10000);
}
Correct me if I'm wrong.
Reply
#3

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
   new string[125];
 
   GivePlayerMoney(killerid, 50000);//Award 50,000 to the killer
 
   format(string, sizeof(string), "You now have %d.", GetPlayerMoney(killerid));
   SendClientMessage(killerid, 0xFFFFFFAA, string);
}
Reply
#4

Thanks, it seems to work. Also do you know how to make a menu that allows you to buy guns like /shop.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)