AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   player attack blood scale (https://forums.alliedmods.net/showthread.php?t=208669)

11922911 02-16-2013 08:59

player attack blood scale
 
is it possible to modify player attack blood scale without create new TE_BLOOD message?

sorry for my bad english

ConnorMcLeod 02-16-2013 09:09

Re: player attack blood scale
 
The only blood message with a scale argument is TE_BLOODSPRITE but i don't think it is used anywhere.

11922911 02-16-2013 09:18

Re: player attack blood scale
 
So, it's not possiable?

ConnorMcLeod 02-16-2013 09:38

Re: player attack blood scale
 
In fact it is used, try this :

PHP Code:

#include <amxmodx>

#define PLUGIN "Blood size changer"
#define VERSION "0.0.1"

new g_pCvarFactorg_pCvarMing_pCvarMax

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )

    
g_pCvarFactor register_cvar("amx_blood_size_factor""1.5"// game default = 1
    
g_pCvarMin register_cvar("amx_blood_size_min""6"// game default = 3
    
g_pCvarMax register_cvar("amx_blood_size""24"// game default = 16

    
register_message(SVC_TEMPENTITY"Message_TempEntity")
}

public 
Message_TempEntity(iMsgIdiMsgDestid)
{
    if( !
id && iMsgDest == MSG_PVS && get_msg_arg_int(1) == TE_BLOODSPRITE )
    {
        
set_msg_arg_int
        
(
            
8
            
ARG_BYTE
            
clamp
            
(
                
floatroundget_pcvar_float(g_pCvarFactor) * get_msg_arg_int(8) ), 
                
clamp(get_pcvar_num(g_pCvarMin), 0255), 
                
clamp(get_pcvar_num(g_pCvarMax), 0255)
            )
        )
    }



11922911 02-16-2013 10:05

Re: player attack blood scale
 
Thank you ConnorMcLeod, i will try


All times are GMT -4. The time now is 21:38.

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