Raised This Month: $ Target: $400
 0% 

[Help] Admin Level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 07-31-2009 , 05:32   [Help] Admin Level
Reply With Quote #1

PHP Code:
#include <amxmodx>

#define PLUGIN "Bullet Damage"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define MAX_PLAYERS    32

new const Float:g_flCoords[][] = 
{
    {
0.500.40},
    {
0.560.44},
    {
0.600.50},
    {
0.560.56},
    {
0.500.60},
    {
0.440.56},
    {
0.400.50},
    {
0.440.44}
}

new 
g_iPlayerPos[MAX_PLAYERS+1]

new 
g_iMaxPlayers
new g_pCvarEnabled

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
g_pCvarEnabled register_cvar("bullet_damage""1")

    
register_event("Damage""Event_Damage""b""2>0""3=0")

    
g_iMaxPlayers get_maxplayers()
}

public 
Event_DamageiVictim )
{
    if( 
get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) )
    {
        new 
id get_user_attacker(iVictim)
        if( (
<= id <= g_iMaxPlayers) && is_user_connected(id) )
        {
            new 
iPos = ++g_iPlayerPos[id]
            if( 
iPos == sizeof(g_flCoords) )
            {
                
iPos g_iPlayerPos[id] = 0
            
}
            
set_hudmessage(04080Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 00.12.50.020.02, -1)
            
show_hudmessage(id"%d"read_data(2))
        }
    }

Helloi got question maybe somebody can do that show this DMG only for user's who got ADMIN_LEVEL_G? Becouse i try'ed to add it but no luck dont know what i am doing wrong ;/
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 07-31-2009 , 06:29   Re: [Help] Admin Level
Reply With Quote #2

get_user_flags(iVictim) & ADMIN_LEVEL_G
[ --<-@ ] Black Rose is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 07-31-2009 , 06:38   Re: [Help] Admin Level
Reply With Quote #3

i try'ed this and whit ID but no luck... maybe i was add'ing to bad positions but i dont think so ;/
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 07-31-2009 , 17:23   Re: [Help] Admin Level
Reply With Quote #4

if( get_user_level(iVictim) & ADMIN_LEVEL_G && get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) )
[ --<-@ ] Black Rose is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 07-31-2009 , 18:02   Re: [Help] Admin Level
Reply With Quote #5

PHP Code:
if( get_user_flags(iVictim) & ADMIN_LEVEL_H && get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) ) 
Dont works
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-31-2009 , 18:45   Re: [Help] Admin Level
Reply With Quote #6

Quote:
Originally Posted by LostSkill View Post
PHP Code:
if( get_user_flags(iVictim) & ADMIN_LEVEL_H && get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) ) 
Dont works
You should use "id" and not "iVictim".

PHP Code:
if( get_user_flags(id) & ADMIN_LEVEL_H && get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) ) 
Well, that is how I interpreted your request anyways.
__________________
fysiks is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 08-01-2009 , 01:56   Re: [Help] Admin Level
Reply With Quote #7

I cant do id b/c only after this like i get "new id" so it dont accept another word in this like ;/
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 08-01-2009 , 07:20   Re: [Help] Admin Level
Reply With Quote #8

My bad, I thought the message was for iVictim.
if ( 1 <= id <= g_iMaxPlayers && get_user_flags(id) & ADMIN_LEVEL_H && is_user_connected(id) )
[ --<-@ ] Black Rose is offline
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 08-01-2009 , 11:45   Re: [Help] Admin Level
Reply With Quote #9

Dont works too >.<
__________________
MY ENGLISH IS BAD.....
LostSkill is offline
Send a message via MSN to LostSkill
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 08-01-2009 , 14:57   Re: [Help] Admin Level
Reply With Quote #10

Show full script. WHAT doesn't work?
[ --<-@ ] Black Rose 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 18:31.


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