Raised This Month: $ Target: $400
 0% 

Writing to file?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-24-2010 , 02:37   Writing to file?
Reply With Quote #1

Ok, so I'm trying to make a plugin that, when a client joins your server, it gets his steamid, name, and ip, and writes it to a file. When I join the server, nothing gets written to the file.
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "AutoSteamID and IP Log"
#define VERSION "1.0"
#define AUTHOR "H3avY Ra1n"


public plugin_init() {
    //Register Plugin
    register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id)
{
    new authid[32]
    new name[32]
    new ip[32]
    get_user_authid(id, authid, 31)
    get_user_ip(id, ip, 31)
    new fp = fopen("addons/amxmodx/configs/logging.txt", "wt")
    get_user_name(id, name, 31)
    trim(authid)
    trim(ip)
    trim(name)
    fprintf(fp, "%s-%s-%s-%s", name, authid,ip)
    fclose(fp)
}
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
 



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:06.


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