Quote:
Originally Posted by CryWolf
Code:
get_user_authid(plr, playerid, sizeof playerid - 1);
to ----->
PHP Code:
get_user_ip ( plr, playerid, charsmax (playerid) );
|
Did you know that this does the same thing perfectly? Charsmax is the size of - 1.
I don't think it's possible, you have to rebuild the code and match the ip before giving permissions, to give a range if or if the STEAMID has to be used, it is based on that, not the ip, you could try placing a condition before giving the permission checking if the ip is correct, like:
PHP Code:
new plr = str_to_num(Data);
get_user_name(id, ownerName, sizeof ownerName - 1);
get_user_name(plr, playerName, sizeof playerName - 1);
get_user_authid(plr, playerid, sizeof playerid - 1);
new szIP[32]
get_user_ip(plr, szIP, charsmax(szIP), 1)
if( equal( szIP, "188.212", 7 ) )
{
server_cmd("amx_addadmin ^"%s^" ^"%s^"", playerid, accFlags[szKey]);
ColorChat(0, "Owner ^4%s^1 Gave^4 %s^1 Access To^4 %s", ownerName, accNames[szKey], playerName);
server_cmd("amx_reloadadmins")
}
menu_destroy(setLevel);
return PLUGIN_HANDLED;