Raised This Month: $51 Target: $400
 12% 

[HNS] Demande de plugin


  
 
 
Thread Tools Display Modes
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 07-05-2012 , 13:50   Re: [HNS] Demande de plugin
#21

Ton sound c'est un mp3 ou un wav ?
__________________
You can do anything you set your mind to, man.

Devil259 is offline
P0u$$!n
Senior Member
Join Date: Sep 2009
Old 07-06-2012 , 07:05   Re: [HNS] Demande de plugin
#22

C'est un .wav
__________________
- -- - -- - -- - -- - -- - -- - --
¤ Team du Soleil ¤
- -- - -- - -- - -- - -- - -- - --

- -- - -- - -- - -- - -- - -- - --
Tous les IP de nos SERVEURS sur:
WWW.TEAMDUSOLEIL.FR
P0u$$!n is offline
P0u$$!n
Senior Member
Join Date: Sep 2009
Old 07-15-2012 , 04:42   Re: [HNS] Demande de plugin
#23

Re UP, il ne me manque plus que le son
__________________
- -- - -- - -- - -- - -- - -- - --
¤ Team du Soleil ¤
- -- - -- - -- - -- - -- - -- - --

- -- - -- - -- - -- - -- - -- - --
Tous les IP de nos SERVEURS sur:
WWW.TEAMDUSOLEIL.FR
P0u$$!n is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-15-2012 , 05:01   Re: [HNS] Demande de plugin
#24

Le code est vraiment dégueu, jvais faire une version debug si tu veux
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
P0u$$!n
Senior Member
Join Date: Sep 2009
Old 07-15-2012 , 05:27   Re: [HNS] Demande de plugin
#25

ok c'est gentil =)
__________________
- -- - -- - -- - -- - -- - -- - --
¤ Team du Soleil ¤
- -- - -- - -- - -- - -- - -- - --

- -- - -- - -- - -- - -- - -- - --
Tous les IP de nos SERVEURS sur:
WWW.TEAMDUSOLEIL.FR
P0u$$!n is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-15-2012 , 06:08   Re: [HNS] Demande de plugin
#26

Essaie déjà ça, c'est écrit autrement :

Edit
Faudra surement remonter amx_headsplash_min_velocity à 300 ou 400 ou 500 (sachant que 250 c'est la vitesse d'un mec qui court).
J'utilise la formule qui détermine les dégâts qu'un joueur prend en tombant, et dans cette formule, l'équivalent de cette cvar est à 500.
/ Edit

PHP Code:
#include <amxmodx>
#include <fakemeta_stocks>
#include <hamsandwich>
#include <xs>

// plugin
#include <chatcolor>

// rage module
// #include <colorchat>

new const HEADSPLASH_PAIN_SOUND[] = "misc/own.wav"

#define VERSION "0.1.5"
#define PLUGIN "Head Splash"

new g_iMaxPlayers
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )

#define        m_LastHitGroup    75
#define        m_iTeam                114
#define        m_flFallVelocity        251

#define BLOOD_COLOR_RED 247

new g_pCvarMinFallVelocity
new mp_friendlyfire
new g_sModelIndexBloodSprayg_sModelIndexBloodDrop

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_dictionary_colored("headsplash.txt")

    
g_iMaxPlayers get_maxplayers()
    
mp_friendlyfire get_cvar_pointer("mp_friendlyfire")
    
g_pCvarMinFallVelocity register_cvar("amx_headsplash_min_velocity""100")
    
g_sModelIndexBloodSpray EF_PrecacheModel("sprites/bloodspray.spr"// initial blood
    
g_sModelIndexBloodDrop EF_PrecacheModel("sprites/blood.spr"// splattered blood 

    
RegisterHam(Ham_Touch"player""OnCBasePlayer_Touch")
}

public 
plugin_precache()
{
    
precache_soundHEADSPLASH_PAIN_SOUND )
}

public 
OnCBasePlayer_TouchidiOther )
{
    if( 
IsPlayeriOther ) && pev(iOtherpev_groundentity) == id )
    {
        static 
bool:TK
        TK 
get_pdata_int(id,m_iTeam) == get_pdata_int(iOther,m_iTeam )
        if( 
TK && !get_pcvar_num(mp_friendlyfire) )
        {
            return 
HAM_IGNORED
        
}
        new 
Float:flFallVelocity get_pdata_float(iOtherm_flFallVelocity)
        new 
Float:flMaxSafeFallSpeed get_pcvar_float(g_pCvarMinFallVelocity)
        if( 
flFallVelocity flMaxSafeFallSpeed )
        {
            
flFallVelocity -= flMaxSafeFallSpeed
            
new Float:flDamage flFallVelocity 100.0 / ( 980.0 flMaxSafeFallSpeed )
            if( 
TK )
            {
                
flDamage *= 0.35
            
}

            new 
Float:origin[3]
            
pev(idpev_originorigin)
            
origin[2] += pev(idpev_flags) & FL_DUCKING 12.0 17.0
            
new Float:vecAttackerOrigin[3], Float:direction[3]
            
pev(iOtherpev_originvecAttackerOrigin)
            
xs_vec_sub(vecAttackerOriginorigindirection)
            
xs_vec_normalize(directiondirection)

            
UTIL_BloodDrips(originBLOOD_COLOR_REDfloatround(flDamagefloatround_ceil) )

            new 
ptr create_tr2()
            
engfunc(EngFunc_TraceLinevecAttackerOriginoriginDONT_IGNORE_MONSTERSiOtherptr)
            
ExecuteHam(Ham_TraceBleedidflDamagedirectionptrDMG_BULLET)
            
free_tr2(ptr)

            
set_pdata_int(idm_LastHitGroupHIT_HEAD)
            static 
iszFeet 0iszInfoTarget 0
            
if( !iszFeet )
            {
                
iszFeet engfunc(EngFunc_AllocString"feet")
            }
            if( !
iszInfoTarget )
            {
                
iszInfoTarget engfunc(EngFunc_AllocString"info_target")
            }
            new 
ent engfunc(EngFunc_CreateNamedEntityiszInfoTarget)
            
set_pev_string(entpev_classnameiszInfoTarget)
            
set_pev(entpev_owneriOther)
            
ExecuteHam(Ham_TakeDamageidentiOtherflDamageDMG_FALL)
            
emit_sound(idCHAN_ITEMHEADSPLASH_PAIN_SOUNDVOL_NORMATTN_NORM0PITCH_NORM)
            if( !
is_user_alive(id) )
            {
                new 
szKillerName[32], szAttackerName[32]
                
get_user_name(iOtherszKillerNamecharsmax(szKillerName))
                
get_user_name(idszAttackerNamecharsmax(szAttackerName))
                
client_print_color(0DontChange"%L"LANG_PLAYER"HEADSPLASH_KILL_MSG"szKillerNameszAttackerName)
            }
            return 
HAM_HANDLED
        
}
    }
    return 
