equal 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)
+--- Thread: equal help.. (
/showthread.php?tid=333437)
equal help.. -
Mr_RokKi3[B] - 11.04.2012
someone can give me define equal..?
Re: equal help.. -
Cjgogo - 11.04.2012
How can you not know what equal is?Equal is this symbol: "=",and in every programming language is supossed to check if a variable has a certain value,or,to check if something is true.
Re: equal help.. -
emokidx - 11.04.2012
a=1;
b=2;
c=a+b;
used for assigning a value..
if(a==b) return 1;
used to compare values.
Respuesta: equal help.. -
admantis - 11.04.2012
the symbol "==" is used to compare two values (not strings, they can be integers, booleans, hexadecimal values) as they have an exact match.
if you are looking for the "equal" function, I've made it for you
pawn Код:
stock equal(a,b)
return (a==b)?1:0;
Re: equal help.. -
Mr_RokKi3[B] - 11.04.2012
amm,
equal = #define equal strcmp..
command..:
if(equal(cmd,"/tlist"))
Respuesta: Re: equal help.. -
admantis - 11.04.2012
Quote:
Originally Posted by Mr_RokKi3[B]
amm,
equal = #define equal strcmp..
command..:
if(equal(cmd,"/tlist"))
|
pawn Код:
stock equal(str1[],str2[],ignorecase=true,len=sizeof(str1))
{
if(!strcmp(str1,str2,ignorecase,len))return 1;
return 0;
}
next time be more accurate on what you ask.