Raised This Month: $19 Target: $400
 4% 

Laser/TripMine Entity


Post New Thread Reply   
 
Thread Tools Display Modes
SaraAki
Senior Member
Join Date: Nov 2022
Old 04-03-2025 , 03:22   Re: Laser/TripMine Entity
Reply With Quote #761

Quote:
Originally Posted by +ARUKARI- View Post
Please update lasermine.inc.
And add `return HAM_IGNORED;` at the end of the function.
Ok.
One more thing...
Is it possible to adjust that fence is disabled for specific player,for example
PHP Code:
if(is_user_zombie(victim) && is_user_alive(victim) && g_rageactivated[victim])
      {
              
no fence knock back for this player
       

SaraAki is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-03-2025 , 03:43   Re: Laser/TripMine Entity
Reply With Quote #762

Quote:
Originally Posted by SaraAki View Post
Ok.
One more thing...
Is it possible to adjust that fence is disabled for specific player,for example
PHP Code:
if(is_user_zombie(victim) && is_user_alive(victim) && g_rageactivated[victim])
      {
              
no fence knock back for this player
       

Unfortunately, the logic was written in the wrong place, so it cannot be disabled right now. I'll fix it later, so please wait.

EDIT: Fixed.
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 04-03-2025 at 10:46.
+ARUKARI- is offline
SaraAki
Senior Member
Join Date: Nov 2022
Old 04-03-2025 , 13:06   Re: Laser/TripMine Entity
Reply With Quote #763

Quote:
Originally Posted by +ARUKARI- View Post
Please update lasermine.inc.
And add `return HAM_IGNORED;` at the end of the function.
This just doesn't work.For testing I also try to add player god mode,set_user_godmode(id, 1),but even after that laser kill player who has god mode activated.

And for fence,can you show me example how to use it in the extra item code?

Last edited by SaraAki; 04-03-2025 at 13:24.
SaraAki is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-03-2025 , 20:27   Re: Laser/TripMine Entity
Reply With Quote #764

Quote:
Originally Posted by SaraAki View Post
This just doesn't work.For testing I also try to add player god mode,set_user_godmode(id, 1),but even after that laser kill player who has god mode activated.
And for fence,can you show me example how to use it in the extra item code?
I don't think godmode was checked.
If you want to check it, please rewrite the additional code as shown below.
This code should also disable the fence function.
PHP Code:
public LM_OnHit_Pre(victimattackerlmdamage)
{
    if (
is_user_alive(victim))
    {
        
// Check GodMode.
        
if(get_user_godmode(victim))
            return 
HAM_HANDLED;        

        
// through damage and fences.
        
if(is_user_zombie(victim) && g_rageactivated[victim])
            return 
HAM_HANDLED;        
    }
    return 
HAM_IGNORED;

__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 04-03-2025 at 20:29.
+ARUKARI- is offline
SaraAki
Senior Member
Join Date: Nov 2022
Old 04-09-2025 , 16:48   Re: Laser/TripMine Entity
Reply With Quote #765

It works.
Anyway,is it possible to disable only fence knockback ?
Because right now fence effect can be disabled only if damage is disabled.

Last edited by SaraAki; 04-12-2025 at 10:38.
SaraAki is offline
GetReady
Junior Member
Join Date: Feb 2025
Old 04-23-2025 , 08:49   Re: Laser/TripMine Entity
Reply With Quote #766

After i uncoment #define ZP_SUPPORT i cant compile plugin and error is (number of arguments does not match definition)
GetReady is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-23-2025 , 20:27   Re: Laser/TripMine Entity
Reply With Quote #767

Quote:
Originally Posted by SaraAki View Post
It works.
Anyway,is it possible to disable only fence knockback ?
Because right now fence effect can be disabled only if damage is disabled.
try cvar change.
amx_ltm_laser_fence "0"

Quote:
Originally Posted by GetReady View Post
After i uncoment #define ZP_SUPPORT i cant compile plugin and error is (number of arguments does not match definition)
What is the version of ZP and what is the target function?
I believe only 5.0 was supported.
In the future, I will also discontinue support for ZP.
Instead, I will deploy Native functions, so please create an overlap plugin for ZP.
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 04-23-2025 at 20:31.
+ARUKARI- is offline
SaraAki
Senior Member
Join Date: Nov 2022
Old 04-24-2025 , 07:50   Re: Laser/TripMine Entity
Reply With Quote #768

I thought something like this - when player buys item,he will have immune on laser fence.
PHP Code:
if(g_antifenceitem[id])
{
          
//this player is immune on fence knockback


Last edited by SaraAki; 04-26-2025 at 02:57.
SaraAki is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-03-2025 , 23:34   Re: Laser/TripMine Entity
Reply With Quote #769

Quote:
Originally Posted by SaraAki View Post
I thought something like this - when player buys item,he will have immune on laser fence.
PHP Code:
if(g_antifenceitem[id])
{
          
//this player is immune on fence knockback

Update to the latest version.

The following functions have been added.
PHP Code:
/**
 * @param client                 Client index of the player who is being hitted
 * @noreturn
 */
forward LM_OnHitFences_Pre(client);

/**
 * @param client                 Client index of the player who has been hitted
 * @noreturn
 */
forward LM_OnHitFences_Post(client); 
Usage:
PHP Code:
// Before hitting the laser fence
public LM_OnHitFences_Pre(victimattackerlmdamage)
{
    
// through damage and fences.
    
if(/*if invalid fence*/)
           return 
HAM_HANDLED;        

    return 
HAM_IGNORED;
}

// After hitting the laser fence
public LM_OnHitFences_Post(victimattackerlmdamage)
{
    
// after additional logic.
    
return HAM_IGNORED;

If amx_ltm_laser_fence is set to '0,' this logic will not function.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
SaraAki
Senior Member
Join Date: Nov 2022
Old 05-07-2025 , 11:51   Re: Laser/TripMine Entity
Reply With Quote #770

Thank you.
What about this:
PHP Code:
register_event("DeathMsg""Event_DeathMsg""a"
PHP Code:
public Event_DeathMsg()
{
    new 
iKiller read_data(DeathMsg_KillerID)
    if( 
IsPlayer(iKiller) && is_user_connected(iKiller) )
    {
        new 
iVictim read_data(DeathMsg_VictimID)
        if( 
iVictim != iKiller )
        {
            
g_iNewMoney clamp
                        

                            
cs_get_user_money(iKiller) + get_pcvar_numcs_get_user_team(iVictim) == cs_get_user_team(iKiller) ? g_pCvarTkMoney : (read_data(DeathMsg_IsHeadshot) ? g_pCvarKillMoneyHs g_pCvarKillMoney) ), 
                            
0
                            
get_pcvar_num(g_pCvarMaxMoney)
                        )
            
g_iMsgHookMoney register_message(gmsgMoney"Message_Money")
        }
    }

What I want is,if the player dies from the laser no bonus money for the killer.
what did i try is:
PHP Code:
if(IsLM(iKiller))
            return 
PLUGIN_HANDLED

        
static szWeaponName];

        
read_data4szWeaponNamecharsmaxszWeaponName ) );

        if ( 
equalszWeaponName"world" ) )
            return 
PLUGIN_HANDLED 
but this doesn't work
SaraAki is offline
Old 05-07-2025, 12:51
WATCH_D0GS UNITED
This message has been deleted by WATCH_D0GS UNITED. Reason: PM
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 06:31.


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