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

Instant change weapon model


Post New Thread Reply   
 
Thread Tools Display Modes
Mirk
Senior Member
Join Date: Nov 2012
Old 07-04-2014 , 06:41   Re: Instant change weapon model
Reply With Quote #11

Quote:
Originally Posted by GuskiS View Post
To change immediately:
ExecuteHamB(Ham_Item_Deploy, find_ent_by_owner(-1, "weapon_knife", id));
Instead
RegisterHam( Ham_Item_Deploy, szWeapon, "ham_Deploy_Post", 1 );

Replace
ExecuteHamB( Ham_Item_Deploy, find_ent_by_owner( -1, "weapon_knife", id ) );

or

ExecuteHamB( Ham_Item_Deploy, find_ent_by_owner( -1, szWeapon, id ) );

???
Mirk is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2014 , 08:05   Re: Instant change weapon model
Reply With Quote #12

Here is scriptin help section, you should be able to figure out this simple thing by yourself.
HamletEagle is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 07-04-2014 , 10:13   Re: Instant change weapon model
Reply With Quote #13

Quote:
Originally Posted by Mirk View Post
Instead
RegisterHam( Ham_Item_Deploy, szWeapon, "ham_Deploy_Post", 1 );

Replace
ExecuteHamB( Ham_Item_Deploy, find_ent_by_owner( -1, "weapon_knife", id ) );

or

ExecuteHamB( Ham_Item_Deploy, find_ent_by_owner( -1, szWeapon, id ) );

???
RegisterHam( Ham_Item_Deploy, "weapon_knife", "ham_Deploy_Post", 1 );
Will hook Ham_Item_Deploy event from game.

ExecuteHamB( Ham_Item_Deploy, find_ent_by_owner( -1, "weapon_knife", id ) );
This will tell the game it should start Ham_Item_Deploy event, that way changing everything you need if you have hooked it.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness

Last edited by GuskiS; 07-04-2014 at 10:14.
GuskiS 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 20:59.


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