AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   debuging item (https://forums.alliedmods.net/showthread.php?t=105880)

StormZone 10-09-2009 12:07

debuging item
 
This is an shopmenu item that should make zou invizible for 15 sec but it doesent works.
The soudns play but you remain vizible.
Help please
PHP Code:

    if( playeritem3[id] == INVIS)
    {
        
set_user_renderingid kRenderFxNone kRenderTransTexture 150 );
        
        if( 
Util_Should_Msg_Client(id) )
        {
            
client_print idprint_chat"%L"id"SM3_INVIS"MOD );
            
client_print idprint_center"%L"id"SM3_INVIS2" );
        }

        new 
parm[2];
        
parm[0] = id;
        
parm[1] = INVIS;

        
//Play sound
        
if( Util_Should_Msg_Client(id) )
        {
            if ( 
file_exists"sound/uwc3x/shopmenu/sm3_inv.wav" ) == )
            {
                
emit_soundidCHAN_STATIC"uwc3x/shopmenu/sm3_inv.wav"1.0ATTN_NORM0PITCH_NORM );
            }
        }
        
        
//reset via task in 10 seconds
        
parm2[1] = 3;
        
set_task15.0"Task_Reset_Shopmenu3"SHOPMENU3_RESET idparm22);    
    } 

+ Karma :D

Arkshine 10-09-2009 12:16

Re: debuging item
 
Try set_user_rendering( id , kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 1);

StormZone 10-09-2009 12:56

Re: debuging item
 
nope it doesent words :((
any other idea?

Arkshine 10-09-2009 13:25

Re: debuging item
 
Try again, because it works. ( code taken from UAIO )

If it doesn't work, you may consider it's because of others plugins which apply a render on the player too and remove the render done by your plugin.

StormZone 10-09-2009 13:36

Re: debuging item
 
Nope no other plugins that does that.
Here is the full code of the item maybe you se something y dont

PHP Code:

    if( playeritem3[id] == INVIS)
    {
        
set_user_renderingid kRenderFxNone kRenderTransTexture 150 ); 
        
        new 
parm[2];
        
parm[0] = id;
        
parm[1] = INVIS;

        
//Play sound
        
if( Util_Should_Msg_Client(id) )
        {
            
set_hudmessage(id2552550.00.5506.05.0)
            
show_hudmessage(id"%L"LANG_PLAYER"SM3_INVIS"MOD);
            if ( 
file_exists"sound/uwc3x/shopmenu/sm3_inv.wav" ) == )
            {
                
emit_soundidCHAN_STATIC"uwc3x/shopmenu/sm3_inv.wav"1.0ATTN_NORM0PITCH_NORM );
            }
        }
        
        
//reset via task in 15 seconds
        
parm2[1] = 3;
        
set_task15.0"Task_Reset_Shopmenu3"SHOPMENU3_RESET idparm22);    
    } 

and the reset

PHP Code:

public Task_Reset_Shopmenu3parm[] )
{
    new 
id parm[0];

    if( !
is_user_connectedid ) || !is_user_aliveid ) )
        return 
PLUGIN_HANDLED;

    new 
reset_item parm[1];
    
playeritem3[id] = 0;

    if( 
reset_item == 1)
    {
        
playerCanBuyitem3[id] = 1;

        if( 
Util_Should_Msg_Client(id) )
        {
            
set_hudmessage(id2552550.00.5506.05.0)
            
show_hudmessage(id"%L"LANG_PLAYER"SM3_CAN_BUY"MOD);
        }

    }
    else if( 
reset_item == )
    {
        if( 
Util_Should_Msg_Client(id) )
        {
            
set_hudmessage(id2552550.00.5506.05.0)
            
show_hudmessage(id"%L"LANG_PLAYER"SM3_VULNERABLE"MOD);
        }
    }
    else if( 
reset_item == )
    {
        
set_user_renderingid );
        if( 
Util_Should_Msg_Client(id) )
        {
            
set_hudmessage(id2552550.00.5506.05.0)
            
show_hudmessage(id"%L"LANG_PLAYER"SM3_VISIBLE"MOD);
        }
    }

    return 
PLUGIN_CONTINUE;




Arkshine 10-09-2009 13:41

Re: debuging item
 
I was thought I told you to test what I've written ? Why I see your old code ?

StormZone 10-09-2009 13:47

Re: debuging item
 
this is the original
Y replaced that line with wath you told me and no efect that way to...

Arkshine 10-09-2009 14:00

Re: debuging item
 
Are you sure you have well edited, recompiled, and replaced ?

StormZone 10-09-2009 14:11

Re: debuging item
 
POZITIVE

StormZone 10-09-2009 15:20

Re: debuging item
 
can a task be set before apliing the render that makes the player invizible that will remove all other renders by other plugins?


All times are GMT -4. The time now is 22:42.

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