SA-MP Forums Archive
Help - 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)
+--- Thread: Help (/showthread.php?tid=589452)



Help - anassmaroc - 19.09.2015

Please How to make a Credits System.
Exemple: When Player Want Shop a Weapon they Said u Don't have Enought Credits And When he Kill players he get 2 credits per kill Please help


Re: Help - Jastak - 19.09.2015

Thi is the conditional for money.
Код:
if(GetPlayerMoney(playerid) >= amount)
This is the function for give money when a player dies.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
GivePlayerMoney(killerid, amount); // Change "amount" for the amount what you want give.
}
}



Re : Help - anassmaroc - 20.09.2015

Need Credits


Re : Re: Help - KillerDVX - 20.09.2015

Quote:
Originally Posted by Jastak
Посмотреть сообщение
Thi is the conditional for money.
Код:
if(GetPlayerMoney(playerid) >= amount)
This is the function for give money when a player dies.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
GivePlayerMoney(killerid, amount); // Change "amount" for the amount what you want give.
}
}
That what you should do for your request.