Raised This Month: $51 Target: $400
 12% 

[Help] Make for admin only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
UaExFanTasY
Senior Member
Join Date: Mar 2013
Location: UAE
Old 07-09-2013 , 12:31   [Help] Make for admin only
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <geoip>
 
public plugin_init() {
 
  
register_plugin("Ip & Country""1.0""Vicious Vixen & dArcA");
  
register_clcmd("amx_show""shower_dArc",-1);
  
register_clcmd("amx_showip""shower_dArc", -1);
}
public 
shower_dArc (id,level,cid)
{
 
  
console_print(id"Name     -     IP     -     Country");
  
console_print(id"-----------------------------------");
 
  new 
players[32], num;
  
get_players(playersnum);
 
  for(new 
num i++)
{
 
  new 
name[32]
  new 
userip[16];
  new 
Country[46];
  
get_user_name(players[i], name31)
  
get_user_ip(players[i], userip311)
  
geoip_country(useripCountrycharsmax(Country));
  
console_print(id"%s     -     %s     -     %s"nameuseripCountry);
}
  
console_print(id"-----------------------------------");
 
  return 
1;

please someone make this works for admin only ~! !!!!
I want it to be for admin only

and if I can control it by cavr for what access can use it will be better <3
__________________

Last edited by UaExFanTasY; 07-09-2013 at 12:37.
UaExFanTasY is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 07-09-2013 , 12:51   Re: [Help] Make for admin only
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <geoip>

new g_pAccess

public plugin_init() {
    
    
register_plugin("Ip & Country""1.0""Vicious Vixen & dArcA");
    
register_clcmd("amx_show""shower_dArc",-1);
    
register_clcmd("amx_showip""shower_dArc", -1);
    
    
g_pAccess register_cvar("amx_show_access""a")
}

stock GetAccess()
{
    static 
szAccess[22]
    
get_pcvar_string(g_pAccessszAccess21)
    
    return 
read_flags(szAccess)
}

public 
shower_dArc(id)
{
    if(! ( 
get_user_flags(id)  & GetAccess() ) )
    {
        
console_print(id"You don't have access to this command")
        return 
PLUGIN_HANDLED
    
}
    
    
console_print(id"Name     -     IP     -     Country");
    
console_print(id"-----------------------------------");
    
    new 
players[32], num;
    
get_players(playersnum);
    
    for(new 
num i++)
    {
        
        new 
name[32]
        new 
userip[16];
        new 
Country[46];
        
get_user_name(players[i], name31)
        
get_user_ip(players[i], userip311)
        
geoip_country(useripCountrycharsmax(Country));
        
console_print(id"%s     -     %s     -     %s"nameuseripCountry);
    }
    
console_print(id"-----------------------------------");
    
    return 
PLUGIN_HANDLED;

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
UaExFanTasY
Senior Member
Join Date: Mar 2013
Location: UAE
Old 07-09-2013 , 13:01   Re: [Help] Make for admin only
Reply With Quote #3

I belive u r 1 of best member here
thanks
__________________
UaExFanTasY is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode