View Single Post
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 05-25-2011 , 23:43   Re: [EXTENSION] Weapon Model
Reply With Quote #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!!!
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline