PHP Code:
GiveAccess(id)
{
if (get_user_flags(id) & ACCESS_ADMIN_LEVEL)
{
new player, body, szPlayerName[32];
get_user_aiming(id, player, body);
get_user_name(player, szPlayerName, 32);
if(get_user_flags(id) & ACCESS_ADMIN_LEVEL)
{
if (is_user_connected(player) && 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);
}
}
}
}
This is the whole GiveAccess script.