Quote:
Originally Posted by kramesa
Try this...
PHP Code:
#include <amxmodx> #include <amxmisc>
public client_connect(id) { if(!is_user_admin(id)) server_cmd("kick #%d ^"Only admins can connect^"", get_user_userid(id)); }
|
This will make all admins allowed to connect, am I right?
EDIT: I tried it... doesn't work :/ or am I doing it wrong? xd
I want these hud text in the plugin instead of the chat text. should this work? (I mean, should the HUD text work if the plugin did)
Code:
#include <amxmodx>
#include <amxmisc>
public client_connect(id)
{
new szName[32], szSteamID[32];
get_user_name(id, szName, charsmax(szName));
get_user_authid(id, szSteamID, charsmax(szSteamID));
if(!is_user_admin(id))
{
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(id, "The player %s dont have permission to connect! (%s)", szName, szSteamID)
server_cmd("kick #%d ^"Only admins can connect, You can aply for an admin job at www.badstyle.comze.com^"", get_user_userid(id));
return PLUGIN_HANDLED;
}
else {
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(id, "The admin %s has connected! (%s)", szName, szSteamID)
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
I also tried
Code:
if(!(get_user_flags(id) & ADMIN_LEVEL_D))
That doesn't work either :/
__________________