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 1

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 1

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 1

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 1

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 1

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 1

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 !

  • 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 1

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;

Share this post


Link to post
Share on other sites
36 minutes ago, 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   |

https://ufile.io/ipsb5

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×