Raised This Month: $ Target: $400
 0% 

set_user_rendering [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Def
Junior Member
Join Date: Oct 2006
Old 06-08-2007 , 16:12   set_user_rendering [SOLVED]
Reply With Quote #1

Hello everyone.

I have a problem with setting player invisible, here is the code:

Code:
public eventPlayerSpawn(id) {
    if(is_user_connected(id)) {   
        if(INVLVL > 0) {
            set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransTexture,255 - INVLVL * 40);
            client_print(id,print_chat,"TEST WORKING %i",INVLVL);
        }
    }
}
This is just a part of a code. Then i spawn i get the message "TEST WORKING 5" but I'm still totaly visible. Where can be a problem ?

Thanks in advice!
__________________
Sorry for my bad english

Last edited by Def; 06-09-2007 at 11:46.
Def is offline
Oskar
BANNED
Join Date: Jan 2007
Location: Slöinge, Falkenberg, Hal
Old 06-08-2007 , 16:16   Re: set_user_rendering
Reply With Quote #2

public eventPlayerSpawn(id) {
if(is_user_connected(id)) {
if(INVLVL > 0) {
set_user_rendering(id,kRenderFxNone,0,0,0,kRe nderTransTexture,255 - INVLVL * 40);
client_print(id,print_chat,"TEST WORKING %i",INVLVL);
}
}
}
Oskar is offline
Send a message via MSN to Oskar
Def
Junior Member
Join Date: Oct 2006
Old 06-08-2007 , 16:39   Re: set_user_rendering
Reply With Quote #3

Oops, i've prolly deleted ) when posted code here. In the .sma is everyhing ok.
__________________
Sorry for my bad english
Def is offline
Def
Junior Member
Join Date: Oct 2006
Old 06-09-2007 , 03:02   Re: set_user_rendering
Reply With Quote #4

So anybody knows a solution ?
__________________
Sorry for my bad english
Def is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-09-2007 , 04:24   Re: set_user_rendering
Reply With Quote #5

Try this:
Code:
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255 - INVLVL * 40)
greetz regalis
__________________
regalis is offline
Def
Junior Member
Join Date: Oct 2006
Old 06-09-2007 , 08:39   Re: set_user_rendering
Reply With Quote #6

Quote:
Originally Posted by regalis View Post
Try this:
Code:
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255 - INVLVL * 40)
greetz regalis
It's not working too The wierd thing is that when I buy that invisibility skill i become invisible with the same command, but it's not working in newRound event.
__________________
Sorry for my bad english
Def is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-09-2007 , 08:51   Re: set_user_rendering
Reply With Quote #7

Then you should test if it works on player spawn (resetHud event)
Maybe add a little delay (set_task(0.2, ....)

greetz regalis
__________________
regalis is offline
Def
Junior Member
Join Date: Oct 2006
Old 06-09-2007 , 09:13   Re: set_user_rendering
Reply With Quote #8

Quote:
Originally Posted by regalis View Post
Then you should test if it works on player spawn (resetHud event)
Maybe add a little delay (set_task(0.2, ....)

greetz regalis
I've tried to put 1.0 sec delay and now it says in the server console "[FUN] Player out of range (0)".
__________________
Sorry for my bad english
Def is offline
Def
Junior Member
Join Date: Oct 2006
Old 06-09-2007 , 09:44   Re: set_user_rendering
Reply With Quote #9

Oh, i've just forgot to type ",id" at the end of the set_task, now it doesnt give any error BUT it doesnt make me invisible aswell
__________________
Sorry for my bad english
Def is offline
Def
Junior Member
Join Date: Oct 2006
Old 06-09-2007 , 10:07   Re: set_user_rendering
Reply With Quote #10

I saw some guy wrote that this function(set_user_rendering) doesn't work in the events, you have to use it with commands. So how I can make a player invisible every new round ?

P.S. I was thinking about forcing user to use a command, but I don't really know how to do that. Anyone can help me ? Or I would like to make that u become invisible only when you use a knife, but I dunno what event I should use.
__________________
Sorry for my bad english

Last edited by Def; 06-09-2007 at 10:42.
Def 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 10:35.


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