Quote:
Originally Posted by xerox8521
You probably need to create the ability first with CreateEntityByName.
Those are the abilities used by the game:
- ability_tongue
- ability_selfdestruct // Boomer Exploding
- ability_vomit // Actual boomer vomit
- ability_lunge // Hunter Pounce
- ability_spit
- ability_leap // Jockey Leap
- ability_charge
- ability_throw
Once created you can set them with SetEntPropEnt(client, Prop_Send, "m_customAbility", ability);
Not sure if you need to set more but this should do.
|
Thanks, didn't seem to work from my test though (still can't charge with the charger claw weapon), here is what i tried:
PHP Code:
int wp_index = GivePlayerItem(client, "weapon_charger_claw");
if (wp_index == -1 || !IsValidEntity(wp_index))
return;
EquipPlayerWeapon(client, wp_index);
int ability = CreateEntityByName("ability_charge");
if (ability != -1)
{
DispatchSpawn(ability);
SetEntPropEnt(ability, Prop_Data, "m_hOwnerEntity", client);
SetEntPropEnt(client, Prop_Send, "m_customAbility", ability);
}