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



Money System - brandypol - 08.08.2013

Hey everyone i really really really.... need help. I'd like to know if it's possible to do a money system in my server and if it is ,could someone send me a link where i could find a money system script please. I need you help .

I say it again if you know a link where it explains how tomake a money script please send it to me.

Thanks


Re: Money System - thimo - 08.08.2013

What is a 'money' script?


Re: Money System - brandypol - 08.08.2013

you know in some servers you earn money when you kill someone or something like this and i don't know how to make a script like this. Could you help me please ?


Re: Money System - Konstantinos - 08.08.2013

That's the easiest part!
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    if( killerid != INVALID_PLAYER_ID ) GivePlayerMoney( killerid, 250 );
    return 1;
}



Re: Money System - brandypol - 08.08.2013

OMG man you're like saving my life now thank you very much and i have a last question. How does this script works ?


Re : Money System - Matnix - 08.08.2013

nvm.


Re: Money System - DanishHaq - 08.08.2013

Quote:
Originally Posted by brandypol
Посмотреть сообщение
OMG man you're like saving my life now thank you very much and i have a last question. How does this script works ?
I explained it to you, read the green text.

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That's the easiest part!
pawn Код:
public OnPlayerDeath( playerid, killerid, reason ) // this is the public for OnPlayerDeath which will be called when someone dies
{
    if( killerid != INVALID_PLAYER_ID ) GivePlayerMoney( killerid, 250 ); // the GivePlayerMoney will give the money to the killerid, and the 250 is how much money is given to him (the killerid in this case will get $250), the INVALID_PLAYER_ID means that if someone killed himself, this will not be called, it will only be called if someone kills someone else
    return 1;
}