Raised This Month: $ Target: $400
 0% 

Bullet damage modify


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-02-2014 , 04:55   Re: Bullet damage modify
Reply With Quote #1

Anyone can help me with this?

I've tryed something:

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()
{
    
register_plugin("Bullet Damage""1.0""daNzEt")

    
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)
        
        new 
players[32], inum
        get_players
(playersinum)
        
        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(1504040Float: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))            
            }
            
            for(new 
i=0i<inum; ++i)
            {
                if(
cs_get_user_team(players[i]) == CS_TEAM_SPECTATOR)
                {
                    
set_hudmessage(224224224Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 00.12.50.020.02, -1)            
                    
show_hudmessage(players[i], "%d"read_data(2))    
                }
            }
        }
    }


I've added that search for TEAM_SPECTATOR but show to spectators damage done by killer and also by victim in same time ...

Help?

Last edited by daNzEt; 01-02-2014 at 10:11.
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
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 20:37.


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