SA-MP Forums Archive
if(char==A) - 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: if(char==A) (/showthread.php?tid=216380)



if(char==A) - legodude - 25.01.2011

how to check for a character in a if statement without doing strcmp/strfind


Re: if(char==A) - Calgon - 25.01.2011

If you're just checking for one single character/letter in a variable/array:

pawn Код:
if(char == 'A')
For arrays:

pawn Код:
if(chars[45] == 'A')



Re: if(char==A) - legodude - 25.01.2011

if(text[0] == 'A')
if i do that in OnPlayerText callback it seems not to work..
any ideas why?