AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player spawn and player invisible (https://forums.alliedmods.net/showthread.php?t=140117)

zirualas 10-09-2010 02:56

Player spawn and player invisible
 
I want to do that then player spawn he has 192 visibility. I use
PHP Code:

    set_user_rendering(32kRenderFxNone255255255kRenderTransAlpha192); 

But don't work

Hunter-Digital 10-09-2010 03:27

Re: Player spawn and player invisible
 
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.

5c0r-|3i0 10-09-2010 03:29

Re: Player spawn and player invisible
 
use hamsandwich , hook ham_spawn , then conditions ?

zirualas 10-09-2010 04:01

Re: Player spawn and player invisible
 
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

hornet 10-09-2010 06:48

Re: Player spawn and player invisible
 
Look a bit harder it's definately working, but remember that alpha values are based out of 255, so 192 isn't much invisibility.

Xalus 10-09-2010 06:52

Re: Player spawn and player invisible
 
kRenderFxNone -> kRenderFxGlowShell

zirualas 10-09-2010 07:15

Re: Player spawn and player invisible
 
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 ;]

Exolent[jNr] 10-09-2010 12:04

Re: Player spawn and player invisible
 
Quote:

Originally Posted by Xalus (Post 1319904)
kRenderFxNone -> kRenderFxGlowShell

No. That is not required for invisibility and kRenderFxNone is fine because the only effect he needs is transparency.

Xalus 10-09-2010 16:25

Re: Player spawn and player invisible
 
ah ok,
Didn't know :)

Thanks.


All times are GMT -4. The time now is 10:16.

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