Raised This Month: $ Target: $400
 0% 

Player spawn and player invisible


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-09-2010 , 02:56   Player spawn and player invisible
Reply With Quote #1

I want to do that then player spawn he has 192 visibility. I use
PHP Code:
    set_user_rendering(32kRenderFxNone255255255kRenderTransAlpha192); 
But don't work
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 10-09-2010 , 03:27   Re: Player spawn and player invisible
Reply With Quote #2

32 ?

You need to set the first param to the id of the player, if you hook the spawn of player, parse the id there... show your full code if you need corrections.
__________________
Hunter-Digital is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 10-09-2010 , 03:29   Re: Player spawn and player invisible
Reply With Quote #3

use hamsandwich , hook ham_spawn , then conditions ?
5c0r-|3i0 is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-09-2010 , 04:01   Re: Player spawn and player invisible
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>

new const mdlTs[]="arctic";
new const 
mdlCTs[]="urban";

public 
plugin_init()
{
    
RegisterHam(Ham_Spawn,"player","PlayerSpawn"1);
}

public 
PlayerSpawn(id)
{
    if( 
is_user_alive(id) )
    {
        
set_user_rendering(idkRenderFxNone255255255kRenderTransAlpha192); 
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
                
cs_set_user_model(id,mdlTs)
            }
            case 
CS_TEAM_CT:
            {
                
cs_set_user_model(id,mdlCTs)
            }
        }
    }

Like this? But it don't working
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 10-09-2010 , 06:48   Re: Player spawn and player invisible
Reply With Quote #5

Look a bit harder it's definately working, but remember that alpha values are based out of 255, so 192 isn't much invisibility.
hornet is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-09-2010 , 06:52   Re: Player spawn and player invisible
Reply With Quote #6

kRenderFxNone -> kRenderFxGlowShell
__________________
Retired.
Xalus is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-09-2010 , 07:15   Re: Player spawn and player invisible
Reply With Quote #7

Ok problem solved, it was because i was have my vipmenu plugin tha do on round start all visible, now its working then I off vipmenu plugins, thx ;]
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-09-2010 , 12:04   Re: Player spawn and player invisible
Reply With Quote #8

Quote:
Originally Posted by Xalus View Post
kRenderFxNone -> kRenderFxGlowShell
No. That is not required for invisibility and kRenderFxNone is fine because the only effect he needs is transparency.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 10-09-2010 , 16:25   Re: Player spawn and player invisible
Reply With Quote #9

ah ok,
Didn't know

Thanks.
__________________
Retired.
Xalus 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:16.


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