Raised This Month: $ Target: $400
 0% 

Help with an uwc3x item


Post New Thread Reply   
 
Thread Tools Display Modes
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--)
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 11-26-2009 , 01:15   Re: Help with an uwc3x item
Reply With Quote #2

Bump.
Y would really apreciate some help.
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 11-28-2009 , 17:04   Re: Help with an uwc3x item
Reply With Quote #3

Come on guys a little help please.
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 11-28-2009 , 17:08   Re: Help with an uwc3x item
Reply With Quote #4

if(get_user_weapon(id) != CSW_KNIFE) // user does not have knife up

...
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 11-29-2009 , 09:55   Re: Help with an uwc3x item
Reply With Quote #5

ok so that is for puting a knife to the user.And to remove it after the invisibiliti is gone?
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 12-02-2009 , 05:55   Re: Help with an uwc3x item
Reply With Quote #6

bump
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 12-02-2009 , 09:04   Re: Help with an uwc3x item
Reply With Quote #7

for first :

why
PHP Code:
set_entity_visibility id); ? 
and why not set_rending?

2. why you dont check the weapon and set a task for xxx sec. to setting/remove rendering?

to check the weapon :

PHP Code:
if(get_user_weapon(id) == CSW_KNIFE)
{
//set rendring
}
else
{
//remove rending

and STOP BUMPING EVERY DAY
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 05-17-2010 , 15:53   Re: Help with an uwc3x item
Reply With Quote #8

you guys dindt uderstood wath y want.

Y want to put when this task in activated if ( playeritem3[id] == INVIS)
that only the knife could be used and after the task expires the weapons to be given back
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-17-2010 , 17:29   Re: Help with an uwc3x item
Reply With Quote #9

if ( playeritem3[id] == INVIS && get_user_weapon(id) == CSW_KNIFE)
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 05-17-2010 , 17:44   Re: Help with an uwc3x item
Reply With Quote #10

y tried it but it only make me invizible when if y have the knife in my hand.
Y want this item to make me invisible but while y am invisible not to be able to use anithing else then the knife and not to be able to pickup anithing.After the time of the item passes y want to be able to use my guns again.

Did you understod now?

Thanks for the help until now.
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
Reply


Thread Tools
Display Modes

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