SA-MP Forums Archive
Limit and above 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)
+--- Thread: Limit and above problem (/showthread.php?tid=324631)



Limit and above problem - Huxley - 10.03.2012

Hi all.

I'm currently scripting my own TDM GM (I hope it's better than others), now I'm doing some limit for each teams. Each teams have the same limit.
Like, if the player has 1000 score and above, he/she'll get extra weapons on spawn. Now, the problem is, I want to script, if the player has 1000 score and above, he/she gets the extras. I tried to do something like this but I'm a bit confused now.If I only do 1000, I think it only sets on 1000, that's why I'm asking how to script this kind of stuffs.

pawn Код:
if(GetPlayerScore(playerid)==1000>)
Now I need a help, what's the mistake and the solution.

Thanks for reading.


Re: Limit and above problem - Reklez - 10.03.2012

pawn Код:
if(GetPlayerScore(playerid) < 1000)
if this don't work then try this

pawn Код:
if(GetPlayerScore(playerid) > 1000)



Re: Limit and above problem - [XST]O_x - 10.03.2012

pawn Код:
if(GetPlayerScore(playerid) >= 1000)



Re: Limit and above problem - Huxley - 10.03.2012

What if lower than the value, this... <= ?


Re: Limit and above problem - [XST]O_x - 10.03.2012

Quote:
Originally Posted by Huxley
Посмотреть сообщение
What if lower than the value, this... <= ?
Yes.
Lower and equal.

pawn Код:
x >   1000 //- 1001, 1002....
x >= 1000 //- 1000, 1001, 1002...
x <   1000 //- 999,998...
x <= 1000 //- 1000, 999, 998....



Re: Limit and above problem - Huxley - 10.03.2012

Alright, thanks! Rep added.


Re: Limit and above problem - Reklez - 10.03.2012

Never mind, i know asking rep is bad. O_x is faster i will reply but he is really really faster than me