Money problem
#1

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);
Reply
#2

Код:
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
Reply
#3

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.
Reply
#4

if(GetPlayerMoney(playerid) > 5)
Reply
#5

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
Reply
#6

No worries it all good. just need the function
Reply
#7

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

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.
Reply
#9

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
Reply
#10


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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)