Why are you checking the flags 3 times?!
PHP Code:
GiveAccess(id)
{
if (get_user_flags(id) & ACCESS_ADMIN_LEVEL)
{
new player, body;
get_user_aiming(id, player, body);
if (is_user_connected(player))
{
new szPlayerName[32];
get_user_name(player, szPlayerName, 32);
if(get_user_flags(player) & ACCESS_ADMIN_LEVEL)
{
client_print(id, print_chat, "%s %s has got access already.", Prefix, szPlayerName);
}
else
{
new flags = read_flags("u");
set_user_flags(player, flags);
client_print(player, print_chat, "%s You now have access. Enjoy!", Prefix);
client_print(id, print_chat, "%s %s has access now.", Prefix, szPlayerName);
}
}
}
}
If this doesn't work, the error is somewhere else in the plugin, so post the full code.
__________________