Raised This Month: $51 Target: $400
 12% 

amx_commandslist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aran384
Junior Member
Join Date: Apr 2004
Old 04-19-2004 , 19:42   amx_commandslist
Reply With Quote #1

there was once a command that made a html export of all the commands and the access needed to use them i dont remember wot it was called but i would like it if some1 could take the time to make something like this cos i have commands that i dont wnana give to certain ppl and i dont know wot access the command is on =/

could u help ??
aran384 is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-19-2004 , 19:51  
Reply With Quote #2

Code:
/***********************************************************************
 * amx_ejl_cmdlistgenerator.sma     version 1.0      July 19/2003
 *  By:  Eric Lidman	Alias: Ludwig van      [email protected]
 *  Upgrade: http://lidmanmusic.com/cs/plugins.html  
 *
 *  This is basically amx_help with a twist. Use amx_help in game, 
 *   but use this plugin to create command lists for your admins in an
 *   html page format. I wrote this plugin because my admins are always
 *   asking me to send them a command list by email. But since my server 
 *   constantly changes as I write and add/subtract stuff, its hard to 
 *   keep a list up to date. Now I can with ease and I can taylor the
 *   list to the admin's access level. An html file is created in your
 *   amx folder when you execute this command with all the commands that
 *   are currently on your server.
 *
 * Commands:
 *
 *   amx_writehelp <flags>  --Writes a list of all the commands that an
 *                            admin with the flags you enter has access to.
 *                            If no flags are given, all flags are used.
 *
 *************************************************************************/
Attached Files
File Type: sma Get Plugin or Get Source (amx_ejl_cmdlistgenerator.sma - 1403 views - 3.3 KB)
__________________
My Plugins

Got ??
AssKicR is offline
aran384
Junior Member
Join Date: Apr 2004
Old 04-19-2004 , 19:55  
Reply With Quote #3

ty i didn't know where to look cos i looked tho the plugins section so i did one thing right
aran384 is offline
aran384
Junior Member
Join Date: Apr 2004
Old 04-20-2004 , 14:20  
Reply With Quote #4

dont work =/

18:114 [AMXX] Run time error 10 on line 45 (plugin "amx_ejl_cmdlistgenerator.amx")

get that error
aran384 is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 04-28-2004 , 14:37  
Reply With Quote #5

i had a little problem with the plugin, but it's easy to fix:

Quote:
Originally Posted by amx_ejl_cmdlistgenerator.sma
/********************************************* **************************
* amx_ejl_cmdlistgenerator.sma version 1.0 July 19/2003
* By: Eric Lidman Alias: Ludwig van [email protected]
* Upgrade: http://lidmanmusic.com/cs/plugins.html
*
* This is basically amx_help with a twist. Use amx_help in game,
* but use this plugin to create command lists for your admins in an
* html page format. I wrote this plugin because my admins are always
* asking me to send them a command list by email. But since my server
* constantly changes as I write and add/subtract stuff, its hard to
* keep a list up to date. Now I can with ease and I can taylor the
* list to the admin's access level. An html file is created in your
* amx folder when you execute this command with all the commands that
* are currently on your server.
*
* Commands:
*
* amx_writehelp <flags> --Writes a list of all the commands that an
* admin with the flags you enter has access to.
* If no flags are given, all flags are used.
*
********************************************* ****************************/

#include <amxmodx>
#include <amxmisc>

public admin_writehelp(id,level,cid){
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
new arg1[32],oldcmd[32],filename[128],sflags[32],info[128],cmd[32],conclist[256],heading[192]
new flags,eflags
read_argv(1,arg1,31)
if(!arg1[0])
flags = read_flags("abcdefghijklmnopqrstuvwxyz")
else
flags = read_flags(arg1)
new clcmdsnum = get_concmdsnum(flags,id)
get_flags(flags,sflags,31)
format(filename,127,"addons/amxx/AMXX_Command_List_for_access_%s.html",sflags)
format(heading,191,"<div align=^"center^" style=^"font-size:20pt^" style=^"color:white^"><font face=^"Arial^">\
AMXX COMMAND LIST FOR FLAGS: %s</div>
",sflags)
if(file_exists(filename))
delete_file(filename)
console_print(id,"[AMXX] Creating html help file in amx folder.")
write_file(filename,"<html><head><title>AMXX Command List</title></head><body bgcolor=^"Green^">",-1)
write_file(filename,heading,-1)
write_file(filename,"<table width=^"100%^" border=^"1^" bgcolor=^"Silver^" bordercolordark=^"Black^" \
bordercolorlight=^"Black^" cellpadding=^"1^">",-1)
write_file(filename,"<tr><td>Command</td><td>Usage / description</td><td>Access flag required</td></tr>
",-1)
for (new i = 0; i < clcmdsnum; i++){
get_concmd(i,cmd,31,eflags,info,127,flags,id)
if(id == 0)
console_print(id,"[AMXX] Creating html help file. Progress: %d / %d",i+1,clcmdsnum)
get_flags(eflags,sflags,31)
for(new rp = 0;rp<strlen(info) / 3;rp++){
replace(info,127,"<","[")
replace(info,127,">","]")
}
format(conclist,255,"<div style=^"font-size:12pt^" style=^"color:white^"><font face=^"Arial^"><tr><td>%s</td>\
<td>%s</td><td><div align=^"center^">%s</div></td></tr></div>",cmd,info,sflags)
if(!equal(oldcmd,cmd))
write_file(filename,conclist,-1)
copy(oldcmd,31,cmd)
}
write_file(filename,"</table></body></html>",-1)
console_print(id,"[AMXX] Done.")
return PLUGIN_HANDLED
}

public plugin_init() {
register_plugin("Write help to html file","0.1","EJL")
register_concmd("amx_writehelp","admin_writeh elp",ADMIN_RCON,"<flags> prints help for commands with this access level")
return PLUGIN_CONTINUE
}
just change the path in the plugin to your amxx mod folder (like i did with red), should work
then, at least now it works fine for me!

by the way, CHMOD 777 your amxx folder on the gameserver,
otherwise the html file can't be created.
FeuerSturm is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 02-03-2005 , 11:14  
Reply With Quote #6

can someone post an exemple of the .txt file
__________________
- Bye bye!
nightscreem is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 02-06-2005 , 17:02  
Reply With Quote #7

plz someone help me i hope this plugin is not to old
__________________
- Bye bye!
nightscreem 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 17:27.


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