AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Weaponent touch (https://forums.alliedmods.net/showthread.php?t=271949)

Snitch 09-20-2015 16:23

Weaponent touch
 
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

HamletEagle 09-21-2015 14:01

Re: Weaponent touch
 
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 =.

Snitch 09-22-2015 15:45

Re: Weaponent touch
 
Quote:

Originally Posted by HamletEagle (Post 2345623)
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


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

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