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))
}
}
}