SA-MP Forums Archive
How do you define more stuffs on 1 define ? (lol) - 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: How do you define more stuffs on 1 define ? (lol) (/showthread.php?tid=650265)



How do you define more stuffs on 1 define ? (lol) - wallen - 24.02.2018

PHP код:
#define CLANBAN "[test], [test2], [test3]"
#define nicknameban "admin, lol" 
So i just made that little system on detecting tags, and names on the player connection and if they match he gets the ban, but i dont understand why it stops detect since i've added 2 more tags , and 1 more nick. Is there a way to define more tags and nick on just 1 line. ?


Re: How do you define more stuffs on 1 define ? (lol) - iKarim - 24.02.2018

Quote:
Originally Posted by wallen
Посмотреть сообщение
PHP код:
#define CLANBAN "[test], [test2], [test3]"
#define nicknameban "admin, lol" 
So i just made that little system on detecting tags, and names on the player connection and if they match he gets the ban, but i dont understand why it stops detect since i've added 2 more tags , and 1 more nick. Is there a way to define more tags and nick on just 1 line. ?
That's not possible. Defines are basically a place holders, it gets replaced with the actual content on compiling. So doing this:

PHP код:
#define CLANBAN "[test], [test2], [test3]"
if(!strcmp(clanCLANBAN)) 
Becomes:

PHP код:
if(!strcmp(clan"[test], [test2], [test3]")) 



Re: How do you define more stuffs on 1 define ? (lol) - wallen - 24.02.2018

Thanks solved