Raised This Month: $ Target: $400
 0% 

add a model and a team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Joker2020
Junior Member
Join Date: Aug 2020
Old 08-26-2020 , 14:45   add a model and a team
Reply With Quote #1

good day to all) can I please add to this plugin the output of the model and that the plugin would work on the command /hed
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

const m_LastHitGroup = 75;

public plugin_init() 
{
    RegisterHam( Ham_TakeDamage , "player" , "HamTakeDamage" );
}

public HamTakeDamage( victim , inflictor , attacker , Float:fDamage , bitDamage ) 
{     
    return ( get_pdata_int( victim , m_LastHitGroup ) == HIT_HEAD ) ? HAM_IGNORED : HAM_SUPERCEDE;
}
Joker2020 is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-26-2020 , 15:33   Re: add a model and a team
Reply With Quote #2

Yes you can add them, just try it out and post here your code after you've done it.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Joker2020
Junior Member
Join Date: Aug 2020
Old 08-26-2020 , 15:49   Re: add a model and a team
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Yes you can add them, just try it out and post here your code after you've done it.
I don't have any special knowledge
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#define BONUS_ROUNDS 1 //valid for 1 round

const m_LastHitGroup = 75;

new g_NextRoundHed[33]

public plugin_init() 
{
    RegisterHam( Ham_TakeDamage , "player" , "HamTakeDamage" );
    register_clcmd("say /hed", "hed_command");
    register_clcmd("say_team /hed", "hed_command");
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawn");
    register_forward(FM_SetModel, "FM_SetModel_Hook", 1);
}

public plugin_precache() {
    precache_model("models/deadpools.mdl")
}

public hed_command(iPlayer) {
		g_NextRoundHed[iPlayer] = BONUS_ROUNDS
}

public fwHamPlayerSpawn( const player ) {
        if( !pev_valid( iEnt ) ) {
            engfunc( EngFunc_SetModel, iEnt, "models/deadpools.mdl" )
        }
}

public FM_SetModel_Hook(iEnt, szModel[])
{
	if (pev_valid(iEnt) && equal(szModel, "models/deadpools.mdl"))
}

public HamTakeDamage( victim , inflictor , attacker , Float:fDamage , bitDamage ) 
{     
    return ( get_pdata_int( victim , m_LastHitGroup ) == HIT_HEAD ) ? HAM_IGNORED : HAM_SUPERCEDE;
}

Last edited by Joker2020; 08-26-2020 at 16:02.
Joker2020 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 13:52.


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