AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Read from a file (https://forums.alliedmods.net/showthread.php?t=317375)

shadow728988 07-10-2019 01:59

Read from a file
 
is it possible to allow entry to only those players on the server whose steam id's have been written down in a file in config folder.
need this for a tournament based 5v5 matches
thanks a lot

HamletEagle 07-10-2019 03:08

Re: Read from a file
 
Yes, it is possible. Show what you tried or ask a more specific question.

shadow728988 07-10-2019 03:57

Re: Read from a file
 
Quote:

Originally Posted by HamletEagle (Post 2658564)
Yes, it is possible. Show what you tried or ask a more specific question.

i havent tried it per se..but lets assume we have to files TeamA(steamids of its players) and TeamB(steamids of its players) in configs folder and only they will be allowed in the server, no other steam id or player can connect to the server.

shadow728988 07-10-2019 03:59

Re: Read from a file
 
also what can be the condition to not log duplicate names and authid if the player retries..currently this function sits in client_putinserver
Code:

public logplayers(id)
{
        new  szAuthID[32], szName[32];
        get_user_name(id, szName, 31);
        get_user_authid(id, szAuthID, charsmax(szAuthID));
        log_to_file(g_szFileName, "Name %s | AuthID %s | ", szName, szAuthID)
}


Relaxing 07-10-2019 06:05

Re: Read from a file
 
Give it a try,
Spoiler

OciXCrom 07-10-2019 06:37

Re: Read from a file
 
You can simply use users.ini.

Relaxing 07-10-2019 06:50

Re: Read from a file
 
... or just sv_password.

Fuck For Fun 07-10-2019 09:57

Re: Read from a file
 
Quote:

Originally Posted by OciXCrom (Post 2658587)
You can simply use users.ini.

You are wrong, through users.ini that comes in with certain approaches and does not want it. It is therefore requested to load the ID for some players that can enter
Quote:

Originally Posted by Relaxing (Post 2658591)
... or just sv_password.

What's the point of having to write a password every time?

shadow728988 07-10-2019 09:57

Re: Read from a file
 
Quote:

Originally Posted by Relaxing (Post 2658583)
Give it a try,
Spoiler

created the .ini file with my steam id in it..still kicks me

shadow728988 07-10-2019 09:59

Re: Read from a file
 
Quote:

Originally Posted by OciXCrom (Post 2658587)
You can simply use users.ini.

cant add all the 100 players you know..thank you for replying :)


All times are GMT -4. The time now is 17:26.

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