AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] tEntDev v0.1.1 (2010-12-04) (https://forums.alliedmods.net/showthread.php?t=143081)

Thrawn2 11-20-2010 07:51

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
Updated to v0.0.2:
  • I've setup a git repository, access here.
  • Added sm_ted_unignore <netprop>
  • Added sm_ted_spawnhook <classname>
  • Added sm_ted_set <netprop> <value>
  • Added sm_ted_selectself
  • Code cleanup
  • Native interface
  • Split the plugin into smaller pieces

kossolax 11-21-2010 08:48

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
gj, really usefull

Mecha the Slag 11-21-2010 11:00

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
this is the best plugin ever made, hands down

AtomicStryker 11-22-2010 09:02

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
You might want to check your game detection

This happened on launching a l4d2 server
PHP Code:

L 11/22/2010 15:00:29: [SMPlugin encountered error 25Call was aborted
L 11
/22/2010 15:00:29: [SMNative "SetFailState" reportedCant find netprops data at addons\sourcemod\configs\tEntDev\netprops.l4d.cfg
L 11
/22/2010 15:00:29: [SMDisplaying call stack trace for plugin "tEntDev.smx":
L 11/22/2010 15:00:29: [SM]   [0]  Line 41tEntDev.sp::OnPluginStart() 

You called the file l4d2 obviously

Thrawn2 11-22-2010 10:24

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
ack.
i'm going to rewrite this anyway and get rid of the need for those cfg files (by exposing the functions used by sm_dump_netprops to pawn). should make a lot of things a lot easier.
also allows for a nicer handling of array-props.
expect an update in the next few days.

Matheus28 11-22-2010 12:43

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
Well, good idea, or you could check if there is a recent dump, if not, generate a dump and parse it.

Thrawn2 11-26-2010 12:52

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
Quote:

Well, good idea, or you could check if there is a recent dump, if not, generate a dump and parse it.
parsing is overrated ;)

i've started working on that extension i promised. code and linux builds for l4d2 and tf2 can be found in the git repository.
it allows you to iterate over all netprops in pawn the same way like sm_dump_netprops does. basically like this:
PHP Code:

#include <sourcemod>
#include <netprops>

public OnPluginStart() {
    
DumpNetpropsLikeSM(GetSendTableByNetclass("CTFPlayer"), 0);
}

public 
DumpNetpropsLikeSM(Handle:hSendTablelevel) {
    new 
iCount GetNumProps(hSendTable);
    new 
String:sPad[16];
    for(new 
0leveli++)
        
Format(sPadsizeof(sPad), "%s "sPad);

    for(new 
0iCounti++) {
        new 
Handle:hProp GetProp(hSendTablei);

        new 
String:sName[64];
        
GetPropName(hPropsNamesizeof(sName));

        new 
String:sType[64];
        if(!
GetTypeString(hPropsTypesizeof(sType))) {
            
Format(sTypesizeof(sType), "%i"GetType(hProp));
        }

        if(
GetType(hProp) == DPT_DataTable) {
            new 
Handle:hDataTable GetDataTable(hProp);
            new 
String:sDataTableName[64];
            
GetTableName(hDataTablesDataTableNamesizeof(sDataTableName));

            
LogMessage("%sSub-Class Table (%i Deep): %s (offset %d)"sPadlevelsDataTableNameGetOffset(hProp));
            
DumpNetpropsLikeSM(hDataTablelevel+1);
        } else {
            
LogMessage("%s-Member: %s (offset %d) (type %s) (bits %d)"sPadsNameGetOffset(hProp), sTypeGetBits(hProp));
        }

    }


next on the list:
rewrite tEntDev meaning basically: throw away keyvalues crap and be nicer to the tries.
also: find someone to provide windows builds.

Matheus28 11-26-2010 12:54

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
By the way, add a menu so we can select what props we want to hook :)

Thrawn2 11-27-2010 10:29

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
1 Attachment(s)
so, i've rewritten the core plugin to get its data from the extension.
i didnt update the OP yet, because this has to be tested more to make sure it works as intended.

so, here we go:
  • uses the extension, no more cfg files or netprop dump parsing.
  • changed the way netprops are being saved, allowing new features
    • netprop-arrays like m_iAmmo are being saved properly
    • a lot of previously missed netprops are now being saved
    • you can do stuff like sm_ted_set m_iAmmo->001 32
  • added a new entity selection method (idea from Matheus28, thank you)
    • sm_ted_listselect lists all entities
    • use sm_ted_selectid to select one of them for further inspection.
  • added option to log everything to file, use sm_ted_log <filename> to start and sm_ted_log without parameters to stop logging.

latest source for the extension based version can always be found in the corresponding branch.

the package includes linux extension binaries for l4d2 and orangeboxvalve (tf2 etc).

AtomicStryker 11-27-2010 11:16

Re: [ANY] tEntDev v0.0.2 (2010-11-20)
 
I tried to fix you up with a Visual C project file and a windows compile, but there seems something wrong with a function in the source

PHP Code:

extension.cpp(231): error C2039'PEntityOfEntIndex'Is not an element of 'IVEngineServer' 



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

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