Raised This Month: $ Target: $400
 0% 

Help with an uwc3x item


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 11-24-2009 , 20:29   Help with an uwc3x item
Reply With Quote #1

Y have made an item for the uwc3x mod that makes you for 10 seconds completly invizible but its to powerfull and y want to make it to be able to attack only with the knife while invs.
Here is the code for the item.

Activation on invizibility.
Code:
    if( playeritem3[id] == INVIS)
    { 
        set_entity_visibility ( id, 0 );
        new parm[2];
        parm[0] = id;
        parm[1] = INVIS;

        //Play sound
        if( Util_Should_Msg_Client(id) )
        {
            set_hudmessage(0, 255, 255, 0.0, 0.55, 0, 6.0, 3.0, 0.1, 0.2, 1);
            show_hudmessage(id, "%L", LANG_PLAYER, "SM3_INVIS", MOD);
            if ( file_exists( "sound/uwc3x/shopmenu/sm3_inv.wav" ) == 1 )
            {
                emit_sound( id, CHAN_STATIC, "uwc3x/shopmenu/sm3_inv.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
            }
        }
        
        //reset via task in 10 seconds
        parm2[1] = 3;
        set_task( 10.0, "Task_Reset_Shopmenu3", SHOPMENU3_RESET + id, parm2, 2);    
    }
Removing the invizibility.
Code:
    else if( reset_item == 3 )
    {
        set_entity_visibility ( id, 1 );
        if( Util_Should_Msg_Client(id) )
        {
            set_hudmessage(0, 255, 255, 0.0, 0.55, 0, 6.0, 3.0, 0.1, 0.2, 1);
            show_hudmessage(id, "%L", LANG_PLAYER, "SM3_VISIBLE", MOD);
            if ( file_exists( "sound/uwc3x/shopmenu/sm3_inv_done.wav" ) == 1 )
            {
                emit_sound( id, CHAN_STATIC, "uwc3x/shopmenu/sm3_inv_done.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
            }
        }
    }
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
 



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 13:39.


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