HAM_IGNORED
}

UTIL_BloodDripsFloat:origin[3], coloramount )
{
    
amount *= 2;
    if( 
amount 16 )
    {
        
amount 16
    
}
    else if( 
amount 255 )
    {
        
amount 255
    
}

    
MessageBeginMSG_PVSSVC_TEMPENTITYorigin )
    {
        
write_byteTE_BLOODSPRITE )
        
EF_WriteCoordorigin[0] )                                // pos
        
EF_WriteCoordorigin[1] )
        
EF_WriteCoordorigin[2] )
        
write_shortg_sModelIndexBloodSpray )                // initial sprite model
        
write_shortg_sModelIndexBloodDrop )                // droplet sprite models
        
write_bytecolor )                                // color index into host_basepal
        
write_byteamount )        // size
    
}
    
message_end()
}

MessageBegin(destmsg_type, const Float:vecOrigin[3] = {0.0,0.0,0.0}, player=0)
{
    
engfunc(EngFunc_MessageBegindestmsg_typevecOriginplayer)

Attached Files
File Type: sma Get Plugin or Get Source (head_splash.sma - 272 views - 4.1 KB)
File Type: txt headsplash.txt (120 Bytes, 70 views)
File Type: zip own.zip (53.5 KB, 49 views)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-19-2012 at 17:09.
ConnorMcLeod is offline
P0u$$!n
Senior Member
Join Date: Sep 2009
Old 07-15-2012 , 14:34   Re: [HNS] Demande de plugin
#27

Je viens de tester ton plugin et il marche nikel avec la cvar réglée à "200".

Le petit problème c'est que quand on tue le mec, sa met en arme de kill l'arme qu'il tient dans sa main et non la tête de mort de l'ancien plugin. Du coup les autres personnes du serveur ne savent que la personne c'est fait tuer avec les pieds.

Sinon tout marche nikel il ne manque plus que le son quand il le tue et les phrases en couleurs comme sur celui de Devil
__________________
- -- - -- - -- - -- - -- - -- - --
¤ Team du Soleil ¤
- -- - -- - -- - -- - -- - -- - --

- -- - -- - -- - -- - -- - -- - --
Tous les IP de nos SERVEURS sur:
WWW.TEAMDUSOLEIL.FR

Last edited by P0u$$!n; 07-15-2012 at 14:34.
P0u$$!n is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-15-2012 , 15:33   Re: [HNS] Demande de plugin
#28

On progresse alors, le code est beaucoup mieux que celui qu'avait utilisé devil.
J'ai changé un truc tu devrais voir la tête de mort normalement et dans la console ça devrait écrire "feet" (pieds) à la place du nom de l'arme.

Je verrai pour le son et la phrase, as-tu installé mon plugin ou mon module colorchat ? (si oui lequel ?).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
P0u$$!n
Senior Member
Join Date: Sep 2009
Old 07-15-2012 , 15:47   Re: [HNS] Demande de plugin
#29

Ok je vais tester ça, sinon j'ai ton module colorchat.inc avec ton plugin colorchat.amxx normalement si c'est bien de ça que tu parle.

EDIT: Je vien de tester le plugin mais il a fait crash le serveur dés que je suis tombé sur sa tête.

Voici les logs:

Quote:
L 07/15/2012 - 21:54:45: Info (map "awp_rooftops") (file "addons/amxmodx/logs/error_20120715.log")
L 07/15/2012 - 21:54:45: [AMXX] Plugin file open error (plugin "Anty_Kzh.am")
L 07/15/2012 - 21:54:45: Function "topten_show" was not found
L 07/15/2012 - 21:54:45: [AMXX] Displaying debug trace (plugin "prokreedz.amxx")
L 07/15/2012 - 21:54:45: [AMXX] Run time error 19: function not found
L 07/15/2012 - 21:54:45: [AMXX] [0] prokreedz.sma::plugin_init (line 135)
L 07/15/2012 - 21:56:53: Start of error session.
Je pense pas que ça est un rapport mais je les met quand même.
__________________
- -- - -- - -- - -- - -- - -- - --
¤ Team du Soleil ¤
- -- - -- - -- - -- - -- - -- - --

- -- - -- - -- - -- - -- - -- - --
Tous les IP de nos SERVEURS sur:
WWW.TEAMDUSOLEIL.FR

Last edited by P0u$$!n; 07-15-2012 at 16:05.
P0u$$!n is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-15-2012 , 16:44   Re: [HNS] Demande de plugin
#30

J'avais fait une grosse erreur, ceci dit les erreurs que tu montres n'ont absolument rien à voir.
Code édité.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 07:02.


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