I need 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need Help (
/showthread.php?tid=123723)
I need Help -
sggassasin - 27.01.2010
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
Re: I need Help -
Backwardsman97 - 27.01.2010
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?
Re: I need Help -
sggassasin - 27.01.2010
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
Re: I need Help -
Backwardsman97 - 27.01.2010
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)
{
}
Re: I need Help -
sggassasin - 27.01.2010
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)
{
}