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?
__________________