Raised This Month: $ Target: $400
 0% 

Bullet damage modify


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 12-28-2013 , 12:10   Bullet damage modify
Reply With Quote #1

Hello,

How can i make this plugin to show damage done also for spectators?

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

#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()
{
    
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
            
}
            
            if (
get_user_team(id) == 1)
            {
                
set_hudmessage(1204040Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 00.12.50.020.02, -1)            
                
show_hudmessage(id"%d"read_data(2))
            }
            
            if (
get_user_team(id) == 2)
            {
                
set_hudmessage(040120Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 00.12.50.020.02, -1)            
                
show_hudmessage(id"%d"read_data(2))            
            }
        }
    }

With hud color (133,133,133)

Last edited by daNzEt; 12-28-2013 at 12:10.
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
 


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


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