Raised This Month: $ Target: $400
 0% 

[resolved] Parse/strbreak etc.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
stupok
Veteran Member
Join Date: Feb 2006
Old 10-14-2006 , 00:12   [resolved] Parse/strbreak etc.
Reply With Quote #1

I made a simple plugin that creates a log that looks like this:
(I removed the actual steamids)

My real log now has 742 unique users .

Code:
1	STEAM_0:1:11111		Ma$termind
2	STEAM_0:0:11111		hagen
3	STEAM_0:1:11111		The Federal Offender
4	STEAM_0:1:11111		Luis Rios
5	STEAM_0:1:11111		Zach' Triad' Bowman
6	STEAM_0:1:11111		Adolfus
7	STEAM_0:1:11111		sprayer
8	STEAM_0:1:11111		HABIB
9	STEAM_0:1:11111		Hellucard
10	STEAM_0:0:11111		Fillipeano
11	STEAM_0:0:11111		Jeff From accounting
12	STEAM_0:1:11111		jalop
13	STEAM_0:1:11111		nomel
However, I want to add a counter after the player's name, showing how many times the user has connected to my server. I've tried many variations of strbreak and parse, and I could not get the number to increase by 1 every time the user connected. It would just stay at 1.

Here's the code without the parse/strbreak or any variable to hold the number of times the user has connected. I'd like to know how to do this properly

Code:
    #include <amxmodx>     #include <amxmisc>     #include <file>     new szFile[32] = "addons/amxmodx/users_list.txt" public plugin_init() {     register_plugin("Steam n Nick Logger","1.0","stupok69") } public client_authorized(id) {     check_name(id)      return PLUGIN_CONTINUE } public check_name(id) {             new pAuth[33], pName[33], Len, szText[101]         get_user_authid(id, pAuth, 32)         if(containi(pAuth,"BOT") != -1)         return PLUGIN_CONTINUE         get_user_name(id, pName, 32)            for(new i=0;i<file_size(szFile, 1);i++)     {         format(szText, 20, "")         read_file(szFile, i, szText, 23, Len)             if (containi(szText, pAuth) != -1)         {             return PLUGIN_CONTINUE         }     }         format( szText , 100 , "%d  %s      %s",file_size(szFile, 1),pAuth,pName)     write_file(szFile, szText ,-1)     return PLUGIN_CONTINUE }

Last edited by stupok; 10-14-2006 at 12:23.
stupok is offline
 



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 04:52.


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