[Script] ECX Podium Hook

✔️ HL Verified
Oct 31, 2014
Best answers
In this case you can set anything to the Podium entities.
/*Put this file into "CCI\.Plugins" dir to compile*/
#include <amxx/amxmodx>
#include <amxx/fakemeta>
#include <amxx/engine>
#include <xtension/Class>

new PodiumEnt, LeftAvatarEnt, RightAvatarEnt, MiddleAvatarEnt
new LeftAura, RightAura
new bool: PodiumVisible[33]

public plugin_init()
	register_plugin("ESF: ECX Podium Hook", "1.0", "ESFKAMI");
	register_forward(FM_AddToFullPack, "fw_AddToFullPack_Post", true)

public @ClassCreation()
	PodiumEnt = find_ent_by_class(0, "corePodium")
	LeftAvatarEnt = find_ent_by_class(0, "coreAvatar")
	RightAvatarEnt = LeftAvatarEnt + 1
	MiddleAvatarEnt = LeftAvatarEnt + 2

	new Float: PodiumOrg[3], Float: LeftAuraOrg[3], Float: RightAuraOrg[3], Float: MiddleAuraOrg[3]
	pev(PodiumEnt, pev_origin, PodiumOrg)// get the origin of the podium entity
	pev(LeftAvatarEnt, pev_origin, LeftAuraOrg)// get origin for the left aura entity
	pev(RightAvatarEnt, pev_origin, RightAuraOrg)// get origin for the right aura entity
	pev(MiddleAvatarEnt, pev_origin, MiddleAuraOrg)// get the origin of the middle avatar entity

	set_pev(LeftAvatarEnt, pev_sequence, 2)// set sequence for the left avatar entity
	set_pev(RightAvatarEnt, pev_sequence, 2)// set sequence for the right avatar entity

	LeftAura = create_entity( "env_model" )// create the left aura entity
	engfunc( EngFunc_SetModel, LeftAura, "models/evolution/Auras/shape_01.mdl" )// set model
	entity_set_float(LeftAura, EV_FL_framerate, 1.0)// set framerate
	entity_set_int(LeftAura, EV_INT_sequence, 0)// set sequence
	set_pev( LeftAura, pev_classname, "LeftAuraEnt")// set class name
	set_pev( LeftAura, pev_skin, 3)// set skin
	set_pev( LeftAura, pev_scale, 0.25)// set scale
	set_pev( LeftAura, pev_origin , LeftAuraOrg)// set origin
	set_rendering( LeftAura, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 50 )// set render mode

	// same as above
	RightAura = create_entity( "env_model" )
	engfunc( EngFunc_SetModel, RightAura, "models/evolution/Auras/shape_06.mdl" )
	entity_set_float(RightAura, EV_FL_framerate, 1.0);
	entity_set_int(RightAura, EV_INT_sequence, 0)
	set_pev(RightAura, pev_classname, "RightAuraEnt")
	set_pev(RightAura, pev_skin, 5)
	set_pev(RightAura, pev_scale, 0.25)
	set_pev(RightAura, pev_origin , RightAuraOrg)
	set_rendering(RightAura, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 50 )

public fw_AddToFullPack_Post(ES_Handle, e, iEntity, iHost, iHostFlags, iPlayer, iSet)
		new szClassName[32]
		pev(iEntity, pev_classname, szClassName, 31)
		if(equal(szClassName, "coreAvatar")) // check if client is choosing characters
			if(get_es(ES_Handle, ES_ModelIndex) < 10)
				PodiumVisible[iHost] = false
				PodiumVisible[iHost] = true

		if(equal(szClassName, "LeftAuraEnt") || equal(szClassName, "RightAuraEnt"))// set whether the auras are visible
			if(!PodiumVisible[iHost])// if the Podium entity is invisible
				set_es(ES_Handle, ES_Effects, EF_NODRAW)// set the aura entity invisible to a single client

public plugin_precache()

Last edited:

Users who are viewing this thread