|
Great Tester of Whatever
|
10-20-2020
, 03:03
Re: [L4D2] Survivors with Special Infected Weapons?
|
#4
|
Perhaps, in order for some abilities to work, you still need to change the player model ( in particular, for the tank's ability )
PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#define VIRTUAL 205 /* 206 is for linux */
public void OnPluginStart()
{
RegConsoleCmd ("awd", awd);
}
public Action awd (int a1, int a2)
{
int ability = Ability (a1, "ability_charge");
}
int Ability (int client, const char[] name)
{
int entity = CreateEntityByName(name);
DispatchSpawn(entity);
static Handle hCall;
if ( !hCall )
{
StartPrepSDKCall(SDKCall_Entity);
PrepSDKCall_AddParameter(SDKType_CBasePlayer, SDKPass_Pointer);
PrepSDKCall_SetAddress (view_as<Address>(LoadFromAddress(view_as<Address>(LoadFromAddress(GetEntityAddress(entity), NumberType_Int32) + VIRTUAL * 4), NumberType_Int32)));
hCall = EndPrepSDKCall();
}
SetEntPropEnt(client, Prop_Send, "m_customAbility", entity);
SDKCall(hCall, entity, client);
return entity;
}
__________________
|
|
|
|