Raised This Month: $ Target: $400
 0% 

Unique game id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kris Kristensen
Junior Member
Join Date: May 2020
Old 05-07-2020 , 08:51   Re: Unique game id
Reply With Quote #1

Quote:
Originally Posted by Bacardi View Post
*edit
I'm actually lost, what op is asking, tough

yeah... using whitelist by steamID's or set random sv_password to server are easier.
Or you let player connect to inside server, then you give him time to accomplish PIN code, or something.


- There is one trick, what SoureMod admin system use, for password access.
Player command: setinfo <key> <value>

Example:
- Before player connect to "match server", he need set PIN code first, in his console.
Code:
setinfo special_password bv070
- Now when player make connect to server, you can check player info in early state
PHP Code:
public bool OnClientConnect(int clientchar[] rejectmsgint maxlen)
{
    
char PIN[10];
    
GetClientInfo(client"special_password"PINsizeof(PIN));
    
PrintToServer("PIN %s"PIN);

    return 
true// when you want player get in server, return as true!

To block player connecting to server, return bool OnClientConnect as false.
You can also re-format rejectmsg disconnect message.

------------------------------------------------------------------------------------------
Spoiler
Hello and thanks a lot for your example here.

Let me first clarify why sv_password won't do. Well we are already using sv_password but running multiple game instances on the same server is a bit hard to administer, and what I would like to do is simply send a pincode to the player, have him enter that, and if validated - let in to the server. Therefore my initial idea was to show an input field or a dialog in the client for the player to enter this pincode in.
Hope this clarifies it a bit
Kris Kristensen 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 07:05.


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