Raised This Month: $ Target: $400
 0% 

Weaponent touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 09-20-2015 , 16:23   Weaponent touch
Reply With Quote #1

what does it do ?
Code:
#define OFFSET_PRIMARYWEAPON        116
If I put it in my code of Days, This will help against weapons bug?


2: if i want block take weapon from gun room and pick up should i add this:
Code:
    RegisterHam( Ham_Touch,                     "armoury_entity",   "Ham_WeaponTouch_Pre",          0 );
    RegisterHam( Ham_Touch,                     "weaponbox",        "Ham_WeaponTouch_Pre",          0 );
and check if player alive?
Code:
if( !is_user_alive( client ) )
        return HAM_IGNORED;
3: What is different:
Code:
get_players (iPlayers, iNum, "aceh", "TERRORIST");
>>
Code:
get_players (iPlayers, iNum, "ae", "TERRORIST");
any check if T alive? i just want check if less 2 player alive no start day
if ( g_iCurrentDay == DAY_NONE )

EDIT: get warning
Code:
    static iPlayers[ 32 ], iNum;
    get_players( iPlayers, iNum, "ae", "TERRORIST" );
           
    if ( iNum == 1 )
    {
        
        ColorChat( 0, NORMAL, "There are not enough^x03 Prisoners^x01 alive to start this day." );
        
        g_iCurrentDay == DAY_NONE;
        
        return;
    }
Code:
Warning: Expression has no effect
__________________
Қазақстан Республикасы

Last edited by Snitch; 09-20-2015 at 16:27.
Snitch is offline
Send a message via Skype™ to Snitch
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-21-2015 , 14:01   Re: Weaponent touch
Reply With Quote #2

1.OFFSET_PRIMARYWEAPON seems to be m_fHasPrimary. The bug is that you can't pickup armoury entities ? Then yes, depending on how you will use it. But this bug is fixed: https://github.com/ValveSoftware/halflife/issues/1 If it's not fixed for you update your HLDS.
2.https://forums.alliedmods.net/showthread.php?t=235139
3.http://amxmodx.org/api/amxmodx/get_players
4.== is used to check if something is equal to something, if you want to give values use just =.
__________________

Last edited by HamletEagle; 09-21-2015 at 14:02.
HamletEagle is offline
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 09-22-2015 , 15:45   Re: Weaponent touch
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
1.OFFSET_PRIMARYWEAPON seems to be m_fHasPrimary. The bug is that you can't pickup armoury entities ? Then yes, depending on how you will use it. But this bug is fixed: https://github.com/ValveSoftware/halflife/issues/1 If it's not fixed for you update your HLDS.
2.https://forums.alliedmods.net/showthread.php?t=235139
3.http://amxmodx.org/api/amxmodx/get_players
4.== is used to check if something is equal to something, if you want to give values use just =.
thank about question 3 and the warning with ==.

but about 2: what different from
Code:
RegisterHam( Ham_Touch
to
Code:
register_touch("armoury_entity"
my plugin work i cant pick weapon, but sometimes i can take weapon from gun room at day
__________________
Қазақстан Республикасы

Last edited by Snitch; 09-22-2015 at 15:46.
Snitch is offline
Send a message via Skype™ to Snitch
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 22:16.


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