Jump to content

Coalition-Slot password protection script


Recommended Posts

Hello,

 

the virtual wing where I'm flying, AMVI, asked me if there was a chance to protect the access of game master slots and to prevent clients in the "blue" side to log to the "red" side during force-on-force operations. So I tried to write down a "client management script" that do only this work: allow or block access to slots based on coalition & game master identification. I thought that it might interest someone else, so, here it is.

 

It's absolutely not perfect and could be done way better than this, but It's ok to my needs and therefore I'm not going to work that much on that more... as long as it's bug free. So, if you want to try and see if there are bugs, let me know.

 

INSTALL:

Put it in your server \Saved Games\DCS.(version)\Scripts\Hooks folder. Done.

 

SET PASSWORD:

open it with notepad++ or code editing software and change the keyword in the first lines. Here you will also find a couple of options that can be checked, like locking only the game master slots (clients can move from blue to red, even TC slots, but not in GM), or locking persitence (if a client set itself into blue side, he will be there forever till server admin changes it), or pre-assigned slots (server admin can force specific players to one side before they access the server).

 

USE FOR CLIENTS:

just check the chat once logged in the server: as soon as you try to access somewhere, if you can't, the chat will prompt you a message to insert a password for access.

 

 

PS:

Chat messages with password is supposed to be hidden... so that people could not read them and you could keep passwors secrects. But there's a current DCS bug that prevents the chat filter, so everyone can always see the password when a client write it in chat.

 

 

 

 

 

 

ClMnSc_hook_rev00.lua


Edited by chromium
  • Like 3

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

Nice work thanks for sharing, I also had the same problem, but ended up just using ciribobs slot blocker script and adding UID of players who are allowed to use the gamemaster slots

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

31 minutes ago, chromium said:

Hello,

 

the virtual wing where I'm flying, AMVI, asked me if there was a chance to protect the access of game master slots and to prevent clients in the "blue" side to log to the "red" side during force-on-force operations. So I tried to write down a "client management script" that do only this work: allow or block access to slots based on coalition & game master identification. I thought that it might interest someone else, so, here it is.

 

It's absolutely not perfect and could be done way better than this, but It's ok to my needs and therefore I'm not going to work that much on that more... as long as it's bug free. So, if you want to try and see if there are bugs, let me know.

 

INSTALL:

Put it in your server \Saved Games\DCS.(version)\Scripts\Hooks folder. Done.

 

SET PASSWORD:

open it with notepad++ or code editing software and change the keyword in the first lines. Here you will also find a couple of options that can be checked, like locking only the game master slots (clients can move from blue to red, even TC slots, but not in GM), or locking persitence (if a client set itself into blue side, he will be there forever till server admin changes it), or pre-assigned slots (server admin can force specific players to one side before they access the server).

 

USE FOR CLIENTS:

just check the chat once logged in the server: as soon as you try to access somewhere, if you can't, the chat will prompt you a message to insert a password for access.

 

 

PS:

Chat messages with password is supposed to be hidden... so that people could not read them and you could keep passwors secrects. But there's a current DCS bug that prevents the chat filter, so everyone can always see the password when a client write it in chat.

 

 

 

 

 

 

ClMnSc_hook_rev00.lua 22.05 kB · 1 download

 

Thank you so much!  You are very kind to share, thanks everyone!  I will be happy to help you with some feedback if you need it.

101^Squadrone Multiruolo Ariete 

by SimItaliaGames.com | WebSite FaceBook Forum Discord

Visit: AF Allied Forces

Joint Operations, Joint Communities

Un progetto per promuovere la collaborazione tra gruppi volo virtuali!

Link to comment
Share on other sites

  • 5 months later...

Hello,

I'd really like to thank you for all the good work! Now, I'm trying to get this script to work on our server, but for unknown reason slots are still unlocked. I get the confirmation on the chat, but with no effect. I installed the script as described and also had input user manually into clients_registration.csv but still no luck. I wonder if I'm missing something. Do I have to load the script in mission editor? 

Link to comment
Share on other sites

No. Something is wrong in your setup or the script doens't work anymore (but I don't have reports on it). 

If you provide logs I could try to understand what is going on.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • 10 months later...

Hey hello. Just tried this hook.
It's blocking slots for both coalitions, but when I type password (TestBlue) - nothing happens

Thats interesting, but looks like it can register this command master coalition change (PlayerName) to coalition (coalitionName)
null

image.png

image.png

Link to comment
Share on other sites

Hi, the script it's not updated anymore as DCS already implemented a password protection far better than what I provided. 

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

Uhm, I don't think my script can do that, but even if so, honestly I won't mantain it with the ED system currently in place.

Anyway with ED system, if a user does not have the opposite password, he can't even see the slot.

 

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...