SA-MP Forums Archive
Money problem - 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: Money problem (/showthread.php?tid=139731)



Money problem - Steven82 - 06.04.2010

Sorry guys i know this has been like posted a million times this week but, how do i make a command work for only a certain ammount? I thought it was this

Код:
if(GetPlayerMoney,(playerid, < 5);



Re: Money problem - Jay. - 06.04.2010

Код:
GivePlayerMoney(playerid,IN HERE TYPE HOW MUCH CASH U WANT);
Then i would like say put it under OnPlayerCommandText and then type somthing u would like for when u want the money say like


/money and put the GivePlayerMoney(playerid,IN HERE TYPE HOW MUCH CASH U WANT); Under it

Then type it ingame and enjoy ur money

Hope i helped


Re: Money problem - Steven82 - 06.04.2010

Wow...huh....i don't think you understand the coding, i know tht, i am trying to limit the command to only work
if you have 5$ or more, then you get the item, if you don't it don't work.


That is the function i am having trouble with.


Re: Money problem - Hiddos - 06.04.2010

if(GetPlayerMoney(playerid) > 5)


Re: Money problem - Jay. - 06.04.2010

Quote:
Originally Posted by Steven82
Wow...huh....i don't think you understand the coding, i know tht, i am trying to limit the command to only work
if you have 5$ or more, then you get the item, if you don't it don't work.


That is the function i am having trouble with.
Sorry im a beginner at scripting getin better by the moment i'm just trying to help people

Im litle sad now


Re: Money problem - Steven82 - 06.04.2010

No worries it all good. just need the function


Re: Money problem - Jay. - 06.04.2010

Quote:
Originally Posted by Steven82
No worries it all good. just need the function
Ok yea maybe soon i will understand more


Re: Money problem - Steven82 - 06.04.2010

Quote:
Originally Posted by ("GгNSTг")
Quote:
Originally Posted by Steven82
No worries it all good. just need the function
Ok yea maybe soon i will understand more
true that true that.


Re: Money problem - Joe_ - 06.04.2010

pawn Код:
new money; // Varible
money = GetPlayerMoney(playerid); // Assign the varible 'money' to mean 'GetPlayerMoney(playerid)' just to clean up the code.

if(money >= 1000) // If money is more or equals 1000
{
    // Do something
}
else // If money is NOT more or DOESN'T equal 1000 - AKA - The oposite of the check
{
    //Do something
}
Hope it helps


Re: Money problem - biltong - 06.04.2010


pawn Код:
if(GetPlayerMoney(playerid) >= 1000) // If money is more or equals 1000
{
    // Do something
}
else // If money is NOT more or DOESN'T equal 1000 - AKA - The oposite of the check
{
    //Do something
}
xD