Raised This Month: $ Target: $400
 0% 

[SOLVED]set_user_rendering - How do i make it go partly invisible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-22-2009 , 00:13   [SOLVED]set_user_rendering - How do i make it go partly invisible?
Reply With Quote #1

Hi, im trying to make a player transparent, this is my code:

PHP Code:
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha0); 
To try if it works i use "kill" in console but the corpse is not transparent so im assuming that the player never was transparent.

How to fix?

Last edited by NiQu; 12-24-2009 at 02:41.
NiQu is offline
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 12-22-2009 , 00:23   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #2

try using fakemeta_util
fm_set_rendering (or fm_set_user_rendering)
i didnīt find kRenderTransAlpha in fun

Try testing it with a third person view plugin
__________________
Why do they send babies to fight me? -Heavy

nicolazo103 is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-22-2009 , 00:30   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #3

@nicolazo103: what i know the fun module is way better then fakemeta but ill give it a try.

And when i add set_view(id, CAMERA_3RDPERSON) i become 3rd person ofc but the character is transparent so i cant know if its set_view or my code that makes it transparent :S

EDIT: did not work.

Last edited by NiQu; 12-22-2009 at 00:58.
NiQu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-22-2009 , 01:11   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #4

set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, INVISIBILITY_HERE)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-22-2009 , 01:21   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #5

@ConnorMcLeod: Will the player remain invsiible even if he dies? (will the corpse have the same invisibility as when hes alive?).

EDIT: Either the player/corpse wont stay invisible or i do something wrong..

255 = 100% Visible
0 = 100% Invisible
50 = Not entirely invsibile but still hard to see the player.

Right? i want 50.

btw, am i suppose to put that code in FwdPlayerSpawn? if i have this in plugin_init "RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1);"

Last edited by NiQu; 12-22-2009 at 01:25.
NiQu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-22-2009 , 10:34   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #6

If you want visibility by percentage so it's easier to understand than 0-255, you can use this formula:
alpha = percentage * 255 / 100
WHERE
- alpha = 0-255 value for visibility
- percentage = 0-100 value for visibility

Code:
new iPercent = /* your value */; new iAlpha = iPercent * 255 / 100; set_user_rendering( iPlayer, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iAlpha );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-22-2009 , 15:08   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #7

so
new iPercent = 30;
new iAlpha = iPercent * 255 / 100;
set_user_rendering( iPlayer, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iAlpha );That worked

Though i had to replace iPlayer with id.
NiQu is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-22-2009 , 16:47   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #8

Quote:
Originally Posted by NiQu View Post
so
new iPercent = 30;
new iAlpha = iPercent * 255 / 100;
set_user_rendering( iPlayer, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iAlpha );That worked

Though i had to replace iPlayer with id.
Its what ever you have set up
public function(iPlayer)

If you want this it can be what ever you want

id/client/iplayer/dude
Doc-Holiday is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-22-2009 , 21:19   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #9

i know NcB im not stupid.. .. it worked stop posting.
NiQu is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-22-2009 , 23:38   Re: set_user_rendering - How do i make it go partly invisible?
Reply With Quote #10

Quote:
Originally Posted by NiQu View Post
i know NcB im not stupid.. .. it worked stop posting.
Then don make comments like below.........


Code:
Though i had to replace iPlayer with id.
Doc-Holiday 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 04:10.


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