Jump to content
Yurichenk

Help to create script for create whitelist or IDs

Recommended Posts

Hello, I would like to ask for help to create a script since I am not very good at this topic.

You will see my mission has two sides in which there are several playable soldiers in each one called for example (Bluesoldier1, Bluesoldier2 and Redsolider1).

I need to know how to create a whitelist where you basically define the following: If the player ID is not in this list:

  1. Then you can not use the soldiers: Bluesoldier1, Bluesoldier2 ...

In the event that a player connects to an improper soldier, he displays a dialogue saying something like: "Your ID is not registered in the side list, change sides or contact the administrator" Then exactly the same but for the other side

Please! I really need this so that my mission makes sense!

  • Like 2

Share this post


Link to post
Share on other sites
19 hours ago, GEORGE FLOROS GR said:

Hello there Yurichenk !

Forgive my ignorance, but I do not really understand how to apply the information related to my own mission. Could you give me a small example of how to proceed? So far, I understand that I need to create an init.sqf file where you enter the script and call the whitelist and then the whitelist.sqf, but I do not understand the structure of the script.

  • Like 2

Share this post


Link to post
Share on other sites
3 minutes ago, Yurichenk said:

but I do not understand the structure of the script.

 

Ok hold on let me check this !

Share this post


Link to post
Share on other sites
2 hours ago, GEORGE FLOROS GR said:

Maybe this is better for you because it has also a tutorial video :

WoW!! That seems to be just what I'm looking for! Thank you very much, it will be very helpful, I will update my progress.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, GEORGE FLOROS GR said:

Maybe this is better for you

Well, apparently it was not so easy.

I already met once with that script and the truth is that it would work perfectly. But the problem is that it is designed to be used in the skeleton of a mission performed by the developer of the script which is much more complex and there is no guide on how to incorporate this script into a totally alien mission.

If you have additional information on that, it would be great, as I said, that's exactly what I'm looking for.

  • Like 2

Share this post


Link to post
Share on other sites
2 minutes ago, Yurichenk said:

If you have additional information on that,

 

Hold on let me check !

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, GEORGE FLOROS GR said:

 

Hold on let me check !

Dude, you really are very helpful, millions of thanks and sorry for the inconvenience

  • Like 2

Share this post


Link to post
Share on other sites

Thanks , generally if you make a search , because i'm doing the same here, there are a lot of scripts .

Check this :

 

 

Share this post


Link to post
Share on other sites

:whatsthat:  Yeah, hehe, you're right, the point is that ... have you heard the saying "this is harder than looking for a needle in a haystack?" well ... imagine that I do not even recognize what a needle is even if I had it in front when it comes to scripting in ArmA 3 hehe

  • Haha 2

Share this post


Link to post
Share on other sites
1 minute ago, Yurichenk said:

:whatsthat:  Yeah, hehe, you're right, the point is that ...

 

