I need Help
#1

hey there i need help withsomething i have this code that allows me to buy some stuff but each time i try to buy it makes random amounts of money go so like iv made it go like
if(cash >= 50)
{
GivePlayerCash(playerid,583493);
}
if(cash >= 100)
{
GivePlayerCash(playerid,5843493);
}

so when i whent to go over 50 but under a 100 it sometimes dose the under 50 one so like i need a way to range it between 50 to 0 and 100 to 5 so if someone could help that would be great
Reply
#2

I don't understand what you are trying to do. You want to give a random amount of money if their money is in a range of what?
Reply
#3

ok soz im a bit sleepy so this is what i whant it to do..

if i go /buystock <amount>

i whant to be able to keep it in a certain amount of numbers such like 50 100 i whant to only be able to give that person a certain amount of money be tween those numbers but i also whant to be able to give a difrent amount between 0 and 50 and i only whant set numbers so you get one amount of cash for the first lot of numbers and the second lot of numbers
Reply
#4

I'm still not following exactly. I think it may be your English. Something like this? That would check if cash was between 50 and 100.

pawn Код:
if(cash >= 50 && cash <= 100)
{

}
Reply
#5

ya thats kinda whant i whant would it stop me from going /buystock and getting me a difrent section
section one
if(cash >= 50 && cash <= 100)
{

}
section two
if(cash >= 0 && cash <= 50)
{

}


Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)