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

Super Headshot


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 11-22-2013 , 09:51   Super Headshot
Reply With Quote #1

Super Headshot

Description:
This plugin explode player head in Headshot moment, only if victim without Helmet (VestHelm) and killed with this weapons: AWP, DEAGLE, M3, XM1014, SCOUT, G3SG1, CSW_SG550.

Video:


Remark:
Ofcourse, this plugin requires not default players models (replacement), and they done in old CS 1.6 style (not CS:CZ).
Update: players models in CS:CZ style avaliable too, you can download it here (attention on models names, this requires change (like in source code of plugin, "terror_shs.mdl", "sas_shs", etc.).

Thanks to:
  • Mr.Jeff for great models of this plugin.
  • ConnorMcLeod for help with code of setting players models.

Changelog:
  • 1.0 — Release.


Attached Files
File Type: zip models_part_1.zip (4.40 MB, 1068 views)
File Type: zip models_part_2.zip (4.55 MB, 873 views)
File Type: zip models_part_3.zip (4.51 MB, 823 views)
File Type: sma Get Plugin or Get Source (shs.sma - 1816 views - 3.9 KB)

Last edited by Phant; 11-23-2013 at 02:34.
Phant is offline
Send a message via ICQ to Phant
Gasa
Senior Member
Join Date: Sep 2013
Old 11-22-2013 , 09:59   Re: Super Headshot
Reply With Quote #2

ROFL
Gasa is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-22-2013 , 10:29   Re: Super Headshot
Reply With Quote #3

Good job. I also had such an idea, originally from the blood patch of GTA Vice City. I knew there were some exploding player models around and thought you managed todo it without the need of new models.

Anyway, good job!
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 11-22-2013 , 10:38   Re: Super Headshot
Reply With Quote #4

will be cool for ZP
LordOfNothing is offline
PoLiCe
Senior Member
Join Date: Apr 2013
Location: Xen™
Old 11-22-2013 , 11:00   Re: Super Headshot
Reply With Quote #5

LOL, cool plugin! but each model is 4Mb.. thats bad for peoples without FastDL it will take ages for them to download the models from the server. but anyways..
Great plugin + Gj!@
__________________
PoLiCe is offline
Send a message via MSN to PoLiCe Send a message via Skype™ to PoLiCe
bat
Veteran Member
Join Date: Jul 2012
Old 11-22-2013 , 11:23   Re: Super Headshot
Reply With Quote #6

Haha, Good job
__________________
bat is offline
Send a message via Skype™ to bat
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2013 , 17:56   Re: Super Headshot
Reply With Quote #7

You could use a Trie to simplify the code in SetClientKeyValue callback.
Please use TE_BREAKMODEL constant for readability.
I'm not sure, but i think that when players loose all their armor, armortype stay as it was untill next spawn, so may be you could check if cs_get_user_armor return value is not null.
I think you should use MSG_PAS (or PSV but PAS is a bit larger) instead of BROADCAST.

Other than those littles adjustments, code looks fine.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 11-23-2013 , 02:23   Re: Super Headshot
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
You could use a Trie to simplify the code in SetClientKeyValue callback.
I have no idea how to do it .

Quote:
Originally Posted by ConnorMcLeod View Post
Please use TE_BREAKMODEL constant for readability.
Done.

Quote:
Originally Posted by ConnorMcLeod View Post
I'm not sure, but i think that when players loose all their armor, armortype stay as it was untill next spawn, so may be you could check if cs_get_user_armor return value is not null.
I try:
PHP Code:
if(cs_get_user_armor(victimarmor) != 0
PHP Code:
if(cs_get_user_armor(victimarmor) == 0
Work not correct.
NULL — undefined symbol .

Quote:
Originally Posted by ConnorMcLeod View Post
I think you should use MSG_PAS (or PSV but PAS is a bit larger) instead of BROADCAST.
I try MSG_BROADCAST replace on MSG_PAS — does not work. Head parts not spawned. Or I will change bytes (data) "structure"?

PS:
Code little updated. Also, Mr.Jeff make models for this plugin in CS:CZ style, you can download it here.
Right now I have no possibility to upload it hither!

Last edited by Phant; 11-23-2013 at 02:30.
Phant is offline
Send a message via ICQ to Phant
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-25-2013 , 02:41   Re: Super Headshot
Reply With Quote #9

1. globals :
PHP Code:
new Trie:g_tModels 
plugin_init
PHP Code:
    // see cstrike.inc CsInternalModel (cs_set_user_team and cs_get_user_team)
    // this is the same order that pdata internal model, but for your plugin you could remove the empty first cell
    
new const szDefaultModels[][] = {"""urban""terror""leet""arctic""gsg9"
                    
"gign""sas""guerilla""vip""militia""spetsnaz" }; 
    
g_tModels TrieCreate()
    new 
szNewModel[16]
    for(new 
i=1i<sizeof(szDefaultModels) - 2i++) // remove that - 2 if you support those CZ extra models
    
{
        
formatex(szNewModel"%s_shs"szDefaultModels[i])
        
TrieSetString(g_tModelsszDefaultModels[i], szNewModel)
    } 
code
PHP Code:
// public set_model(const id, const szSetModel[])
// {
    // new szModel[16]
    // get_user_info(id, "model", szModel, charsmax(szModel))
    // if(!equal(szModel, szSetModel))
    // {
        // set_user_info(id, "model", szSetModel)
    // }
    // return FMRES_SUPERCEDE
// }

public SetClientKeyValue(const id, const szInfoBuffer[], const szKey[], const szValue[])
{
    
// when you need a string more than 1 time, better to declare it in a variable (global if you need it in more than 1 function, static if you need it in only 1 function)
    
static const model[] = "model"

    
static szNewModel[16]
    if( 
equal(szKeymodel) && TrieGetString(g_tModelsszValueszNewModelcharsmax(szNewModel)) )
    {
        new 
szModel[16]
        
get_user_info(idmodelszModelcharsmax(szModel))
        if( !
equal(szModelszNewModel) )
        {
            
set_user_info(idmodelszNewModel)
        }
        return 
FMRES_SUPERCEDE
        
// if(equal(szValue, "arctic"))
        // {
            // return set_model(id, "arctic_shs")
        // } else if(equal(szValue, "gign")) {
            // return set_model(id, "gign_shs")
        // } else if(equal(szValue, "gsg9")) {
            // return set_model(id, "gsg9_shs")
        // } else if(equal(szValue, "guerilla")) {
            // return set_model(id, "guerilla_shs")
        // } else if(equal(szValue, "leet")) {
            // return set_model(id, "leet_shs")
        // } else if(equal(szValue, "sas")) {
            // return set_model(id, "sas_shs")
        // } else if(equal(szValue, "terror")) {
            // return set_model(id, "terror_shs")
        // } else if(equal(szValue, "urban")) {
            // return set_model(id, "urban_shs")
        // } else if(equal(szValue, "vip")) {
            // return set_model(id, "vip_shs")
        
}
    }
    return 
FMRES_IGNORED

2. Code is correct, you may have missed something else

3. With PAS (and PSV) you have to pass an origin to message_begin or EngFunc_MessageBegin (1st ir int origin, 2nd is Float origin
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-25-2013 at 02:42.
ConnorMcLeod is offline
alencore
Senior Member
Join Date: Oct 2011
Old 12-01-2013 , 10:38   Re: Super Headshot
Reply With Quote #10

That's now literally some super bloody headshots....COOL!
alencore 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 23:26.


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