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-13-2017 , 11:31   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
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-13-2017 , 12:05   Re: How to execute console commands from metamod plugin?
Reply With Quote #2

https://forums.alliedmods.net/forumdisplay.php?f=9
__________________
Ayman Khaled 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 01:08.


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