Raised This Month: $ Target: $400
 0% 

Solved [Help] Change W_Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KOTOKU
New Member
Join Date: Mar 2017
Old 04-14-2017 , 19:42   Re: [Help] Change W_Model
Reply With Quote #1

forward FM_SetModel and use dynamic state and Ham_Spawn weaponbox
__________________
New mod from zero "JailBreak" by KOTOKU
Last Update: 0.3 Alpha [6.04.17]
LEGENDARY MOD | VK
Readiness: 65%
KOTOKU is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-15-2017 , 04:59   Re: [Help] Change W_Model
Reply With Quote #2

Quote:
Originally Posted by KOTOKU View Post
forward FM_SetModel and use dynamic state and Ham_Spawn weaponbox
This is not Counter-Strike, the entity is called "weapon_crowbar". I am testing on one of my xen maps, where it autoamtically spawns because it was added in the map.
DarthMan is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-04-2017 , 19:08   Re: [Help] Change W_Model
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?t=40822
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-04-2017 , 19:45   Re: [Help] Change W_Model
Reply With Quote #4

Hook thier spawn pre check if it has no owner then change the model!

And are you hooking set model pre or post?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-12-2017 at 10:17. Reason: Grammar
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-12-2017 , 09:38   Re: [Help] Change W_Model
Reply With Quote #5

Quote:
Originally Posted by DarthMan View Post
Hello. How can I change the w_ model for all existing crowbars on the map?
My friend did a small change to my code, still it doesn't work.
Here it is :

Code:
public fw_SetModel(entity, model[])
{
        if(!is_valid_ent(entity)) 
            return FMRES_IGNORED

        new xModel[64];
        entity_get_string(entity, EV_SZ_model, xModel, charsmax(xModel))

        if(equal(xModel,CRB_W_MODEL_OLD))
        {
            entity_set_model(entity, UMB_W_MODEL)
            return FMRES_SUPERCEDE
        }
        return FMRES_IGNORED
}
For v_ and p_ it works just fine, any ideas?
Thanks !
Hey, just in case you haven't solved this yet, you have to add models/ when checking with equal().
__________________
edon1337 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-12-2017 , 14:10   Re: [Help] Change W_Model
Reply With Quote #6

Quote:
Originally Posted by edon1337 View Post
Hey, just in case you haven't solved this yet, you have to add models/ when checking with equal().
Ye, it's still not solved.
DarthMan is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-12-2017 , 14:48   Re: [Help] Change W_Model
Reply With Quote #7

Quote:
Originally Posted by DarthMan View Post
Ye, it's still not solved.
Did you try what I told you?
__________________
edon1337 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-12-2017 , 15:18   Re: [Help] Change W_Model
Reply With Quote #8

Quote:
Originally Posted by edon1337 View Post
Hey, just in case you haven't solved this yet, you have to add models/ when checking with equal().
It uses models/ already.
May I private send u the whole plug-in to have a look at it and try to fix?
DarthMan is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-12-2017 , 15:57   Re: [Help] Change W_Model
Reply With Quote #9

Use setmodel post
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-12-2017 , 17:23   Re: [Help] Change W_Model
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
Use setmodel post
That still didn't work.
DarthMan 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 18:04.


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