Raised This Month: $51 Target: $400
 12% 

Solved How can move and shoot while defusing the bomb


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brian763
Junior Member
Join Date: Sep 2019
Old 11-12-2019 , 10:20   How can move and shoot while defusing the bomb
Reply With Quote #1

I found the Counter-Strike 1.3 plugin, but in Counter-Strike 1.3, you can move while defusing the bomb, also you can shoot.

I already searched the forum ,but have not found how to allow move and shoot while defusing.

Greatly appreciated it if you could help me.

https://forums.alliedmods.net/showthread.php?p=1298986

Last edited by brian763; 11-16-2019 at 00:26.
brian763 is offline
brian763
Junior Member
Join Date: Sep 2019
Old 11-14-2019 , 06:56   Re: How can move and shoot while defusing the bomb
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Allow Move && Shoot While Defusing"
#define VERSION "1.0"
#define AUTHOR "Brian"

public plugin_init()
{
    if(
engfunc(EngFunc_FindEntityByString, -1"classname","func_bomb_target") || engfunc(EngFunc_FindEntityByString, -1"classname","info_bomb_target"))
    {
        
register_event("BarTime""event_defusing""be""1=5""1=10")
        
register_plugin(PLUGINVERSIONAUTHOR)
    }
    else
    {
        
register_plugin(PLUGINVERSIONAUTHOR)
        return
    }
}

public 
event_defusing(id)
{
    
set_user_maxspeed(id,250.0)

I found a way to allow move while defusing the bomb.
But I didn't find how to enable the Primary attack while defusing the bomb


I try this but not work
PHP Code:
public event_defusing(id)
{
    
set_user_maxspeed(id,250.0)
    if (
pev(id,pev_button)&IN_ATTACK && !(pev(id,pev_oldbuttons)&IN_ATTACK))
    {
        const 
m_pActiveItem 373;
        new 
iWeaponEnt get_pdata_cbaseid m_pActiveItem );
        
ExecuteHamHam_Weapon_PrimaryAttack iWeaponEnt );
    }

Greatly appreciated it if you could help me.

Last edited by brian763; 11-14-2019 at 06:58.
brian763 is offline
brian763
Junior Member
Join Date: Sep 2019
Old 11-14-2019 , 10:25   Re: How can move and shoot while defusing the bomb
Reply With Quote #3

I added some code to allow shoot while defusing the bomb.

PHP Code:
#include <hamsandwich>
#include <engine>
#include <cstrike>

#define PLUGIN "Allow Move && Shoot While Defusing"
#define VERSION "1.0"
#define AUTHOR "Brian"

const IsDefusing = (1<<8)
#define is_user_defusing(%0)    ( get_pdata_int(%0,232,5) & IsDefusing )


public plugin_init()
{
    if(
engfunc(EngFunc_FindEntityByString, -1"classname","func_bomb_target") || engfunc(EngFunc_FindEntityByString, -1"classname","info_bomb_target"))
    {
        
register_event("BarTime""event_defusing""be""1=5""1=10")
        
register_forwardFM_CmdStart"CmdStart" )
        
register_plugin(PLUGINVERSIONAUTHOR)
    }
    else
    {
        
register_plugin(PLUGINVERSIONAUTHOR)
        return
    }
}

public 
event_defusing(id)
{
    
set_user_maxspeed(id,250.0)
}

public 
CmdStart(iduc_handleseed)
{
    if ( !
is_user_aliveid ) )
        return 
FMRES_IGNORED
    
    
if ( is_user_defusing(id) )
    {
        if ( ( 
get_uc(uc_handleUC_Buttons) & IN_ATTACK ) && !( pevid pev_oldbuttons ) & IN_ATTACK ) )
        {
            
set_ucuc_handle UC_Buttons get_ucuc_handle UC_Buttons ) & ~IN_ATTACK );
            
            const 
m_pActiveItem 373;
            new 
iWeaponEnt get_pdata_cbaseid m_pActiveItem );
            
ExecuteHamHam_Weapon_PrimaryAttack iWeaponEnt );
        }
    }
    
    return 
FMRES_HANDLED

But no sound while shooting
press the left button once to shoot only once
Unable to control the right rate of fire


Greatly appreciated it if you could help me.

Last edited by brian763; 11-14-2019 at 10:26.
brian763 is offline
brian763
Junior Member
Join Date: Sep 2019
Old 11-16-2019 , 00:25   Re: How can move and shoot while defusing the bomb
Reply With Quote #4

Solved
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <cstrike>

#define PLUGIN "Allow Move && Shoot While Defusing"
#define VERSION "1.0"
#define AUTHOR "Brian"

const IsDefusing = (1<<8)
#define is_user_defusing(%0)    ( get_pdata_int(%0,232,5) & IsDefusing )

public plugin_init()
{
    if(
engfunc(EngFunc_FindEntityByString, -1"classname","func_bomb_target") || engfunc(EngFunc_FindEntityByString, -1"classname","info_bomb_target"))
    {
        
register_event("BarTime""event_defusing""be""1=5""1=10")
        
register_plugin(PLUGINVERSIONAUTHOR)
    }
    else
    {
        
register_plugin(PLUGINVERSIONAUTHOR)
        return
    }
}

