Raised This Month: $ Target: $400
 0% 

admin.txt plugin help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-09-2005 , 12:02  
Reply With Quote #9

You shouldn't hard-code the configs directory path, instead Include <amxmisc> into your plugin and use:

Code:
stock get_configsdir(name[],len)


Example:
Code:
#include <amxmodx> #include <amxmisc> public say_motd(id) {     show_motd(id, "motd.txt", "Message of the Day")     return PLUGIN_HANDLED } public say_admins(id) {     new szFileDir[64]     get_configsdir( szFileDir, 63 )     format( szFileDir, 63, "%s/admin.txt", szFileDir )     show_motd(id, szFileDir, "All Admins")     return PLUGIN_HANDLED } public plugin_init() {     register_plugin("say /motd", "0.2", "Nightscream")     register_clcmd("say /motd", "say_motd")     register_clcmd("say /admins", "say_admins") }
xeroblood is offline
Send a message via MSN to xeroblood
 



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


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