Raised This Month: $32 Target: $400
 8% 

How to execute console commands from metamod plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KennyJones
New Member
Join Date: Aug 2017
Old 08-15-2017 , 13:48   How to execute console commands from metamod plugin?
Reply With Quote #1

PHP Code:
C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME
        
META_FUNCTIONS *pFunctionTablemeta_globals_t *pMGlobals
        
gamedll_funcs_t *pGamedllFuncs


    
gpMetaGlobals=pMGlobals;
    
memcpy(pFunctionTable, &gMetaFunctionTablesizeof(META_FUNCTIONS));
    
gpGamedllFuncs=pGamedllFuncs;

    
SERVER_COMMAND("mycmd");
    
SERVER_EXECUTE();
...

Nothing seems to happen after using SERVER_COMMAND or SERVER_EXECUTE.

I see that here is also a function CLIENT_COMMAND(edict_t *pEdict, const char *szFmt,...) but I don't know how to get the pointer to the client entity that loaded the plugin.
KennyJones is offline
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 20:30.


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