Raised This Month: $51 Target: $400
 12% 

Making a player completely invisible


Post New Thread Reply   
 
Thread Tools Display Modes
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 09-28-2008 , 12:22   Re: Making a player completely invisible
Reply With Quote #11

"15" is alpha value
"0" invisible
"255" visible
u can set every value u want
maybe
"25" or "50" or "73" every value u want !!!
lower valuer invisble
higher valuer visible
"15" was just example to show u how to use !!!
__________________

Last edited by vato loco [GE-S]; 09-28-2008 at 12:26.
vato loco [GE-S] is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 09-29-2008 , 07:59   Re: Making a player completely invisible
Reply With Quote #12

Quote:
Originally Posted by vato loco [GE-S] View Post
second try
do u looking for something like that ???
i test it and it work !!!

amx_invis "STEAM_0:0:1234567" "15" "on"
amx_invis "STEAM_0:0:1234567" "off"

amx_invis "@ALL" "15" "on"
amx_invis "@ALL" "off"


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"

#define INVIS_LEVEL ADMIN_KICK        

new bool:hasinvis[33]

public 
plugin_init() {
         
register_plugin(PLUGINVERSIONAUTHOR)
         
register_clcmd("amx_invis","give_invis",INVIS_LEVEL,"<name|#userid|steamid|@ALL> <alpha> <on/off> ")
}

public 
give_invis(id,level,cid) {
    if(!
cmd_access(id,level,cid,3))
        return 
PLUGIN_HANDLED
            
    
new name[33]
    
get_user_name(id,name,32)
        
    new 
szarg1[33], szalpha[8], szarg3[8], bool:mode
    read_argv
(1,szarg1,32)
    
read_argv(2,szalpha,7)
    
read_argv(3,szarg3,7)
    new 
ialpha str_to_num(szalpha)
    if(
equal(szarg3,"on"))
        
mode true
        
    
if(equal(szarg1,"@ALL")) {
        for(new 
i=1;i<=get_maxplayers();i++) {
            if(
is_user_connected(i) && is_user_alive(i)) {
                
hasinvis[i] = mode
                
if(mode) {
                                
client_print(i,print_chat,"[Amxx] Admin Set invisibility at All ")
                                
set_user_rendering(i,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,ialpha)
                                }
                else {
                                
client_print(i,print_chat,"[Amxx] Admin take invisibility from All ")
                                
set_user_rendering(i,kRenderFxNone,0,0,0,kRenderNormal,ialpha)
                                }        
            }
        }
    }
    else {
        new 
pid cmd_target(id,szarg1,2)
        if(
pid 0) {
            
hasinvis[pid] = mode
            
if(mode) {
                        
client_print(pid,print_chat,"[Amxx] %s is now invisible ",name)
                        
set_user_rendering(pid,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,ialpha)
            }
            else {
                       
client_print(pid,print_chat,"[Amxx] %s is no longer invisible ",name)
                       
set_user_rendering(pid,kRenderFxNone,0,0,0,kRenderNormal,ialpha)
            }
        }
    }
    
    return 
PLUGIN_HANDLED


and now I want to be able to use this setup but set it to a percent of VISIBILITY... for example amx_invis @all [0,10,35,70,100] <on/off>

EDIT: 255/100=2.55
HLM is offline
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 09-29-2008 , 08:20   Re: Making a player completely invisible
Reply With Quote #13

amx_invis "@ALL" "off" [turns invisibility off]
amx_invis "@ALL" "0" "on" [everyone is invisible]
amx_invis "@ALL" "100" "on" [everyone is not fully invisible]
amx_invis "@ALL" "255" "on" [visible]

and for one player (target )the same with
(name|#userid|steamid)
amx_invis "vato loco [GE-S]" "off" [turns invisibility off]
amx_invis "STEAM_0:0:1234567" "0" "on" [target is invisible]
amx_invis "vato loco [GE-S]" "100" "on" [target is not fully invisible]

did u undersand it know
__________________

Last edited by vato loco [GE-S]; 09-29-2008 at 08:22.
vato loco [GE-S] is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 09-29-2008 , 17:18   Re: Making a player completely invisible
Reply With Quote #14

Yes, but I dont want to have to use my horrible math skills to determine how invisible someone is, what I want to do is include a percent (out of 100) into it somehow
HLM is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-10-2015 , 17:16   Re: Making a player completely invisible
Reply With Quote #15

Quote:
Originally Posted by vato loco [GE-S] View Post
amx_invis "@ALL" "off" [turns invisibility off]
amx_invis "@ALL" "0" "on" [everyone is invisible]
amx_invis "@ALL" "100" "on" [everyone is not fully invisible]
amx_invis "@ALL" "255" "on" [visible]

and for one player (target )the same with
(name|#userid|steamid)
amx_invis "vato loco [GE-S]" "off" [turns invisibility off]
amx_invis "STEAM_0:0:1234567" "0" "on" [target is invisible]
amx_invis "vato loco [GE-S]" "100" "on" [target is not fully invisible]

did u undersand it know
i just added a little menu :
1 - Make my self fully invisible
2 - make All invisible
3 - Choose a Custom Player^n
4 - Off Invisible \r(For ALL)
Dr Zayd is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 09-10-2015 , 18:39   Re: Making a player completely invisible
Reply With Quote #16

Last post on this thread was on: 29-09-08 , 16:18!
Why whould someone bring back such an old topic ?
There are now hundreds of plugins like that..and despite the fact u brought it to 'life' you posted no source code lol :O
__________________

My PC Themes . .
red_bull2oo6 is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-13-2015 , 16:03   Re: Making a player completely invisible
Reply With Quote #17

i dont want to go Off-Topic but i always like to revive the Old Posts :p
Dr Zayd 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 05:15.


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