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

No access = no show dmg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LauNcHerR
Junior Member
Join Date: Jan 2010
Old 08-06-2016 , 15:35   No access = no show dmg
Reply With Quote #1

This bullet dmg have small bug.. when player with flag t connect to server message for dmg show.. when this player change to other nick with no access message for dmg show.. need to fix it to not show..
And when normal player connect to server message for dmg not show.. when this player change to nick with access message for dmg not show.. need to fix it to show.
Code:
#include <amxmodx> #include <dhudmessage> #define MAX_PLAYERS    32 new const Float:g_flCoords[][] = {     {0.50, 0.40},     {0.56, 0.44},     {0.60, 0.50},     {0.56, 0.56},     {0.50, 0.60},     {0.44, 0.56},     {0.40, 0.50},     {0.44, 0.44} } new g_iPlayerPos[MAX_PLAYERS+1] new g_iMaxPlayers new g_pCvarEnabled new bool:g_bFlags[33]; public plugin_init() {     register_plugin("Vip bullet damage","1.0","dmg P0W3R")         g_pCvarEnabled = register_cvar("bullet_damage", "1")         register_event("Damage", "Event_Damage", "b", "2>0", "3=0")         g_iMaxPlayers = get_maxplayers() } public client_putinserver(id) {     g_bFlags[id] = get_user_flags(id) & ADMIN_LEVEL_H ? true : false; } public Event_Damage( iVictim ) {     if( get_pcvar_num(g_pCvarEnabled) && (read_data(4) || read_data(5) || read_data(6)) )     {         new id = get_user_attacker(iVictim)         if( (1 <= id <= g_iMaxPlayers) && is_user_connected(id) && g_bFlags[id])         {             new iPos = ++g_iPlayerPos[id]             if( iPos == sizeof(g_flCoords) )             {                 iPos = g_iPlayerPos[id] = 0             }             set_dhudmessage(46, 139, 87, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02)             show_dhudmessage(id, "%d", read_data(2))         }     } }
LauNcHerR is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 08-06-2016 , 15:43   Re: No access = no show dmg
Reply With Quote #2

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

#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("Vip bullet damage","1.0","dmg P0W3R")
    
    
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) && (get_user_flags(id) & ADMIN_LEVEL_H))
        {
            new 
iPos = ++g_iPlayerPos[id]
            if( 
iPos == sizeof(g_flCoords) )
            {
                
iPos g_iPlayerPos[id] = 0
            
}
            
set_dhudmessage(4613987Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 00.12.50.020.02)
            
show_dhudmessage(id"%d"read_data(2))
        }
    }

siriusmd99 is offline
LauNcHerR
Junior Member
Join Date: Jan 2010
Old 08-06-2016 , 18:00   Re: No access = no show dmg
Reply With Quote #3

Thank you man, work!
LauNcHerR 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:57.


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