Raised This Month: $ Target: $400
 0% 

Solved Hide custom entity, Game not loading functions first time, Entity ID problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-21-2018 , 11:05   Re: Hide custom entity, Game not loading functions first time, Entity ID problems
Reply With Quote #1

Quote:
- So now I want weaponboxes to keep that glow even when a player picks it up and drops it, so I hook FM_SetModel and retrieve pev_iuser2, get the color that we set before on the weaponbox and set it again. But unfortunately none of the IDs in FM_SetModel match the IDs of the weaponboxes that I create, as you can see in the debug log.

EDIT: FM_SetModel apparently isn't the right event to do this, but what else can I use?
Now I get it. What you don't know is that once a weaponbox is picked up that box is gone and the next time you drop the weapon a new weaponbox is being created. The only thing that remains the same is the weapon entity.

What you can do is when the player will touch the weaponbox apply the same flag from pev_iuser2 to the weapon entity. Next, when player tries to drop check if the item that's being dropped contains the pev_iuser2 flag and if that's true apply the flag to the new weaponbox.
__________________

Last edited by HamletEagle; 07-21-2018 at 11:10.
HamletEagle is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-21-2018 , 13:00   Re: Hide custom entity, Game not loading functions first time, Entity ID problems
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
What you can do is when the player will touch the weaponbox apply the same flag from pev_iuser2 to the weapon entity. Next, when player tries to drop check if the item that's being dropped contains the pev_iuser2 flag and if that's true apply the flag to the new weaponbox.
__________________
stuff
maqi is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-21-2018 , 13:39   Re: Hide custom entity, Game not loading functions first time, Entity ID problems
Reply With Quote #3

I don't get how that is related to pev_iuser3/4
__________________
edon1337 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 12:25.


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