AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Bullet damage modify (https://forums.alliedmods.net/showthread.php?t=232286)

daNzEt 12-28-2013 12:10

Bullet damage modify
 
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)

daNzEt 01-02-2014 04:55

Re: Bullet damage modify
 
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?

daNzEt 01-06-2014 05:12

Re: Bullet damage modify
 
Can someone help?

jingojang 01-06-2014 06:25

Re: Bullet damage modify
 
Stop bumping your threads, it's against the rules if you did not notice your last comment got deleted.

daNzEt 01-06-2014 07:12

Re: Bullet damage modify
 
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

ironskillz1 01-06-2014 11:20

Re: Bullet damage modify
 
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))           
            }
        }
    }
}


daNzEt 01-06-2014 12:55

Re: Bullet damage modify
 
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? ..

joshknifer 01-06-2014 14:14

Re: Bullet damage modify
 
Quote:

Originally Posted by daNzEt (Post 2081919)
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?

daNzEt 01-07-2014 03:18

Re: Bullet damage modify
 
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?

OOE 01-07-2014 03:23

Re: Bullet damage modify
 
danzet you are right, they got really lazy and the community here is kinda dead.


All times are GMT -4. The time now is 20:37.

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