SA-MP Forums Archive
[help] string comparing - 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: [help] string comparing (/showthread.php?tid=98750)



[help] string comparing - borisblat - 22.09.2009

how can i do that when i type:

/answer ksgsg

it will check if the "ksgsg" is the same as for example "gssg"

its like : if(X ==Y) ....

sorry i didn't knew how to explane it well..

thanks


Re: [help] string comparing - dougbrowne - 22.09.2009

pawn Код:
if(!strcmp(X, Y, true))
{
  CODE HERE
}



Re: [help] string comparing - Correlli - 22.09.2009

https://sampwiki.blast.hk/wiki/Strcmp
https://sampwiki.blast.hk/wiki/Using_strcmp()


Re: [help] string comparing - borisblat - 22.09.2009

thanlks