|
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
|
05-25-2011
, 23:43
Re: [EXTENSION] Weapon Model
|
#70
|
This is from Andersso:
Quote:
#include <sourcemod>
#pragma semicolon 1
new g_iWorldModel;
public OnMapStart()
{
g_iWorldModel = PrecacheModel("models/weapons/w_crowbar.mdl", true);
}
public Action:OnPlayerRunCmd(iClient, &iButtons, &Impulse, Float:fVelocity[3], Float:fAngles[3], &iWeapon)
{
new iActiveWeapon = GetEntPropEnt(iClient, Prop_Data, "m_hActiveWeapon");
if (iActiveWeapon != -1)
{
decl String:sWeapon[64];
GetEdictClassname(iActiveWeapon, sWeapon, sizeof(sWeapon));
if (StrEqual(sWeapon, "weapon_knife"))
{
SetEntProp(iActiveWeapon, Prop_Send, "m_iWorldModelIndex", g_iWorldModel);
}
}
}
|
This only replaces the Worldmodel!!!
__________________
|
|
|
|