Raised This Month: $52 Target: $400
 13% 

can someone make this admin level h?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Junior Member
Join Date: Feb 2019
Old 02-10-2019 , 03:19   can someone make this admin level h?
Reply With Quote #1

hi, can someone make this admin level h?
PHP Code:
#include <amxmodx> 
#include <fakemeta> 

#pragma semicolon 1 

#define USE_CHECK_VISIBLE_ENT // Закомментируйте эту строку, если не хотите использовать проверку видимости игрока перед отображением урона 

#if !defined USE_CHECK_VISIBLE_ENT 
    #define CONSIDER_MEAT_MAPS // Закомментируйте эту строку, если не хотите принудительно активировать проверку видимости игрока на "мясных" картах 
     
    
new bool:g_bMeatMap
#endif 

new g_pHudSyncObj1
new 
g_pHudSyncObj2

public 
plugin_init() 

    
register_plugin("Damager""0.1b""Subb98"); 
    
register_event("Damage""EventDamage""b""2!0""3=0""4!0"); 
    
g_pHudSyncObj1 CreateHudSyncObj(); 
    
g_pHudSyncObj2 CreateHudSyncObj(); 


#if defined CONSIDER_MEAT_MAPS 
public plugin_cfg() 

    new const 
szMapTypes[][] = {"aim_""awp_""fy_"}; // Типы карт, которые будут считаться "мясными" (по умолчанию "aim_", "awp_", "fy_") 
    
new szMapname[32]; 
    
get_mapname(szMapnamecharsmax(szMapname)); 
    for(new 
isizeof szMapTypesi++) 
    { 
        if(
equali(szMapnameszMapTypes[i], strlen(szMapTypes[i]))) 
        { 
            
g_bMeatMap true
            break; 
        } 
    } 

#endif 

public EventDamage(const id

    static 
pAttackeriDamage
    
pAttacker get_user_attacker(id), iDamage read_data(2); 
    
#if defined USE_CHECK_VISIBLE_ENT 
    
if(is_user_connected(pAttacker) && pAttacker != id && fm_is_ent_visible(pAttackerid)) 
    
#else 
    
if(is_user_connected(pAttacker) && pAttacker != id && g_bMeatMap fm_is_ent_visible(pAttackerid) : 1>0
    
#endif 
    

        
set_hudmessage(0_200_0.55__1.0_0.0, -1); 
        
ShowSyncHudMsg(pAttackerg_pHudSyncObj1"%d"iDamage); 
    } 
    if(
is_user_connected(id)) 
    { 
        
set_hudmessage(2550_0.45, -1.0__1.0_0.0, -1); 
        
ShowSyncHudMsg(idg_pHudSyncObj2"%s%d"id == pAttacker "-" ""iDamage); 
    } 


// Thanks to ConnorMcLeod (https://forums.alliedmods.net/showpost.php?p=1580992&postcount=10) 
stock bool:fm_is_ent_visible(const id, const pEnt, const bool:bIgnoreMonsters false

    new 
Float:fStart[3], Float:fDestination[3], Float:fFraction
    
pev(idpev_originfStart); 
    
pev(idpev_view_ofsfDestination); 
    
fStart[0] += fDestination[0]; 
    
fStart[1] += fDestination[1]; 
    
fStart[2] += fDestination[2]; 
    
pev(pEntpev_originfDestination); 
    
engfunc(EngFunc_TraceLinefStartfDestinationbIgnoreMonstersid0); 
    
get_tr2(0TR_flFractionfFraction); 
    if(
fFraction 0.97
    { 
        return 
true
    } 
    return 
false

HowToRuski is offline
HowToRuski
Junior Member
Join Date: Feb 2019
Old 02-10-2019 , 07:08   Re: can someone make this admin level h?
Reply With Quote #2

pls help
HowToRuski is offline
SomewhereLost
Senior Member
Join Date: Mar 2014
Location: Tomorrowland
Old 02-10-2019 , 14:40   Re: can someone make this admin level h?
Reply With Quote #3

if((is_user_connected() && get_user_flags() & ADMIN_LEVEL_H)

Im with phone. Try something like this with id and/or Attacker.
__________________

Last edited by SomewhereLost; 02-10-2019 at 14:41.
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Reply


Thread Tools
Display Modes

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 14:20.


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