AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Mission and Weapons - Info Editor (1.25) [25-Oct-2023] (https://forums.alliedmods.net/showthread.php?t=310586)

cravenge 01-30-2019 22:08

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.0) [10-Sep-2018]
 
Quote:

Originally Posted by Surf3rDud3 (Post 2637367)
[...]

Here's the updated Windows signature for L4D2.
PHP Code:

"CTerrorGameRules::GetMissionInfo"
{
    
"library"        "server"
    "linux"            "@_ZN16CTerrorGameRules14GetMissionInfoEv"
    "windows"        "\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x28\x56\xFF\xD2\x8B\x10\x8B\xC8\x8B\x42"
    
/* ? ? ? ? ? ? ? ? ? ? 8B 01 8B 50 28 56 FF D2 8B 10 8B C8 8B 42 */



sirphr 01-30-2019 22:36

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.0) [10-Sep-2018]
 
1 Attachment(s)
Thank you good sir.

Edit: For those who are too lazy.

BlackSabbarh 03-22-2019 03:36

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.0) [10-Sep-2018]
 
I get this error in l4d1?



[SM] Blaming: l4d_info_editor.smx
[SM] Call stack trace:
[SM] [0] SMCParser.GetErrorString
[SM] [1] Line 310, l4d_info_editor.sp::ParseConfigFile
[SM] [2] Line 292, l4d_info_editor.sp::LoadConfig
[SM] [3] Line 133, l4d_info_editor.sp::OnPluginStart
[SM] Unable to load plugin "l4d_info_editor.smx": Error detected in plugin startup (see error logs)

Silvers 06-01-2019 18:04

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1) [01-Jun-2019]
 
Finally the update is here, suggest updating to fix previous errors. Provides more functionality.

Quote:

1.1 (01-Jun-2019)
- Fixed reading incorrect data for map specific sections.
- Added support to load map specific weapon and melee data.
- Added commands to display mission and weapon changes applied to the current map.
- Added a command to get and set keyname values from the mission info.
- Added a command to reload the mission and weapons configs. Live changes can be made!
- Added natives to read and write mission and weapon data from third party plugins.
- Added test plugin to demonstrate natives and forwards for developers.
- Gamedata .txt changed.

Xanaguy 06-01-2019 23:10

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1) [01-Jun-2019]
 
For some odd reason, dhooks is not cooperating. Any way to remedy this?

Edit: Resolved. Nextmaps must be deleted.

huwong 07-29-2019 06:02

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1.1) [09-Jun-2019]
 
After I use this plugin, my server will crash from time to time.
https://crash.limetech.org/lfqdv2hjv3ct
Quote:

server_srv.so!CTerrorWeaponInfo::Reload() + 0x3f
Setting:
Code:

"weapon_info"
{
        "all"
        {
        // Incapped Weapons
        // Uncomment the following to enable usage of weapons while incapped by changing "WeaponType" to "pistol"
                "weapon_chainsaw"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_melee"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_pistol"
                {
                        "WeaponType"                        "pistol"
                        "clip_size"                                "125"
                }
                "weapon_pistol_magnum"
                {
                        "WeaponType"                        "pistol"
                        "clip_size"                                "250"
                }
                "weapon_molotov"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_vomitjar"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_pipe_bomb"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_grenade_launcher"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_rifle"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_rifle_ak47"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_rifle_desert"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_rifle_m60"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_smg"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_smg_mp5"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_smg_silenced"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_rifle_sg552"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_autoshotgun"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_shotgun_spas"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_hunting_rifle"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_sniper_awp"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_sniper_military"
                {
                        "WeaponType"                        "pistol"
                }
                "weapon_sniper_scout"
                {
                        "WeaponType"                        "pistol"
                }
        }
}

