Raised This Month: $51 Target: $400
 12% 

[EXTENSION] Weapon Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raydan
Senior Member
Join Date: Aug 2006
Old 08-31-2008 , 00:38   [EXTENSION] Weapon Model
Reply With Quote #1

Weapon Model
v1.0.1.0

Description:
This plugin allows you to modify single weapon entity model in server side.
but it only work on using weapon. if hooked weapon drop, the weapon model still is original one (may be we can fix it in the future). And change player movement speed.

Natives:
Code:
native WeaponModel_Hook(entity, const String:model[]);
native WeaponModel_UnHook(entity);
native bool:WeaponModel_IsHooked(entity);
native WeaponModel_SetModel(entity, const String:model[]);
native WeaponModel_HookPlayerSpeed(client, Float:speed);
native WeaponModel_UnHookPlayerSpeed(client);
native WeaponModel_SetPlayerSpeed(client, Float:speed);
native bool:WeaponModel_IsPlayerHooked(client);
Known Bugs:
silenced m4a1, usp show original model.
css all grenade thrown model show original model.
set speed doesn't work on orange box

Support:
CSS, DOD, TF2, HL2MP

Tested & Work:
CSS




Changelog:
  • v1.0.0.0
public release.
added linux version.
  • v1.0.1.0
added change player speed. (like css zombie mod)
update weaponmodel_test.sp with change player speed example.

  • v1.0.1.1
fix gamedata/weaponmodel.txt "Signatures" format & update "SetMaxSpeed" signatures

Updates:
Sep. 3, 2008:
fixed file name misspelling , weaponhmodel_ext.so -> weaponmodel.ext.so
Sep. 29, 2008:
add some code in weaponmode_test.sp to prevent client side lag while loading the model in game.
[IMG]http://img241.**************/img241/2919/weaponmodelyz3.jpg[/IMG]
Attached Files
File Type: rar knife_model.rar (414.2 KB, 1685 views)
File Type: rar weaponmodel_source.rar (34.1 KB, 1827 views)
File Type: sp Get Plugin or Get Source (weaponmodel_test.sp - 2123 views - 2.8 KB)
File Type: rar weaponmodel_1_0_1_1.rar (111.9 KB, 2071 views)

Last edited by raydan; 08-19-2009 at 07:04.
raydan is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-31-2008 , 01:27   Re: [EXTENSION] Weapon Model
Reply With Quote #2

That screenshot looks sickkk, nice job.

I thought this was possible without an extension though? Maybe not.
__________________
Greyscale is offline
raydan
Senior Member
Join Date: Aug 2006
Old 08-31-2008 , 01:41   Re: [EXTENSION] Weapon Model
Reply With Quote #3

use sourcehook to hook CBaseCombatWeapon, GetWorldModel, then return a new model path
raydan is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-31-2008 , 06:56   Re: [EXTENSION] Weapon Model
Reply With Quote #4

I've actually never tried to use SetEntityModel on a weapon, maybe it works.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
raydan
Senior Member
Join Date: Aug 2006
Old 08-31-2008 , 07:49   Re: [EXTENSION] Weapon Model
Reply With Quote #5

Quote:
Originally Posted by DJ Tsunami View Post
I've actually never tried to use SetEntityModel on a weapon, maybe it works.
i did SetEntityModel, set m_iWorldModelIndex. no way can do that.
if use SetEntityModel work, why no user did it before?
raydan is offline
curlefry
Senior Member
Join Date: Jun 2008
Location: Georgia, USA
Old 08-31-2008 , 08:42   Re: [EXTENSION] Weapon Model
Reply With Quote #6

Anyone tested this for TF2 yet?
__________________
curlefry is offline
Send a message via MSN to curlefry
boykevin
Member
Join Date: Mar 2008
Old 08-31-2008 , 12:17   Re: [EXTENSION] Weapon Model
Reply With Quote #7

i maybe can try but idk imma have to play around with it first
but not sure if i know how
how can i replace the scouts bat with this sword??? by means what do i edit in the code???

Last edited by boykevin; 08-31-2008 at 12:21.
boykevin is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 09-15-2008 , 00:17   Re: [EXTENSION] Weapon Model
Reply With Quote #8

Can you set view models or only world models?
CrimsonGT is offline
raydan
Senior Member
Join Date: Aug 2006
Old 10-16-2008 , 00:33   Re: [EXTENSION] Weapon Model
Reply With Quote #9

you can change player move speed now!
just like css zombie mod.
raydan is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 10-16-2008 , 18:28   Re: [EXTENSION] Weapon Model
Reply With Quote #10

So how long before we can get a strait plugin that allows server owners to set what a model will look like?

A suggestion to deal with dropped items: this is more of a temp solution so that a plugin could be made sooner rather than later:
Weapon is dropped, make it disappear and drop the model that replaced it in it's place. When a player goes over the object they can pick it up like normal.
__________________
zeroibis is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode