Raised This Month: $ Target: $400
 0% 

Simple plugin not working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 05-29-2007 , 14:57   Re: Simple plugin not working
Reply With Quote #6

I would do it like this:

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "List Maps" #define VERSION "1.0" #define AUTHOR "stupok69" #define MAP_DIR "maps" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /maps", "function_list_maps", -1, "lists all maps on server")     register_clcmd("say maps", "function_list_maps", -1, "lists all maps on server")     register_concmd("list_maps", "function_list_maps", -1, "lists all maps on server") } public function_list_maps(id) {     new file[64]         new dirh = open_dir(MAP_DIR, file, 63)         if(dirh)     {         if(containi(file, ".bsp") != -1)         {             console_print(id, file)         }     }     else     {         console_print(id, "Directory (%s) could not be opened.", MAP_DIR)     }         new counter     while(next_file(dirh, file, 63))     {         if(containi(file, ".bsp") != -1)         {             counter++             set_task(0.01 * float(counter), "delay_console_print", id, file, 63)         }     }         close_dir(dirh) } public delay_console_print(params[], id) {     console_print(id, params) }
stupok is offline
 



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 10:37.


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