"mission_info"
{
        // The "all" section must be above map specific sections. Any partial matching map names will overwrite duplicate data from the "all" section.
        "all"
        {
                // Allowed melee weapons for the map - Replaces: [EXTENSION] [L4D2] Melee Spawn Control https://forums.alliedmods.net/showthread.php?t=222535
                // WORKS
                "meleeweapons"                                                                "fireaxe;frying_pan;machete;baseball_bat;crowbar;cricket_bat;tonfa;katana;electric_guitar;knife;golfclub"

                // Can't have female Boomers because there's no audio support
                // WORKS
                "no_female_boomers"
        }
}


moekai 08-21-2019 18:52

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1.1) [09-Jun-2019]
 
This is awesome. Thank you so much for this. Do you think you can add a command to get and set keyname values for the weapon info too?

Silvers 08-21-2019 19:07

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1.1) [09-Jun-2019]
 
Quote:

Originally Posted by moekai (Post 2664146)
This is awesome. Thank you so much for this. Do you think you can add a command to get and set keyname values for the weapon info too?

Not possible, once the data is read its saved somewhere else and the addresses become invalid. I tried.

Spirit_12 08-23-2019 01:10

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1.1) [09-Jun-2019]
 
Can you add the ability to read the data as well, at least for weapons. I know it is possible, because Downtown extension has that feature.

Silvers 08-23-2019 02:20

Re: [L4D & L4D2] Mission and Weapons - Info Editor (1.1.1) [09-Jun-2019]
 
As above, its not possible the way this plugin works.

Use the natives to write a plugin which reads the data. Use the sm_info_reload command to force it to reload and read the data when you want.


Example to get and set value via natives/forwards:

PHP Code:

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <l4d_info_editor>

#define MAX_STRING_LENGTH        4096

public void OnPluginStart()
{
    
RegAdminCmd("sm_info_weapon",    CmdInfoWeaponADMFLAG_ROOT"Get or set a weapon keyname value. Usage: sm_info_weapon <weapon classname> <keyname> [value]");
    
RegAdminCmd("sm_iw",             CmdInfoWeaponTestADMFLAG_ROOT"Tests: sm_info_weapon weapon_rifle clip_size");
}

bool g_bDone;
char g_sClass[MAX_STRING_LENGTH];
char g_sKey[MAX_STRING_LENGTH];
char g_sSet[MAX_STRING_LENGTH];

public 
Action CmdInfoWeaponTest(int clientint args)
{
    
ServerCommand("sm_info_weapon weapon_rifle clip_size");
    
// ServerCommand("sm_info_weapon weapon_rifle clip_size 25"); // Set value of 25.
}

public 
Action CmdInfoWeapon(int clientint args)
{
    if( 
args )
    {
        
ReplyToCommand(client"Usage: sm_info_weapon <weapon classname> <key>");
        return 
Plugin_Handled;
    }

    
GetCmdArg(1g_sClasssizeof g_sClass);
    
GetCmdArg(2g_sKeysizeof g_sKey);

    if( 
args == )
        
GetCmdArg(3g_sSetsizeof g_sSet);
    else
        
g_sSet[0] = '\x0';

    
g_bDone false;
    
ServerCommand("sm_info_reload");

    return 
Plugin_Handled;
}

public 
void OnGetWeaponsInfo(int pThis, const char[] classname)
{
    if( !
g_bDone )
    {
        if( 
strcmp(classnameg_sClass) == )
        {
            if( 
strlen(g_sSet) > )
            {
                
InfoEditor_SetString(pThisg_sKeyg_sSet);
                
PrintToServer("Info_Weapon: Set: %s/%s == %s"g_sClassg_sKeyg_sSet);
            }

            
char sResult[MAX_STRING_LENGTH];
            
InfoEditor_GetString(pThisg_sKeysResultsizeof sResult);
            
PrintToServer("Info_Weapon: %s/%s == %s"g_sClassg_sKeysResult);

            
g_bDone true;
        }
    }




All times are GMT -4. The time now is 06:14.

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