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

how set percent of invisibility by a cvar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-18-2017 , 03:06   how set percent of invisibility by a cvar
Reply With Quote #1

I want to make a plugin which gives invisibility to vips.
how to use:-
set_user_rendering(id,
with a variable to control invisibility.

Any help appreciated.
TheSpaniard.
__________________
And I Am Back.

Last edited by TheSpaniard; 09-18-2017 at 03:10.
TheSpaniard is offline
killerZM
Senior Member
Join Date: Sep 2016
Old 09-18-2017 , 05:34   Re: how set percent of invisibility by a cvar
Reply With Quote #2

it's scripting help section not "request section"
killerZM is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-18-2017 , 06:06   Re: how set percent of invisibility by a cvar
Reply With Quote #3

Quote:
Originally Posted by killerZM View Post
it's scripting help section not "request section"
Its not a plugin request i asked a question about scripting. I am not requesting a plugin i am asking help on a piece of code.
__________________
And I Am Back.
TheSpaniard is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 09-18-2017 , 07:08   Re: how set percent of invisibility by a cvar
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <fun>
new cvar_invisibility

public plugin_init() {
    
cvar_invisibility register_cvar("invisibility_amount_by_%""99")
    
register_clcmd("say test""invisibility")
}

public 
invisibility(id) {
    
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,        /*this on the right*/(255/100*get_pcvar_num(cvar_invisibility)))
    

__________________
retired chump

Last edited by DjSoftero; 09-18-2017 at 07:19. Reason: so much typos and changed my mind
DjSoftero is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-18-2017 , 07:37   Re: how set percent of invisibility by a cvar
Reply With Quote #5

Just wondering, is there something wrong with set_user_visibility(id, 0)

That nobody mentioned it?
siriusmd99 is offline
Reply


Thread Tools
Display Modes

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 09:35.


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