Raised This Month: $51 Target: $400
 12% 

Solved users.ini problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 12-01-2019 , 17:42   users.ini problem
Reply With Quote #1

fixed

users.ini
Code:
"STEAM_0:0:521101994" "" "b" "ce" ;sinner
"STEAM_0:0:521101994" "" "b" "ce" ;sinner
"STEAM_0:0:521101994" "" "b" "ce" ;sinner
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

new slot_flags;
new configsDir[64]

public plugin_init() 
{
	slot_flags = register_cvar("flag_for_slot", "b")
	
        get_configsdir(configsDir, 63)
        formatex(configsDir, 63, "%s/users.ini", configsDir)
}

public client_connect(id)
{
	new string_steam[20],authid[32]
	get_pcvar_string(slot_flags,string_steam,19)
	
	new linne[150], name[33]
	
	new File[120]; get_configsdir(File, charsmax(File))
	add(File, charsmax(File), "/users.ini")
	
	if(!file_exists(File))
		set_fail_state("File configs/users.ini Not Found")
		
	get_user_name(id, name, charsmax(name))
	get_user_authid(id, authid, 31)
	
        new line = 0, textline[256], len
        new line_name[64], line_password[64], line_accessflags[64], line_flags[64]
        new found;
	
        while ((line = read_file(configsDir, line, textline, 255, len)))
        {
            parse(textline, line_name, 63, line_password, 63, line_accessflags, 63, line_flags, 63)
		
            if (containi(line_name,authid) != -1)
            {	
	       found++
	       break	
            }
	    if(!found) 
            {
	       server_print("Steam %s already exists!",line_name)
            }
            else 
            {
	       formatex(linne, charsmax(linne), "^r^"%s^" ^"^" ^"%s^" ^"ce^" ;^%s", authid, string_steam, name)
                write_file(File, linne)
            }
        }
}

Last edited by Saint Sinner; 12-02-2019 at 04:49.
Saint Sinner is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 12-02-2019 , 11:29   Re: users.ini problem
Reply With Quote #2

what is the problem with amx_addadmin command?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 19:51.


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