AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with invisiblility... (https://forums.alliedmods.net/showthread.php?t=28658)

Fred Dawes 05-19-2006 22:20

Help with invisiblility...
 
I am not a total noob at coding. I just can't figure out how my attempts at invisibility are failing.

I looked through the forums, and I basically figured out this...

1) set_user_rendering(id,kRenderFxGlowShell,0,0, 0,kRenderTransAlpha,0) makes you invisible

2) set_user_rendering(id,kRenderFxGlowShell,0,0, 0,kRenderTransAlpha,255) makes you visible.

This is my code...

Code:
public invison(id) #include <amxmodx> #include <amxmisc> #include <dbi> #include <tsx> #include <tsxaddon> #include <engine> #include <fun>
Code:
    register_concmd("invisibility","invison",ADMIN_IMMUNITY,"- Turns yourself invisible!!")
Code:
public invison(id){ {     if(cloaked[id] == 1){         set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255)         return PLUGIN_HANDLED     }else{         set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20)         return PLUGIN_HANDLED     } }

I type 'invisibility' in console, and nothing happens. I am running TS and AMXX 1.01. Any help, please?

Cheap_Suit 05-19-2006 22:42

If you are going to use engine might as well:

Code:
/* If visible = 1, entity will be set to be visible, else invisible. */ set_entity_visibility(entity, visible = 1)

noob cannon lol 05-19-2006 23:24

try kRenderFxNone instead of glowshell

Freecode 05-20-2006 01:05

why do you have so many includes?
why do you have public invision(id) on top of your includes?

Feren6 05-20-2006 08:20

Do not use the set_entity_visibility if you still wish to spectate that person. If they are "invisible" using that function, you will not be able to. Best off using the kRenderFxGlowShell and set it to 0


All times are GMT -4. The time now is 16:20.

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