SA-MP Forums Archive
about numbers. - 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: about numbers. (/showthread.php?tid=445916)



about numbers. - audriuxxx - 23.06.2013

Hi,

I have number for ex: 5.

I want to make it 05 i do it like that:

Code:
new numbers = 5;
new writetostringsy[ 50 ];
format( writetostringsy, 25,"%02d",numbers );
And i have another number:

new numbersx = 05;


And now, if i want to do like that:


Code:
if( numbersx == strval(writetostringsy) )
{
// CAN I DO strval and does it work?
}



Respuesta: about numbers. - JustBored - 23.06.2013

You can make it much easier
pawn Code:
new number,secondnumb;
number = 05;
//then
if(secondnumb == number)
{
blablabla



Re: about numbers. - audriuxxx - 23.06.2013

But that what i show, does it work?


Re: about numbers. - Macluawn - 23.06.2013

How about testing it?
My guess is that it should work.