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 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
Old 12-30-2013, 10:12
daNzEt
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-02-2014 , 04:55   Re: Bullet damage modify
Reply With Quote #3

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
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-06-2014 , 05:12   Re: Bullet damage modify
Reply With Quote #4

Can someone help?
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 01-06-2014 , 06:25   Re: Bullet damage modify
Reply With Quote #5

Stop bumping your threads, it's against the rules if you did not notice your last comment got deleted.
__________________

Last edited by jingojang; 01-06-2014 at 06:26.
jingojang is offline
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-06-2014 , 07:12   Re: Bullet damage modify
Reply With Quote #6

If someone would offer technical support here i'm sure nobody will bump again, all moderators apply only these rules but nobody use his brain to help us ... Thank you

Last edited by daNzEt; 01-06-2014 at 07:12.
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-06-2014 , 11:20   Re: Bullet damage modify
Reply With Quote #7

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

#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

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_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) )
        {
            new iPos = ++g_iPlayerPos[id]
            
            if( iPos == sizeof(g_flCoords) )
            {
                iPos = g_iPlayerPos[id] = 0
            }
            
            if (get_user_team(id) == 1)
            {
                set_hudmessage(120, 40, 40, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)            
                show_hudmessage(id, "%d", read_data(2))
            }
            
            if (get_user_team(id) == 2)
            {
                set_hudmessage(0, 40, 120, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)            
                show_hudmessage(id, "%d", read_data(2))            
            }
            if (get_user_team(id) == 3)
            {
                set_hudmessage(133, 133, 133, Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1)            
                show_hudmessage(id, "%d", read_data(2))            
            }
        }
    }
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 01-06-2014 , 14:14   Re: Bullet damage modify
Reply With Quote #8

Quote:
Originally Posted by daNzEt View Post
If someone would offer technical support here i'm sure nobody will bump again, all moderators apply only these rules but nobody use his brain to help us ... Thank you
So you are saying your request is more important than the rules?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-06-2014 , 12:55   Re: Bullet damage modify
Reply With Quote #9

Not working, nothing show ....

PHP Code:
new id get_user_attacker(iVictim
In this case if spectator is attacker the message will show i think, but the spectator is not the attacker, he is specting the attacker how can we do to show the message? ..
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-07-2014 , 03:18   Re: Bullet damage modify
Reply With Quote #10

Nope, i say that ppl here prefer not help and after 7 days we give it up bump and then they wake up to apply rules. I'm sure nobody will bump if he gets support for his problem. You say don't bump in 14 days but in 14 days my topic will be history nobody cares if in page 18 for exemple is 1 request unsolved. Spit on me if i lie... ;)

So ... I can do this plugin to show bullet damage done by attacker in spec mode to spectator?

Last edited by daNzEt; 01-07-2014 at 03:20.
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