[Help] Money system - 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: [Help] Money system (
/showthread.php?tid=257584)
[Help] Money system -
zouyun - 26.05.2011
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.
Re: [Help] Money system -
iGetty - 26.05.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
//Award $10,000 to the killer
GivePlayerMoney(killerid, 10000);
}
Correct me if I'm wrong.
Re: [Help] Money system -
Janek17 - 26.05.2011
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);
}
Re: [Help] Money system -
zouyun - 26.05.2011
Thanks, it seems to work. Also do you know how to make a menu that allows you to buy guns like /shop.