public 
event_defusing(id)
{
    
set_user_maxspeed(id,250.0)
    const 
m_bIsDefusing 232;
    
set_pdata_int(idm_bIsDefusing50x00FF0000)

But in Counter Stirke 1.3 deploy new weapon will not interrupt the bartime
I want to know how to simulate it
Does not mean I play Counter Stirke 1.3, I play Counter Stirke 1.6!
Greatly appreciated it if you could help me.

Last edited by brian763; 11-20-2019 at 06:25.
brian763 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-18-2019 , 12:38   Re: How can move and shoot while defusing the bomb
Reply With Quote #5

Quote:
Originally Posted by brian763 View Post
Solved
public event_defusing(id)
{
set_user_maxspeed(id,250.0)
const m_bIsDefusing = 232;
set_pdata_int(id, m_bIsDefusing, 5, 0x00FF0000)

But in Counter Stirke 1.3 deploy new weapon will not interrupt the bartime
I want to know how to do it
Greatly appreciated it if you could help me.
From my understanding m_bIsDefusing is a bool.

The hard-coding is 949 not 232.
You are also trying to set a possible C++ color byte where an diff goes.
Quote:
native set_pdata_int(_index, _Offset, _Value, _linuxdiff = 5, _macdiff = 5)
;
Code:
                    "m_bIsDefusing"  // bool                     {                         "type"      "boolean"                         "windows"   "929"                         "linux"     "949"                         "mac"       "949"                     }

Do you mean the plugin Amxx 1.3?
How does below code not crash?
Quote:
set_pdata_int(id, m_bIsDefusing, 5, 0x00FF0000)
__________________

Last edited by DJEarthQuake; 11-18-2019 at 12:38.
DJEarthQuake is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-18-2019 , 13:21   Re: How can move and shoot while defusing the bomb
Reply With Quote #6

Or maybe

PHP Code:
set_ent_data(id"CGrenade""m_bStartDefuse"1
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-18-2019 , 16:35   Re: How can move and shoot while defusing the bomb
Reply With Quote #7

I sugfest use csx module or iceedr solution.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-20-2019 , 03:52   Re: How can move and shoot while defusing the bomb
Reply With Quote #8

Quote:
Originally Posted by brian763 View Post
Solved
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <cstrike>

#define PLUGIN "Allow Move && Shoot While Defusing"
#define VERSION "1.0"
#define AUTHOR "Brian"

const IsDefusing = (1<<8)
#define is_user_defusing(%0)    ( get_pdata_int(%0,232,5) & IsDefusing )

public plugin_init()
{
    if(
engfunc(EngFunc_FindEntityByString, -1"classname","func_bomb_target") || engfunc(EngFunc_FindEntityByString, -1"classname","info_bomb_target"))
    {
        
register_event("BarTime""event_defusing""be""1=5""1=10")
        
register_plugin(PLUGINVERSIONAUTHOR)
    }
    else
    {
        
register_plugin(PLUGINVERSIONAUTHOR)
        return
    }
}

public 
event_defusing(id)
{
    
set_user_maxspeed(id,250.0)
    const 
m_bIsDefusing 232;
    
set_pdata_int(idm_bIsDefusing50x00FF0000)

But in Counter Stirke 1.3 deploy new weapon will not interrupt the bartime
I want to know how to do it
Greatly appreciated it if you could help me.
Counter-Strike 1.3 ... what a coincidence.
No-Steam = No support!

Please buy CS 1.6 on Steam, update your server using SteamCMD, get AMXX 1.9 or 1.10, 1.8.2 will be discontinued soon, and use set_ent_data(id, "CBasePlayer", "m_bIsDefusing", false);

I think that's the proper way to disable defusing. Or try iceedr solution, that may work as well.

plugin_init is also done wrong, there's no need to return. Also, add register_plugin(PLUGIN, VERSION, AUTHOR) first before the if.
For the BarTime event, try using register_message to hook it as pre and return PLUGIN_HANDLED.

Anyway, you're not gonna get any future help if this method doesn't work, as long as you're not updating the server to latest HLDS build using SteamCMD. Only the latest version of HLDS with an updated server without the dproto module is supported here.

Last edited by DarthMan; 11-20-2019 at 03:56.
DarthMan is offline
brian763
Junior Member
Join Date: Sep 2019
Old 11-20-2019 , 06:19   Re: How can move and shoot while defusing the bomb
Reply With Quote #9

Quote:
Originally Posted by DarthMan View Post
Counter-Strike 1.3 ... what a coincidence.
No-Steam = No support!

Please buy CS 1.6 on Steam, update your server using SteamCMD, get AMXX 1.9 or 1.10, 1.8.2 will be discontinued soon, and use set_ent_data(id, "CBasePlayer", "m_bIsDefusing", false);

I think that's the proper way to disable defusing. Or try iceedr solution, that may work as well.

plugin_init is also done wrong, there's no need to return. Also, add register_plugin(PLUGIN, VERSION, AUTHOR) first before the if.
For the BarTime event, try using register_message to hook it as pre and return PLUGIN_HANDLED.

Anyway, you're not gonna get any future help if this method doesn't work, as long as you're not updating the server to latest HLDS build using SteamCMD. Only the latest version of HLDS with an updated server without the dproto module is supported here.
NO, I play the Counter-Strike 1.6.Also,I buyed CS 1.6 on Steam.
I mean I just want to simulate the behavior of the Counter-Strike 1.3.
You misunderstand
brian763 is offline
Reply



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 10:22.


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