Raised This Month: $ Target: $400
 0% 

Wrong section


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-26-2010 , 04:39   Wrong section
Reply With Quote #1

Wrong section :S

Last edited by Vechta; 07-26-2010 at 08:01.
Vechta is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-26-2010 , 07:10   Re: How to create
Reply With Quote #2

First make a function

public client_putinserver(id) // will run whenever someone connEcts

New name[32]
new file=fopen("addons/amxmodx/configs", "wt") // wt is write text
name=get_user_name(id)
Fprintf(fp, name)
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-26-2010 , 07:47   Re: How to create
Reply With Quote #3

O.o

How to create an ini file someone can give me an full code ?
Vechta is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-27-2010 , 00:38   Re: Wrong section
Reply With Quote #4

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

public plugin_init()
{
register_plugin("NAME", "1.0", "AUTHOR")
}
public client_putinserver(id)
{
new name[32]
get_user_name(id, name, 31)
write_file("addons/amxmodx/configs/names.txt", name)
}
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-27-2010 , 01:12   Re: Wrong section
Reply With Quote #5

I don't know if you meant it or not, but you are better off not hardcoding paths like that.
RedRobster is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-27-2010 , 01:23   Re: Wrong section
Reply With Quote #6

Oh, well how should you save the file paths? I knew that, but forgot how to save the paths. :/
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-27-2010 , 01:35   Re: Wrong section
Reply With Quote #7

PHP Code:
new gFileName[128]

public 
plugin_init()
{
    new 
dir[64]
    
get_localinfo("amxx_datadir"dir63)
    
format(gFileName127"%s/blah.w/e"dir)

You can replace "amxx_datadir" (data folder) with "amxx_configsdir" (configs folder) if you want. I'm not sure about the rest of them though.
RedRobster 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 00:11.


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