Raised This Month: $32 Target: $400
 8% 

Could you edit this plugin for me?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
termra
Member
Join Date: Jun 2017
Old 06-21-2017 , 11:51   Could you edit this plugin for me?
Reply With Quote #1

PHP Code:
#include amxmodx
#include hamsandwich

#define PLUGIN    "Killed effects :D" 
#define VERSION    "0.0.1"
#define AUTHOR    "BodyBuilder"

#define _RPC return PLUGIN_CONTINUE

static GREENweaponhitzonebodypart[128], origin[3], 
D_colorD_xD_yD_effectD_fxtimeD_holdtimeD_fadeintimeD_fadeouttimeD_reliable

#define    HLW_CROWBAR        1
#define    HLW_GLOCK        2
#define HLW_PYTHON        3
#define HLW_MP5            4
#define HLW_CROSSBOW        6
#define HLW_SHOTGUN        7
#define HLW_GAUSS        9
#define HLW_EGON        10
#define HLW_HORNETGUN        11

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Killed,"player","killed_eff"1)
}

public 
killed_eff(victimattacker)
{
    
get_user_attacker(victimweaponhitzone)
    
get_user_origin(victim,origin)

    switch(
weapon
    {
        case 
HLW_CROWBAR_RPC
        
case HLW_GLOCK: {}
        case 
HLW_PYTHON: {}
        case 
HLW_MP5: {}
        case 
HLW_CROSSBOW: {}
        case 
HLW_SHOTGUN: {}    
        case 
HLW_GAUSS: {}
        case 
HLW_EGON: {}
        case 
HLW_HORNETGUN: {}
    }

    switch(
hitzone)
    {
        case 
1bodypart "head"
    
}

    if(
weapon && hitzone == 1)
    {
        if(
attacker == victim
        { 
            
_RPC
        
}

        
Set_Director_Hud_Message(02550, -1.000.4510.012.00.010.01)
        
Show_Director_Hud_Message(attacker,"HEAD SHOT :D")
        
client_cmd(attacker,"spk misc/headshot")


        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
        
write_byte(TE_SPRITETRAIL)
        
write_coord(origin[0])
        
write_coord(origin[1])
        
write_coord(origin[2])
        
write_coord(origin[0])
        
write_coord(origin[1])
        
write_coord(origin[2])
        
write_short(GREEN)
        
write_byte(30)
        
write_byte(10)
        
write_byte(1)
        
write_byte(50)
        
write_byte(10)
        
message_end()
    }
    
_RPC
}

public 
plugin_precache()
{
    
precache_sound("misc/headshot.wav")
    
GREEN precache_model("sprites/killed/green.spr")
}

stock Set_Director_Hud_Message(red 0,green 160,blue 0,Float:= -1.0,Float:0.65,effects 2,Float:fxtime 6.0,Float:holdtime 3.0,Float:fadeintime 0.1,Float:fadeouttime 1.5,bool:reliable false)
{
    
#define clamp_byte(%1) (clamp(%1,0,255))
    #define pack_color(%1,%2,%3) (%3 + (%2 << 8) + (%1 << 16))

    
D_color       pack_color(clamp_byte(red),clamp_byte(green),clamp_byte(blue))
    
D_x           _:x
    D_y           
_:y
    D_effect      
effects
    D_fxtime      
_:fxtime
    D_holdtime    
_:holdtime
    D_fadeintime  
_:fadeintime
    D_fadeouttime 
_:fadeouttime
    D_reliable    
_:reliable

    
return 1
}

stock Show_Director_Hud_Message(index,const message[],any:...)
{
    static 
buffer[128], playersList[32], numPlayers,
    
numArgumentssize

    numArguments 
numargs()
    new Array:
handleArrayML ArrayCreate()
    
size ArraySize(handleArrayML)


    if(
numArguments == 2)
    {
        
Send_Director_Hud_Message(index,message)
    }
    else if(
index || numArguments == 3)
    {
        
vformat(buffer,charsmax(buffer),message,3)
        
Send_Director_Hud_Message(index,buffer)
    }
    else
    {
        
get_players(playersList,numPlayers,"ch")

        if(!
numPlayers)
        {
            return 
0
        
}

        for(new 
2jnumArgumentsi++)
        {

            if(
getarg(i) == LANG_PLAYER)
            {
                while((
buffer[j] = getarg(1,j++))){}
                
0

                
if(GetLangTransKey(buffer) != TransKey_Bad)
                {
                    
ArrayPushCell(handleArrayML,i++)
                }
            }
        }
        if(!
size)
        {
            
vformat(buffer,charsmax(buffer),message,3)
            
Send_Director_Hud_Message(index,buffer)
        }
        else
        {
            for(new 
0,jnumPlayersi++)
            {
                
index playersList[i]

                for(
0sizej++)
                {
                    
setarg(ArrayGetCell(handleArrayML,j),0,index)
                }
                
vformat(buffer,charsmax(buffer),message,3)
                
Send_Director_Hud_Message(index,buffer)
            }
        }
        
ArrayDestroy(handleArrayML)
    }
    return 
1
}

stock Send_Director_Hud_Message(const index, const message[])
{
    
message_begin(D_reliable ?(index MSG_ONE MSG_ALL) : (index MSG_ONE_UNRELIABLE MSG_BROADCAST),SVC_DIRECTOR,_,index)
    {
        
write_byte(strlen(message) + 31)
        
write_byte(DRC_CMD_MESSAGE)
        
write_byte(D_effect)
        
write_long(D_color)
        
write_long(D_x)
        
write_long(D_y)
        
write_long(D_fadeintime)
        
write_long(D_fadeouttime)
        
write_long(D_holdtime)
        
write_long(D_fxtime)
        
write_string(message)
    }
    
message_end()


Enemy<--- "HEADSHOT ;D" (green) OK.

Me<--- "HEADSHOT :-(" (red) Please add this expression
termra is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-21-2017 , 14:44   Re: Could you edit this plugin for me?
Reply With Quote #2

PHP Code:
#include amxmodx 
#include hamsandwich 

#define PLUGIN    "Killed effects :D"  
#define VERSION    "0.0.1" 
#define AUTHOR    "BodyBuilder" 

#define _RPC return PLUGIN_CONTINUE 

static GREENweaponhitzonebodypart[128], origin[3],  
D_colorD_xD_yD_effectD_fxtimeD_holdtimeD_fadeintimeD_fadeouttimeD_reliable 

#define    HLW_CROWBAR        1 
#define    HLW_GLOCK        2 
#define HLW_PYTHON        3 
#define HLW_MP5            4 
#define HLW_CROSSBOW        6 
#define HLW_SHOTGUN        7 
#define HLW_GAUSS        9 
#define HLW_EGON        10 
#define HLW_HORNETGUN        11 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR

    
RegisterHam(Ham_Killed,"player","killed_eff"1


public 
killed_eff(victimattacker

    
get_user_attacker(victimweaponhitzone
    
get_user_origin(victim,origin

    switch(
weapon)  
    { 
        case 
HLW_CROWBAR_RPC 
        
case HLW_GLOCK: {} 
        case 
HLW_PYTHON: {} 
        case 
HLW_MP5: {} 
        case 
HLW_CROSSBOW: {} 
        case 
HLW_SHOTGUN: {}     
        case 
HLW_GAUSS: {} 
        case 
HLW_EGON: {} 
        case 
HLW_HORNETGUN: {} 
    } 

    switch(
hitzone
    { 
        case 
1bodypart "head" 
    


    if(
weapon && hitzone == 1
    { 
        if(
attacker == victim)  
        {  
            
_RPC 
        


        
Set_Director_Hud_Message(02550, -1.000.4510.012.00.010.01
        
Show_Director_Hud_Message(attacker,"HEAD SHOT :D"
        
client_cmd(attacker,"spk misc/headshot"

        
Set_Director_Hud_Message(25500, -1.000.4510.012.00.010.01
        
Show_Director_Hud_Message(victim,"HEAD SHOT :-("
        
client_cmd(victim,"spk misc/headshot"
        
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY
        
write_byte(TE_SPRITETRAIL
        
write_coord(origin[0]) 
        
write_coord(origin[1]) 
        
write_coord(origin[2]) 
        
write_coord(origin[0]) 
        
write_coord(origin[1]) 
        
write_coord(origin[2]) 
        
write_short(GREEN
        
write_byte(30
        
write_byte(10
        
write_byte(1
        
write_byte(50
        
write_byte(10
        
message_end() 
    } 
    
_RPC 


public 
plugin_precache() 

    
precache_sound("misc/headshot.wav"
    
GREEN precache_model("sprites/killed/green.spr"


stock Set_Director_Hud_Message(red 0,green 160,blue 0,Float:= -1.0,Float:0.65,effects 2,Float:fxtime 6.0,Float:holdtime 3.0,Float:fadeintime 0.1,Float:fadeouttime 1.5,bool:reliable false

    
#define clamp_byte(%1) (clamp(%1,0,255)) 
    #define pack_color(%1,%2,%3) (%3 + (%2 << 8) + (%1 << 16)) 

    
D_color       pack_color(clamp_byte(red),clamp_byte(green),clamp_byte(blue)) 
    
D_x           _:
    D_y           
_:
    D_effect      
effects 
    D_fxtime      
_:fxtime 
    D_holdtime    
_:holdtime 
    D_fadeintime  
_:fadeintime 
    D_fadeouttime 
_:fadeouttime 
    D_reliable    
_:reliable 

    
return 


stock Show_Director_Hud_Message(index,const message[],any:...) 

    static 
buffer[128], playersList[32], numPlayers
    
numArgumentssize 

    numArguments 
numargs() 
    new Array:
handleArrayML ArrayCreate() 
    
size ArraySize(handleArrayML


    if(
numArguments == 2
    { 
        
Send_Director_Hud_Message(index,message
    } 
    else if(
index || numArguments == 3
    { 
        
vformat(buffer,charsmax(buffer),message,3
        
Send_Director_Hud_Message(index,buffer
    } 
    else 
    { 
        
get_players(playersList,numPlayers,"ch"

        if(!
numPlayers
        { 
            return 

        


        for(new 
2jnumArgumentsi++) 
        { 

            if(
getarg(i) == LANG_PLAYER
            { 
                while((
buffer[j] = getarg(1,j++))){} 
                


                
if(GetLangTransKey(buffer) != TransKey_Bad
                { 
                    
ArrayPushCell(handleArrayML,i++) 
                } 
            } 
        } 
        if(!
size
        { 
            
vformat(buffer,charsmax(buffer),message,3
            
Send_Director_Hud_Message(index,buffer
        } 
        else 
        { 
            for(new 
0,jnumPlayersi++) 
            { 
                
index playersList[i

                for(
0sizej++) 
                { 
                    
setarg(ArrayGetCell(handleArrayML,j),0,index
                } 
                
vformat(buffer,charsmax(buffer),message,3
                
Send_Director_Hud_Message(index,buffer
            } 
        } 
        
ArrayDestroy(handleArrayML
    } 
    return 



stock Send_Director_Hud_Message(const index, const message[]) 

    
message_begin(D_reliable ?(index MSG_ONE MSG_ALL) : (index MSG_ONE_UNRELIABLE MSG_BROADCAST),SVC_DIRECTOR,_,index
    { 
        
write_byte(strlen(message) + 31
        
write_byte(DRC_CMD_MESSAGE
        
write_byte(D_effect
        
write_long(D_color
        
write_long(D_x
        
write_long(D_y
        
write_long(D_fadeintime
        
write_long(D_fadeouttime
        
write_long(D_holdtime
        
write_long(D_fxtime
        
write_string(message
    } 
    
message_end() 

__________________
edon1337 is offline
termra
Member
Join Date: Jun 2017
Old 06-21-2017 , 15:08   Re: Could you edit this plugin for me?
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
PHP Code:
#include amxmodx 
#include hamsandwich 

#define PLUGIN    "Killed effects :D"  
#define VERSION    "0.0.1" 
#define AUTHOR    "BodyBuilder" 

#define _RPC return PLUGIN_CONTINUE 

static GREENweaponhitzonebodypart[128], origin[3],  
D_colorD_xD_yD_effectD_fxtimeD_holdtimeD_fadeintimeD_fadeouttimeD_reliable 

#define    HLW_CROWBAR        1 
#define    HLW_GLOCK        2 
#define HLW_PYTHON        3 
#define HLW_MP5            4 
#define HLW_CROSSBOW        6 
#define HLW_SHOTGUN        7 
#define HLW_GAUSS        9 
#define HLW_EGON        10 
#define HLW_HORNETGUN        11 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR

    
RegisterHam(Ham_Killed,"player","killed_eff"1


public 
killed_eff(victimattacker

    
get_user_attacker(victimweaponhitzone
    
get_user_origin(victim,origin

    switch(
weapon)  
    { 
        case 
HLW_CROWBAR_RPC 
        
case HLW_GLOCK: {} 
        case 
HLW_PYTHON: {} 
        case 
HLW_MP5: {} 
        case 
HLW_CROSSBOW: {} 
        case 
HLW_SHOTGUN: {}     
        case 
HLW_GAUSS: {} 
        case 
HLW_EGON: {} 
        case 
HLW_HORNETGUN: {} 
    } 

    switch(
hitzone
    { 
        case 
1bodypart "head" 
    


    if(
weapon && hitzone == 1
    { 
        if(
attacker == victim)  
        {  
            
_RPC 
        


        
Set_Director_Hud_Message(02550, -1.000.4510.012.00.010.01
        
Show_Director_Hud_Message(attacker,"HEAD SHOT :D"
        
client_cmd(attacker,"spk misc/headshot"

        
Set_Director_Hud_Message(25500, -1.000.4510.012.00.010.01
        
Show_Director_Hud_Message(victim,"HEAD SHOT :-("
        
client_cmd(victim,"spk misc/headshot"
        
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY
        
write_byte(TE_SPRITETRAIL
        
write_coord(origin[0]) 
        
write_coord(origin[1]) 
        
write_coord(origin[2]) 
        
write_coord(origin[0]) 
        
write_coord(origin[1]) 
        
write_coord(origin[2]) 
        
write_short(GREEN
        
write_byte(30
        
write_byte(10
        
write_byte(1
        
write_byte(50
        
write_byte(10
        
message_end() 
    } 
    
_RPC 


public 
plugin_precache() 

    
precache_sound("misc/headshot.wav"
    
GREEN precache_model("sprites/killed/green.spr"


stock Set_Director_Hud_Message(red 0,green 160,blue 0,Float:= -1.0,Float:0.65,effects 2,Float:fxtime 6.0,Float:holdtime 3.0,Float:fadeintime 0.1,Float:fadeouttime 1.5,bool:reliable false

    
#define clamp_byte(%1) (clamp(%1,0,255)) 
    #define pack_color(%1,%2,%3) (%3 + (%2 << 8) + (%1 << 16)) 

    
D_color       pack_color(clamp_byte(red),clamp_byte(green),clamp_byte(blue)) 
    
D_x           _:
    D_y           
_:
    D_effect      
effects 
    D_fxtime      
_:fxtime 
    D_holdtime    
_:holdtime 
    D_fadeintime  
_:fadeintime 
    D_fadeouttime 
_:fadeouttime 
    D_reliable    
_:reliable 

    
return 


stock Show_Director_Hud_Message(index,const message[],any:...) 

    static 
buffer[128], playersList[32], numPlayers
    
numArgumentssize 

    numArguments 
numargs() 
    new Array:
handleArrayML ArrayCreate() 
    
size ArraySize(handleArrayML


    if(
numArguments == 2
    { 
        
Send_Director_Hud_Message(index,message
    } 
    else if(
index || numArguments == 3
    { 
        
vformat(buffer,charsmax(buffer),message,3
        
Send_Director_Hud_Message(index,buffer
    } 
    else 
    { 
        
get_players(playersList,numPlayers,"ch"

        if(!
numPlayers
        { 
            return 

        


        for(new 
2jnumArgumentsi++) 
        { 

            if(
getarg(i) == LANG_PLAYER
            { 
                while((
buffer[j] = getarg(1,j++))){} 
                


                
if(GetLangTransKey(buffer) != TransKey_Bad
                { 
                    
ArrayPushCell(handleArrayML,i++) 
                } 
            } 
        } 
        if(!
size
        { 
            
vformat(buffer,charsmax(buffer),message,3
            
Send_Director_Hud_Message(index,buffer
        } 
        else 
        { 
            for(new 
0,jnumPlayersi++) 
            { 
                
index playersList[i

                for(
0sizej++) 
                { 
                    
setarg(ArrayGetCell(handleArrayML,j),0,index
                } 
                
vformat(buffer,charsmax(buffer),message,3
                
Send_Director_Hud_Message(index,buffer
            } 
        } 
        
ArrayDestroy(handleArrayML
    } 
    return 



stock Send_Director_Hud_Message(const index, const message[]) 

    
message_begin(D_reliable ?(index MSG_ONE MSG_ALL) : (index MSG_ONE_UNRELIABLE MSG_BROADCAST),SVC_DIRECTOR,_,index
    { 
        
write_byte(strlen(message) + 31
        
write_byte(DRC_CMD_MESSAGE
        
write_byte(D_effect
        
write_long(D_color
        
write_long(D_x
        
write_long(D_y
        
write_long(D_fadeintime
        
write_long(D_fadeouttime
        
write_long(D_holdtime
        
write_long(D_fxtime
        
write_string(message
    } 
    
message_end() 

Superrr. Thanks.
Another request:


(victim,"HEAD SHOT" :-( Orange: Playername, Gray: Message.) ----> Showtime: 3 Sec.
(victim,"spk headcrap/hc_headbite.wav")

Can you do that?

Last edited by termra; 06-21-2017 at 18:00.
termra is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-22-2017 , 11:53   Re: Could you edit this plugin for me?
Reply With Quote #4

That's not possible, you can't use multiple colors in one HUD message.
__________________
edon1337 is offline
termra
Member
Join Date: Jun 2017
Old 06-22-2017 , 12:30   Re: Could you edit this plugin for me?
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
That's not possible, you can't use multiple colors in one HUD message.
(victim,"HEAD SHOT :-( Playername, Message.")
(victim,"spk headcrap/hc_headbite.wav")

This is it possible?

Last edited by termra; 06-22-2017 at 12:31.
termra is offline
Reply


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 08:00.


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