wcft 3 item help!!
hey guys...so i want a item that u can buy in shopmenu3 (yes...i made a new shopmenu) and basically what it does is allows you 2 see humans if you buy it...can some1 help me with the code?
heres the code 2 make the human invisible in the first place... Code:
// This should be called on weapon change, on new round, when the user selects a new skill, and after an item is purchased |
Re: wcft 3 item help!!
I've actually done something like this in the past and it is definitely possible.
What you'll need to do is remove all of the code that makes the humans invisible and replace it with a hook to "FM_AddToFullPack". In here, you'll have to set the rendering of the player according to what you want the viewer to see. For example: Code:
Everything will work other than "is_cloaked" and "has_my_new_item", so you'll just have to clean that up. You should also add additional conditions to check that the players are alive, connected, etc. |
Re: wcft 3 item help!!
thank you very much buddy!!!
|
Re: wcft 3 item help!!
Sorry, I forgot to mention that the hook for FM_AddToFullPack should be set to post, i.e.:
Code:
|
Re: wcft 3 item help!!
will this make the player visible to all or just to the person who has the item?
|
Re: wcft 3 item help!!
Quote:
|
Re: wcft 3 item help!!
so what function is used to make the person invisible and im guessing the foward pack thing is to make them uninvisble
|
Re: wcft 3 item help!!
Quote:
Code:
Player 1: Human with a cloakThat happens many times each second, but the important thing is that if you don't specifically state that the player should be rendered invisible, then they're rendered as visible. In other words, the invisibility only lasts as long as the callback for FM_AddToFullPack sets the players as invisible. |
Re: wcft 3 item help!!
lol im lost,
1. do i use set_user_rendering to make them invisible or not 2. if 1 is yes do i use this code to make them visible Code:
|
Re: wcft 3 item help!!
Quote:
Short answer: No Long answer: http://forums.alliedmods.net/showpos...28&postcount=8 |
| All times are GMT -4. The time now is 09:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.