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

Op4 Deagle Laser Sight


Post New Thread Reply   
 
Thread Tools Display Modes
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 12-16-2022 , 15:02   Re: Op4 Deagle Laser Sight
Reply With Quote #11

Well RCBot uses bot_weapons.ini with a priority rating, where the Rocket Launcher, M249, and MP5/M4 are higher than the Desert Eagle.

For JK-Botti on the other hand it doesn't appear to have priority or preferred weapons for bots to ignore lame weapons like Glocks, .357s, satchels etc. However, if I am not mistaken it seems that JK-Botti uses the `use_percent` from bot_weapons.h and .cpp that are used in each of the HLDM and Op4 weapons.
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
administratora
Member
Join Date: Mar 2015
Old 12-18-2022 , 09:21   Re: Op4 Deagle Laser Sight
Reply With Quote #12

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("No Deagle Laser""1.0""Your Name");

    
// Register the "use" event for the Deagle
    
register_event("use""UseDeagle""b""1!0""2!0");
}

public 
UseDeagle(id)
{
    
// Check if the player is using the Deagle and the laser sight is turned off
    
if (get_user_weapon(id) == CSW_DEAGLE && !get_user_laser(id))
    {
        
// Send a message to the player telling them they cannot use the Deagle with the laser sight turned off
        
client_print(idprint_center"You cannot use the Deagle with the laser sight turned off");

        
// Return 1 to prevent the player from using the Deagle
        
return 1;
    }


Last edited by administratora; 12-18-2022 at 09:46.
administratora is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-19-2022 , 09:14   Re: Op4 Deagle Laser Sight
Reply With Quote #13

Had to use amxmodx/data/gamedata/common.games/entities.games/gearbox/offsets-ceagle.txt

Code:
new iLaserActive = get_pdata_int (iEagle, m_iLaserActive, LINUX_OFFSET_WEAPONS)
if( !iLaserActive )
{
    set_pdata_int( iEagle, m_iLaserActive, 1, LINUX_OFFSET_WEAPONS );
}
__________________

Last edited by DJEarthQuake; 12-19-2022 at 13:31. Reason: URL
DJEarthQuake 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 13:58.


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