Raised This Month: $ Target: $400
 0% 

Plugin doen't recognize me as a admin or admin with admin_rcon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 04-09-2011 , 07:45   Plugin doen't recognize me as a admin or admin with admin_rcon
Reply With Quote #1

I have a problem, plugin doesn't recognize me as a admin:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <amxmisc>

#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame

new user_speed
new user_gravity
new user_hp
new admin_speed
new admin_gravity
new admin_hp
new head_speed
new head_gravity
new head_hp

public plugin_init()
{
    
register_plugin("Player values changer","1.0","Sp@k")
    
RegisterHam(Ham_Spawn"player""Spawn"1)
    
RegisterHam(Ham_Player_ResetMaxSpeed,"player","playerResetMaxSpeed",1)

    
user_speed=register_cvar("user_speed","300")
    
admin_speed=register_cvar("admin_speed","350")
    
head_speed=register_cvar("head_speed","400")

    
user_gravity=register_cvar("user_gravity","0.75")
    
admin_gravity=register_cvar("admin_gravity","0.5")
    
head_gravity=register_cvar("head_gracity","0.35")

    
user_hp=register_cvar("user_hp","150")
    
admin_hp=register_cvar("admin_hp","200")
    
head_hp=register_cvar("head_hp","225")
}
public 
plugin_cfg()
{
    
server_cmd("sv_maxspeed 9999")
}
public 
Spawn(id)
{
    if(
get_user_flags(id) & ADMIN_RCON)
    {
        
set_user_maxspeed(id,float(get_pcvar_num(head_speed)))
        
set_user_gravity(id,get_pcvar_float(head_gravity))
        
set_user_health(id,get_pcvar_num(head_hp))
    }
    else
    {
        if(
is_user_admin(id))
        {
            
set_user_maxspeed(id,float(get_pcvar_num(admin_speed)))
            
set_user_gravity(id,get_pcvar_float(admin_gravity))
            
set_user_health(id,get_pcvar_num(admin_hp))
        }
        else
        {
            
set_user_maxspeed(id,float(get_pcvar_num(user_speed)))
            
set_user_gravity(id,get_pcvar_float(user_gravity))
            
set_user_health(id,get_pcvar_num(user_hp))
        }
    }
}
public 
playerResetMaxSpeed(id)
{
    if(
get_user_flags(id) & ADMIN_RCON)
    {
        
set_user_maxspeed(id,float(get_pcvar_num(head_speed)))
    }
    else
    {
        if(
is_user_admin(id))
        {
            
set_user_maxspeed(id,float(get_pcvar_num(admin_speed)))
        }
        else
        {
            
set_user_maxspeed(id,float(get_pcvar_num(user_speed)))
        }
    }

[IMG]http://img638.**************/img638/1139/helpmp.jpg[/IMG]
Sp@jk is offline
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-09-2011 , 08:51   Re: Plugin doen't recognize me as a admin or admin with admin_rcon
Reply With Quote #2

are you sure you have admin?
i tried and it works for me
Nyuszy is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-09-2011 , 09:17   Re: Plugin doen't recognize me as a admin or admin with admin_rcon
Reply With Quote #3

Make sure users.ini file is well filled.
__________________
Arkshine is offline
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 04-09-2011 , 10:49   Re: Plugin doen't recognize me as a admin or admin with admin_rcon
Reply With Quote #4

I am sure, I have accses to other commands like amx_mapmenu and other



And here is my users.ini:

Code:
; Users configuration file
; File location: $moddir/addons/amxmodx/configs/users.ini

; Line starting with ; is a comment

; Access flags:
; a - immunity (can't be kicked/baned/slayed/slaped and affected by other commmands)
; b - reservation (can join on reserved slots)
; c - amx_kick command
; d - amx_ban and amx_unban commands
; e - amx_slay and amx_slap commands
; f - amx_map command
; g - amx_cvar command (not all cvars will be available)
; h - amx_cfg command
; i - amx_chat and other chat commands
; j - amx_vote and other vote commands
; k - access to sv_password cvar (by amx_cvar command)
; l - access to amx_rcon command and rcon_password cvar (by amx_cvar command)
; m - custom level A (for additional plugins)
; n - custom level B
; o - custom level C
; p - custom level D
; q - custom level E
; r - custom level F
; s - custom level G
; t - custom level H
; u - menu access
; z - user (no admin)

; Account flags:
; a - disconnect player on invalid password
; b - clan tag
; c - this is steamid/wonid
; d - this is ip
; e - password is not checked (only name/ip/steamid needed)
; k - name or tag is case sensitive.  eg: if you set it so the name "Ham"
;     is protected and case sensitive (flags "k" only), then anybody
;     can use the names "haM", "HAM", "ham", etc, but not "Ham"

; Password:
; Add to your autoexec.cfg: setinfo _pw "<password>"
; Change _pw to the value of amx_password_field

; Format of admin account:
; <name|ip|steamid> <password> <access flags> <account flags>

; Examples of admin accounts:
; "STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"
; "123.45.67.89" "" "abcdefghijklmnopqrstu" "de"
; "My Name" "my_password" "abcdefghijklmnopqrstu" "a"

"STEAM_0:0:1874740808" "" "abcdefghijklmnopqrstu" "ce"
Sp@jk is offline
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 04-09-2011 , 13:55   Re: Plugin doen't recognize me as a admin or admin with admin_rcon
Reply With Quote #5

Sorry for Double post
Problem solved, I tested it on the online server and it's working without a problem
Sp@jk 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:09.


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