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

Request plugin death effect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jerkofici
Junior Member
Join Date: Feb 2023
Old 05-07-2023 , 11:08   Request plugin death effect
Reply With Quote #1

Hello everybody !!

Sorry for taking from your time but I am looking for a plugin for cs 1.6 server (amx vers 1.9) that looks like this :

Soul / spirit leave body when player get killed .

https://vm.tiktok.com/ZGJuJEyoR/

I do not want to make advertising or something but i saw this on TikTok and I did not find the plugin .

Do somebody can help me with a source code / model / plugin ?

Thanks a lot !
jerkofici is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 05-07-2023 , 18:24   Re: Request plugin death effect
Reply With Quote #2

you have the sprite
__________________
mlibre is offline
jerkofici
Junior Member
Join Date: Feb 2023
Old 05-08-2023 , 11:52   Re: Request plugin death effect
Reply With Quote #3

Quote:
Originally Posted by mlibre View Post
you have the sprite
Hello...no...i do not have nothing...
jerkofici is offline
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 05-08-2023 , 14:19   Re: Request plugin death effect
Reply With Quote #4

https://dev-cs.ru/resources/899/
__________________
Siska1 is offline
Send a message via Skype™ to Siska1
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 05-08-2023 , 18:24   Re: Request plugin death effect
Reply With Quote #5

Quote:
Originally Posted by jerkofici View Post
Hello everybody !!

Sorry for taking from your time but I am looking for a plugin for cs 1.6 server (amx vers 1.9) that looks like this :

Soul / spirit leave body when player get killed .

https://vm.tiktok.com/ZGJuJEyoR/

I do not want to make advertising or something but i saw this on TikTok and I did not find the plugin .

Do somebody can help me with a source code / model / plugin ?

