[SOLVED]set_user_rendering - How do i make it go partly invisible?
Hi, im trying to make a player transparent, this is my code:
PHP Code:
How to fix? |
Re: set_user_rendering - How do i make it go partly invisible?
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 |
Re: set_user_rendering - How do i make it go partly invisible?
@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. |
Re: set_user_rendering - How do i make it go partly invisible?
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, INVISIBILITY_HERE)
|
Re: set_user_rendering - How do i make it go partly invisible?
@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);" |
Re: set_user_rendering - How do i make it go partly invisible?
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:
|
Re: set_user_rendering - How do i make it go partly invisible?
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. |
Re: set_user_rendering - How do i make it go partly invisible?
Quote:
public function(iPlayer) If you want this it can be what ever you want id/client/iplayer/dude |
Re: set_user_rendering - How do i make it go partly invisible?
i know NcB :) im not stupid.. .. it worked stop posting.
|
Re: set_user_rendering - How do i make it go partly invisible?
Quote:
Code:
Though i had to replace iPlayer with id. |
| All times are GMT -4. The time now is 04:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.