Quote:
Originally Posted by tarkan00
hey bro you can use this :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "flags plugin"
#define VERSION "1.0"
#define AUTHOR "tarkan"
new const FLAGS[2][]=
{
"abcdefg",//flags 1
"hijklmno"//flags 2
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /test","calis")
}
public calis(id)
{
for(new i = 0; i < sizeof FLAGS; i++){
if(get_user_flags(id) == read_flags(FLAGS[i])){
/////////////////////// your cmds
/////////////////////// your cmds
/////////////////////// your cmds
}
}
}
|
pretty sure you cant compare returned data of get_user_flags(id) wth a string. You would have to do smth like:
PHP Code:
new flags = get_user_flags(id)
if(flags & ADMIN_LEVEL_H || flags & ADMIN_RCON ){//etc. i`m not very familiar with bitsums, so i might kinda be wrong. but comparing it to string is rly not the way to do it.
/////////////////////// your cmds
/////////////////////// your cmds
/////////////////////// your cmds
}
__________________