Raised This Month: $ Target: $400
 0% 

Touch armoury_entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ef_Deas
Member
Join Date: Aug 2012
Location: Rio de Janeiro
Old 07-25-2014 , 05:52   Re: Touch armoury_entity
Reply With Quote #1

I'm having trouble with setting nodraw effect

PHP Code:
public HAM_Armoury_Touch_Pre(iArmouryidUser)    // The function is called when user touches Armoury entity
{
    if(
is_user_alive(idUser)                                    // User should be alive
    
&& is_valid_ent(iArmoury)                                   // The entity should be valid,         
    
&& engfunc(EngFunc_EntIsOnFlooriArmoury)                  // lying on the ground
    
&& !(entity_get_int(iArmouryEV_INT_effects) & EF_NODRAW)) // and it shouldn't be picked up already
    
{    
        new 
iWeapon cs_get_armoury_type(iArmoury)             // Get the Weapon CSW_ id
        
give_user_weapon(idUseriWeapon)                       // give the weapon (my func)
        
entity_set_int(iArmouryEV_INT_effectsEF_NODRAW);    // Make it disappear until next round
      
        
say("Trace")                                            // Let's see if we got here
    
}

Using this code I pick up weapon with trace message. The armour entity disappears. Then I can throw the weapon away and pick up the original "invisible" weapon again normally, without trace message.
So how do I make it disappear until next round properly?

Last edited by Ef_Deas; 07-25-2014 at 11:00.
Ef_Deas is offline
Send a message via Skype™ to Ef_Deas
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 00:21.


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