I know this is why i try to help !

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Well, I have an eye and it may work, although I'm not 100%, I'll have to try it at home this afternoon (because right now I'm at work because I do not have internet at home) If everything goes well on Monday, I will respond satisfactorily.

Even so, if you find out how to use the previous script if having to depend on the rest of the mission would be even better.

In general I think that this scripts is very requested by the community, since it is, and used for issues of limiting slots for administrators or reservations. In my case, I and my friends are a small community where we always choose whether to play BLUFOR, OPFOR or Independents at the start of a new campaign and really the administrators need this script to "prevent" someone entering the wrong side. If you created your own script for this, believe me your first subscriber will be hehehe. Anyway, thanks for everything and Monday will bring news.

  • Like 2

Share this post


Link to post
Share on other sites

Apparently this is the important part of the script:

/*[Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;*/
    ["76561198164382639", s1] call AZM_RESERVED_SLOT;

 

Do you think something like this could work?

 [["UDI1,UDI2,UDI3"], [s1,s2,s3]] call AZM_RESERVED_SLOT;

 [["UDI4,UDI5,UDI6"], [s4,s5,s6]] call AZM_RESERVED_SLOT;

Share this post


Link to post
Share on other sites

Just add every other as the given example :

/*[Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;*/

["76561198164382639", s1] call AZM_RESERVED_SLOT;

  • Like 1

Share this post


Link to post
Share on other sites
On 1/11/2019 at 10:48 PM, Yurichenk said:

Apparently this

 

This is Larrow 's script

 

I wanted also to check this so i just copied this.

 

+Larrow_Reserved_Slot.VR.zip

Expires in: 4 Weeks   |   Size: 58.8 KB   | 0 9.09.19

 

## quote me to upload this again !

 

Spoiler

8WZtYH1.png

 

Just check the information about the allowedIDs.txt

Share this post


Link to post
Share on other sites
On 11/1/2019 at 3:48 PM, Yurichenk said:

Apparently this is the important part of the script:

/*[Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;*/
    ["76561198164382639", s1] call AZM_RESERVED_SLOT;

 

Do you think something like this could work?

 [["UDI1,UDI2,UDI3"], [s1,s2,s3]] call AZM_RESERVED_SLOT;

 [["UDI4,UDI5,UDI6"], [s4,s5,s6]] call AZM_RESERVED_SLOT;

Hey! In the end, the one that turned out to be the most conventive was this Now, I'll need to make a couple of additions or more modifications Currently the script allows me to define a UID per slot with each line you add. I modfied it a bit and made the UIDs listed and instead call a single UID per line, I call the whole list.

Spoiler

AZM_SLOTS = {
    /*[Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;*/
    ["76561198164382639", s1] call AZM_RESERVED_SLOT;

};

 

AZM_RESERVED_SLOT = {
    [_this select 0, _this select 1, _this select 2] spawn {
        params ["_uidd","_slot"];
        //hint format ["%1            %2",_uidd,_slot];
        //_uidd=_uidd;
        waitUntil {!isNull player || player == player};
        //_uidd = format ['"%1"',_uidd];
        if (_slot == player) then {
            if ((getPlayerUID player) == _uidd || (getPlayerUID player) in AZM_bypass_list) then {
                if ((getplayeruid player) in AZM_bypass_list) then {
                    hint format ["<<<ALEZM>>>\n-Benvenuto ------ADMIN------ \n%1 nello slot di \n%2-",name player, _uidd];
                } else {
                    hint format ["<<<ALEZM>>>\nBenvenuto %1 nel tuo slot.\n%2",name player, getPlayerUID player];
                };
            } else {
                //titleText ["", "BLACK OUT"];
                //sleep 5;
                //disableUserInput true;
                [] call AZM_WEAPONS_REMO;
                for "_sec" from 10 to 1 step -1 do {
                    _kickvar = format ["<t size='3' color='#ff0000'>ALEZM>>Slot riservato verrai kickato in %1 <br/>ALEZM>> %2</t>",_sec, name player];
                    titleText [_kickvar, "BLACK IN", -1,true,true];
                    playSound "FD_CP_Not_Clear_F"; playSound "FD_CP_Not_Clear_F"; playSound "FD_CP_Not_Clear_F";
                    sleep 1;    
                };
                //disableUserInput false;
                [((name player) + " ha provato ad entrare in uno slot riservato")] remoteExec ["AZM_SYSTEMCHAT"];
                diag_log format ["Alezm>> %1 >> %2 ---- %3 ha provato ad entrare in uno slot riservato",time,getPlayerUID player,name player];
                sleep .1;
                //failMission "LOSER";
                ["RES SLOT",false,.1] call BIS_fnc_endMission;
            };    
        };
    };
};

Now, this is what I add to script

Spoiler

OPFOR_UID_list = ["76561198164382639",""];    
BLUFOR_UID_list = ["86531248365388317",""];   

 

AZM_SLOTS = {
    /*[Arma3 UID, slot variable name] call AZM_RESERVED_SLOT;*/
    ["OPFOR_UID_list", s1] call AZM_RESERVED_SLOT;

    ["BLUFOR_UID_list", s1] call AZM_RESERVED_SLOT;

};

My question is: Is there a method for this list of UIDs not to be found within the script file and instead can be found in an external file for a dedicated server?

Share this post


Link to post
Share on other sites

@GEORGE FLOROS GR

Let's see, could you at least tell me if this would work even on a dedicated server if I put the files marked in red on the server and change the address in the green zone?

 

init.sqf
[] execVM "Slots_Master.sqf";

 

Slots_Master.sqf

BLU_UID = call compile preprocessFileLineNumbers "client/BLU_UID.txt";
OPF_UID = call compile preprocessFileLineNumbers "client/OPF_UID.txt";

["BLU_UID", s1] call Rerserved_slot;
["OPF_UID", s2] call Rerserved_slot;

 

**My Script**

 

BLU_UID.txt
["76566179256348507",""];

 

OPF_UID.txt
["52366712986322541",""];

Share this post


Link to post
Share on other sites
On 15/1/2019 at 11:36 PM, Yurichenk said:

Let's see, could you at least tell me if this would work even on a dedicated server

 

You need to ask Larrow about ! :

Spoiler
Just now, GEORGE FLOROS GR said:

Guys dont laugh . . . but i don't have the a key in my keybord to be able to mention Larrow !

 

If you see this Larrow or someone , please help if you can , it's based on your post :

 

 

Thanks !

 

Just to know  @Yurichenkthis is actually a double post :

 

Share this post


Link to post
Share on other sites
On 1/11/2019 at 11:21 PM, GEORGE FLOROS GR said:

This is Larrow 's script

 

I wanted also to check this so i just copied this.

 

+Larrow_Reserved_Slot.VR.zip

Expires in: 4 Weeks   |   Size: 58.8 KB   | 0 9.09.19

 

## quote me to upload this again !

 

 

2 minutes ago, GEORGE FLOROS GR said:

below the whole stuff :

 

nsM81aJ.png

 

info.txt

  Reveal hidden contents







//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


Then in each units init that you want to be a reserved unit place


this setVariable ["Reserved",true];


You can also change their description by filling out the Description section in the insert unit dialog with something like

Group leader (Reserved)

So people know what units not to choose in the lobby.

 

allowedIDs.txt

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;


Fill the ARRAY with allowed UIDs - steam IDs
Look something like "76566179256348507"
*/

["76566179256348507","76566179256348507"];

 

 

description.ext

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

allowedFilePatching = 1;
respawn = 3;				  // 0 = none. 1 = bird. 2 = instant where died. 3 = base or respawn_INDEPENDENT marker. 4 = respawn with team, or bird. 5 = into AI or bird.
respawndelay = 10;            // Delay prior to respawn
respawnVehicleDelay = 0;      // Delay prior to respawn
respawnDialog = 0;            // default = 1. show respawn timer and scoreboard when killed.
respawnOnStart = -1;
enableDebugConsole = 1;	      // 0 = disabled. 1 = admins, 2 = everybody. 0 is recommended in MP.
allowFunctionsLog = 1;
disabledAI=1;				  // No AI in playable units
aiKills = 0;				  // disable scorelist for AI players
forceRotorLibSimulation = 0;  // Default value: 0 - options based; 1 - force enable; 2 - force disable

//____________________________________________________

corpseManagerMode = 1;
corpseLimit = 60;
corpseRemovalMinTime = 900;
corpseRemovalMaxTime = 1500;

wreckManagerMode = 1;
wreckLimit = 30;
wreckRemovalMinTime = 900;
wreckRemovalMaxTime = 1500;

//____________________________________________________

author = "Larrow";
OnLoadName = "Larrow Reserved Slot Script";	
onLoadMission = "<t color='#FF0000'>V e r s i o n    1 . 0<br /><t color='#FCEF06'>Have Fun";
loadScreen =  "images\Reserved.paa";
overviewPicture = "images\Reserved.paa";

//____________________________________________________

class Header
{
 gameType = COOP;
 minPlayers = 1;
 maxPlayers = 40;
};


//__________________________ ***  C O P Y   T H I S  *** __________________________


class CfgDebriefing
{

class NOT_ALLOWED
{
	title = "This is a reserved slot.";
	description = "This is a reserved slot. Please rejoin using a different slot. Reserved slots are clearly marked on each units description in the lobby as ( Reserved )";
	picture = "images\Reserved.paa";
};
};

 

 

initPlayerLocal.sqf

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


fnc_reservedSlot = {
player enableSimulationGlobal false;
( "reserved" call BIS_fnc_rscLayer ) cutText [ 
"
This is a reserved slot. Reserved slots are clearly marked in the lobby as ( Reserved ) . 
Please rejoin using a different slot.
", "BLACK OUT", 1, true ];

sleep 10;
endMission "NOT_ALLOWED";
};

 

 

initPlayerServer.sqf

  Reveal hidden contents







//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/


_player = _this select 0;
_uid = getPlayerUID _player;

if ( _player getVariable [ "reserved", false ] && { !( _uid in allowed ) } ) then {
[ [], "fnc_reservedSlot", _player ] call BIS_fnc_MP;
};

 

 

initServer.sqf

  Reveal hidden contents





//________________  Author : Larrow ___________ Posted June 23, 2015 _____________

/*
________________ Larrow_Reserved_Slot Script ________________

https://forums.bohemia.net/forums/topic/182520-script-to-lock-out-player-slots/?tab=comments#comment-2879996
*/

/*
allowedIDs.txt 
<< this file gets placed in the folder where your servers Arma3.exe is, 
it keeps the IDs private as they are not transmitted with the mission and 
can be updated for all your missions in one place.

server.cfg file on the server too.
allowedFilePatching = 1;
*/

//allowed = call compile preprocessFileLineNumbers "allowedIDs.txt";

//	or from here
allowed = ["76566179256348507","76566179256348507"];

 

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×