Raised This Month: $32 Target: $400
 8% 

2 players can not use the same account


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zoolk
New Member
Join Date: Jul 2013
Old 05-17-2019 , 18:23   2 players can not use the same account
Reply With Quote #1

how can I block the use of 2 accounts at the same time?
To load the data, users need username and password
I used this method but it did not work

PHP Code:
for(new 1<= g_maxplayersi++
{
         if(
equal(g_password[i], g_password[id]))
         {
                  if(
== id)
                           continue;

                  
client_print(idprint_chat"this account is already in use")
                  return;
         }

zoolk is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-17-2019 , 20:24   Re: 2 players can not use the same account
Reply With Quote #2

Why would need something like that? Using the Steam ID itself as an account is the best option.
redivcram is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 05-17-2019 , 20:27   Re: 2 players can not use the same account
Reply With Quote #3

This basically does nothing..
Why don't you use client_authorized and check if there's already someone using that username (I assume that by username you mean clients nickname, which if I'm right is bad)

Last edited by Foxa; 05-17-2019 at 20:29.
Foxa is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-17-2019 , 20:40   Re: 2 players can not use the same account
Reply With Quote #4

You should check out: https://forums.alliedmods.net/showthread.php?t=171460
I'd still use SteamID instead of username.
redivcram is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-17-2019 , 22:35   Re: 2 players can not use the same account
Reply With Quote #5

I'm quite sure Steam doesn't allow two people to use the same account at that the same time.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 21:41.


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