Thanks a lot !
I tried to recreate what was seen in the video, this was the closest I could get it
  1. First way, its behavior is the same but with another simpler methodology

    PHP Code:
    #include <amxmodx>
    #include <hamsandwich>
    #include <engine>

    #define PLUGIN "Player Soul"
    #define VERSION "1.3"
    #define AUTHOR "mlibre"

    new g_soulSprg_iCvarScreenFadeg_iCvarFloatHeight

    public plugin_precache() {
        
    register_plugin(PLUGINVERSIONAUTHOR)
        
        
    g_iCvarScreenFade register_cvar("amx_psoul_screenfade""1")
        
    g_iCvarFloatHeight register_cvar("amx_psoul_floatheight""180")
        
        
    g_soulSpr precache_model("sprites/iplayerdead.spr")
        
        
    RegisterHam(Ham_Killed"player""Ham_KilledPlayer_Post"1)
    }

    public 
    Ham_KilledPlayer_Post(idattacker)
    {
        
    //green effects
        
    if(get_pcvar_num(g_iCvarScreenFade))
        {
            
    set_ScreenFade(attacker)
        }
        
        
    //generate the soul
        
    new Float:fOrigin[3]; entity_get_vector(idEV_VEC_originfOrigin)
        
        
    message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
    write_byte(TE_BUBBLES)
        
    #if !defined write_coord_f
        
    write_coord(floatround(fOrigin[0]))
        
    write_coord(floatround(fOrigin[1]))
        
    write_coord(floatround(fOrigin[2]))    //min start position
        
    write_coord(floatround(fOrigin[0]))
        
    write_coord(floatround(fOrigin[1]))
        
    write_coord(floatround(fOrigin[2])+10)    //max start position
        #else
        
    write_coord_f(fOrigin[0])
        
    write_coord_f(fOrigin[1])
        
    write_coord_f(fOrigin[2])        //min start position
        
    write_coord_f(fOrigin[0])
        
    write_coord_f(fOrigin[1])
        
    write_coord_f(fOrigin[2]+10)        //max start position
        #endif
        
    write_coord(get_pcvar_num(g_iCvarFloatHeight))    //float height
        
    write_short(g_soulSpr)
        
    write_byte(1)        //count
        
    write_coord(1)        //speed
        
    message_end()
    }

    stock set_ScreenFade(id)
    {
        static 
    maxplayers
        
        
    if( !maxplayers )
            
    maxplayers get_maxplayers()
            
        
    #define isPlayer(%1)    (1 <= %1 <= maxplayers)
        
        
    if( !isPlayer(id) )
            return
        
        static 
    msgid_ScreenFade
        
        
    if( !msgid_ScreenFade )
            
    msgid_ScreenFade get_user_msgid("ScreenFade")
        
        
    message_begin(MSG_ONE_UNRELIABLEmsgid_ScreenFade, {0,0,0}, id)
        
    write_short(1<<10)    // Duration
        
    write_short(1<<10)    // Hold time
        
    write_short(0x0000)    // Fade type
        
    write_byte(120)    // Red
        
    write_byte(255)    // Green
        
    write_byte(120)    // Blue
        
    write_byte(100)    // Alpha
        
    message_end()

    changelog 1.x
  2. The second way is the one that fits the most, as you can see I did not use a sprite but the same player models that do not require precaching

    PHP Code:
    #include <amxmodx>
    #include <hamsandwich>
    #include <engine>

    #define PLUGIN "Player Soul"
    #define VERSION "2.3"
    #define AUTHOR "mlibre"

    new g_iCvarScreenFadeg_fCvarTransparencyg_fCvarVelocity

    public plugin_init() {
        
    register_plugin(PLUGINVERSIONAUTHOR)
        
        
    g_iCvarScreenFade register_cvar("amx_psoul_screenfade""1")
        
    g_fCvarTransparency register_cvar("amx_psoul_transparency""50.0")
        
    g_fCvarVelocity register_cvar("amx_psoul_velocity""80.0")
        
        
    RegisterHam(Ham_Killed"player""Ham_KilledPlayer_Post"1)
    }

    public 
    Ham_KilledPlayer_Post(idattacker)
    {
        
    //green effects
        
    if(get_pcvar_num(g_iCvarScreenFade))
        {
            
    set_ScreenFade(attacker)
        }
        
        
    //generate the soul
        
    new ent create_entity("info_target")
        
        if( !
    ent )
            return
            
        
    entity_set_string(entEV_SZ_classname"s0ul")
        
    entity_set_int(entEV_INT_movetypeMOVETYPE_NOCLIP)
        
    entity_set_int(entEV_INT_solidSOLID_NOT)
        
        new 
    szInfo[64]; get_user_info(id"model"szInfocharsmax(szInfo))
        
        new 
    szModel[256]; formatex(szModelcharsmax(szModel), "models/player/%s/%s.mdl"szInfoszInfo)
        
        
    //antiCrash!
        
    if(szModel[strlen(szModel) - 4] == '.' 
        
    && szModel[strlen(szModel) - 3] == 'm'
        
    && szModel[strlen(szModel) - 2] == 'd'
        
    && szModel[strlen(szModel) - 1] == 'l')
        {
            
    entity_set_model(entszModel)
        }
        else 
        {
            
    log_amx("%s *** overflow!"szModel)
            
            
    entity_set_model(ent"models/player.mdl")
        }
        
        
    entity_set_int(entEV_INT_sequence64)    // set player body =--()--=
        
    entity_set_float(entEV_FL_frame0.0)
        
        new 
    Float:fOrigin[3]; entity_get_vector(idEV_VEC_originfOrigin)
        
        
    fOrigin[2] += 10.0
        
        entity_set_origin
    (entfOrigin)
        
        
    // effect soul
        
    entity_set_int(entEV_INT_renderfxkRenderFxGlowShell)
        
    entity_set_int(entEV_INT_rendermodekRenderTransAlpha)
        
    entity_set_float(entEV_FL_renderamtget_pcvar_float(g_fCvarTransparency))
        
        
    // apply motion
        
    new Float:fVelocity[3]
        
        
    fVelocity[2] = get_pcvar_float(g_fCvarVelocity)
        
        
    entity_set_vector(entEV_VEC_velocityfVelocity)
        
        
    set_task(3.0"remove_s0ul"ent)
    }

    public 
    remove_s0ul(ent)
    {
        if(
    is_valid_ent(ent))
            
    entity_set_int(entEV_INT_flagsFL_KILLME)
    }

    stock set_ScreenFade(id)
    {
        static 
    maxplayers
        
        
    if( !maxplayers )
            
    maxplayers get_maxplayers()
            
        
    #define isPlayer(%1)    (1 <= %1 <= maxplayers)
        
        
    if( !isPlayer(id) )
            return
        
        static 
    msgid_ScreenFade
        
        
    if( !msgid_ScreenFade )
            
    msgid_ScreenFade get_user_msgid("ScreenFade")
        
        
    message_begin(MSG_ONE_UNRELIABLEmsgid_ScreenFade, {0,0,0}, id)
        
    write_short(1<<10)    // Duration
        
    write_short(1<<10)    // Hold time
        
    write_short(0x0000)    // Fade type
        
    write_byte(120)    // Red
        
    write_byte(255)    // Green
        
    write_byte(120)    // Blue
        
    write_byte(100)    // Alpha
        
    message_end()

    changelog 2.x
__________________

Last edited by mlibre; 03-02-2024 at 08:50. Reason: releases 1.3&2.3
mlibre is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 05-09-2023 , 03:59   Re: Request plugin death effect
Reply With Quote #6

This is my version that required regamedll + reapi

code
Attached Files
File Type: sma Get Plugin or Get Source (amxx_ghostdeath.sma - 66 views - 1.9 KB)
metal_upa is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-09-2023 , 12:34   Re: Request plugin death effect
Reply With Quote #7

Quote:
Originally Posted by mlibre View Post
you have the sprite
It's ghost.mdl; player skin for Half-Life: Opposing Force.
Attached Files
File Type: zip ghost.zip (140.8 KB, 117 views)
__________________
DJEarthQuake is offline
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 03:41.


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