Raised This Month: $ Target: $400
 0% 

Very noobie (Writing to file!)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sodium
Member
Join Date: Oct 2004
Old 06-01-2005 , 01:00   Very noobie (Writing to file!)
Reply With Quote #1

SOLVED.
Thanks alot, v3x.
Sodium is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 06-01-2005 , 08:21  
Reply With Quote #2

vex pls post how maybe i need it someday
__________________
- Bye bye!
nightscreem is offline
Sodium
Member
Join Date: Oct 2004
Old 06-01-2005 , 08:36   code
Reply With Quote #3

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

public plugin_init() {
	register_plugin("pluginname","version","v3x..prettymuch")
	register_clcmd("amx_addtext","addtext")
}

new g_FileLocation[]="moddir\locationtofile.txt"

public addtext(id,level,cid) {
	
	if(!cmd_access(id,level,cid,2))
		return PLUGIN_HANDLED
		
	new fileTxt[64]
	format(fileTxt,63,"This text will be added to the file on a new line")
	
	write_file(g_FileLocation,fileTxt,-1)
        return PLUGIN_HANDLED
}
That's the basics!
Sodium 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 16:49.


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