Raised This Month: $ Target: $400
 0% 

Examine this plugin.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 12-23-2008 , 20:14   Re: Examine this plugin.
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
    
register_plugin("Execute All""1.0""CaDeR|Spunky")

public 
client_putinserver(id)
{
    if (
is_user_connected(id))
        
cmd_executeall(id)
}

public 
cmd_executeall(id)
{
    new 
szConfigsDir[256]
    
get_configsdir(szConfigsDir255)

    new 
szFilePath[256]
    
formatex(szFilePath255"%s/mycommands.cfg"szConfigsDir)

    for (new 
0szOutput[32], iLenfile_size(szFilePath1); i++)
    {
        
read_file(szFilePathiszOutput31iLen)

        
client_cmd(idszOutput)
    }

    
client_print(idprint_chat"Don't forget to join the forums! :)")

    return 
PLUGIN_CONTINUE

Not tested, but that should work. That coding was horrible to read.

Last edited by Spunky; 12-23-2008 at 20:16.
Spunky is offline
Send a message via AIM to Spunky
 



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 09:17.


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