Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-06-12 06:33        
     
Hello everyone!

I own a ArmA 2 Chernarus life server and was thinking about restricting cop access by UID so people don't abuse. I have a script withing the mission file that will allow me to do this but it is such a pain to have to unpack>repack> and upload every time i accept a new cop.

Here is the script i have with in the mission
Add Cops.
_UID = getPlayerUID player;
validUIDList = ["65014400","36875591","51409927","22369280","42498176","49221703","43437824","11494855","67571456","15315072","23553792","25088576","81448832","39598528","47938439"];

if((iscop) && (_UID in validUIDList)) then {player setvariable ["lockme", 0];execvm "antilockloop.sqf"};
if(isciv) then {player setvariable ["lockme", 0];execvm "antilockloop.sqf";};
if ((iscop) and !(_UID in validUIDList)) then {
    disableuserinput true;
    player groupChat "You must apply to be a Police Officer, please go to ccl.enjin.com, press -alt f4- to quit!";
   sleep 10;

};


I need to figure out a way to have a script in /servermissionfile/ (In my ArmA 2 Directory) that will allow me to just have something like this
Cops = ["12345678,"90123456"];
So i can just edit the script above to
_UID = getPlayerUID player;
if((iscop) && (_UID in Cops)) then {player setvariable ["lockme", 0];execvm "antilockloop.sqf"};
if(isciv) then {player setvariable ["lockme", 0];execvm "antilockloop.sqf";};
if ((iscop) and !(_UID in Cops)) then {
    disableuserinput true;
    player groupChat "You must apply to be a Police Officer, please go to ccl.enjin.com, press -alt f4- to quit!";
   sleep 10;

};

Would i be able to do something like this?
1.) In init.sqf have
if (isServer) then {[] execVM "serverside\MasterList.sqf";};

2.) In MasterList.sqf have
publicVariable "Cops";
Cops = ["94604486","75612230"];

publicVariable "Admin";
Admin = ["94604486","75612230"];
It would need to Contain several "groups" of UIDs' such as "Cops" "Admins" Etc.

Any Ideas? Im stumped *WALL* *WALL* *WALL* *WALL* *WALL* *HELP*

This post was edited by gamerz971HD (2013-06-12 06:42, ago)