Make a value pozitive - 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: Make a value pozitive (
/showthread.php?tid=153947)
Make a value pozitive -
matrix_smq - 11.06.2010
Hello!
I have a problem with my script and I think you guys can help ( I searched and tried anything that got in my mind)
Is there any way to make a value of a variable pozitive/negative
Like i have the variable 'nuts' with value 34 How can i make it be 34 (Pozitive) ?
Re: Make a value pozitive -
iLinx - 11.06.2010
Код:
new nuts = 5;
nuts = -nuts; //nuts now equals -5
nuts = -nuts; //nuts now equals 5 again
Re: Make a value pozitive -
matrix_smq - 11.06.2010
Hah - - i didn't thought of that, thanks
Re: Make a value pozitive -
iLinx - 12.06.2010
No problem ^__^