Questions About Restriction Scripts.

Bradski89

New Member
Hey all, long time browser first time poster. I was playing around on my server and wanted to try out different vehicles (using DayZ.ST) and I spawned myself a GAZ_Vodnik_HMG, but everytime I shoot the gun I get kicked off the server for a script restriction violation. I was wondering what I would have to do to be able to use the cannon on this, but without leaving my server completely vulnerable as we're not locked.

Thanks in advance!
 
Look on your scripts.log ... See what it says. Then download the scripts.txt that you can get from dayz.st FTP and "search" for whatever command it says on your script.log that gets you kicked and comment out the line with "//"

For example, in my case I was getting kicked with "addweapon" ... Soooo I went to line 230 and commented out using the "//"

Code:
//5 "_v addweapon \"A\"+\"A1\"+\"2_PM\"+\"C\"; _v addmagazine \"20R\"+\"nd"


in your case it might be the same problem. So, just use like notepad ++ or notepad2 x64 or any text efditor that can show you line numbers and comment that section out.
 
That's a really insecure way to do it. The ideal method is to check the log, as suggested - search for "#12345" where the number is the restriction you got kicked for. It'll show the code block that kicked you. Find that line in scripts.txt - it will be the line number + any commented lines, so the quickest way is to go to line 12345 (etc) and then keep looking past there until you find the "5 commandthatkickedyou" line.

Would be easier to explain if you included log info, but here's an example using some random stuff in my log file..

So, the number was #23. Searching scripts.log for #23 I find this:
Code:
08.02.2013 12:01:36: SOMENAME (123.456.789.12:2304) XXXXXXGUIIDXXXXXX - #23 "playActionNow "Die";
};
player allowDamage true;
player enableSimulation true;
0 cutText ["", "BLACK IN",3];
 
 
player addWeapon "

So I look in scripts.txt, starting at line number 23 and looking at the first word on each line until I find something that matches my code block. Here we go, line #25 - "1 enableSimulation" followed by a bunch of other stuff.

So, we don't want to kick (or in this case log - doesn't matter, same process) for this anymore. BattlEye is freaking because it sees "enableSimulation." I need to tell it that this particular code is legit - so, at the very end of the line that starts with enableSimulation, I put a space, and the following:

Code:
!"player enableSimulation true;"

So what we've told BE now is that enableSimulation, in general, is bad -- unless you see it in that exact format in the quotes there, in which case you can safely ignore it. Just make sure you copy and paste that exact line containing the "bad" command.

The only extra tricky bit -- If your code has quotes in it, like this for instance:

Code:
0 cutText ["", "BLACK IN",3];

You'll need to escape each of the quotes like this:

Code:
!"0 cutText [\"\", \"BLACK IN\",3];"

That way BE can tell the difference between a quote in the code and the quotes that are wrapping around the entire block of code.

If that doesn't make sense.. Post up the scripts.log and scripts.txt and the number that's kicking you.
 
Saibogu, interesting... and how would this method be applied in this case? I'm interested, anything that improves security, whilst allowing scripts to run is a bonus for me

Script Restriction #112

Code:
dayz_losChance = {
private["_agent","_max"
05.02.2013 04:38:06: Dr. Magnum Wolf (---------IP---------) ---------------GUID------------- - #178 "le,_x] call object_getHit;
_part = "PartGeneric";
 
 
_cmpt = toArray (_x);
_cmpt set [0,20];
_cmpt set [1,toArray ("-") select 0]"
05.02.2013 04:38:08: Dr. Magnum Wolf (---------IP---------) ---------------GUID------------- - #0 "R3F_LOG_mutex_local_verrou = false;
 
_action_menu = player addAction [("<t color=""#dddd00"">" + STR_R3F_LOG_action_relacher_obj"
05.02.2013 04:38:08: Dr. Magnum Wolf (---------IP---------) ---------------GUID-------------- #11 "0, 0];
 
R3F_LOG_mutex_local_verrou = false;
}
else
{
_objet attachTo [player, [
0,
(((boundingBox _objet select 1 select 1) max "
05.02.2013 04:38:08: Dr. Magnum Wolf (---------IP---------) ---------------GUID------------- - #112 "
if (alive player && _arme_principale != "") then
{
player addWeapon _arme_principale;
player selectWeapon _arme_principale;
pla"


and Script Restriction #85

Code:
05.02.2013 21:46:31: Gathis (---------IP---------) -----------GUID--------------- - #85 "_x;
if ((_vehicle ammo _muzzle) > 0) then
{
_vehicle setWeaponReloadingTime [_gunner,_muzzle,1];
};
} forEach _muzzles;"
05.02.2013 21:46:31: Dr. VonDeafingson (---------IP---------) -----------GUID--------------- - #85 "_x;
if ((_vehicle ammo _muzzle) > 0) then
{
_vehicle setWeaponReloadingTime [_gunner,_muzzle,1];
};
} forEach _muzzles;"

and this is the current script.txt im using on the server

http://pastebin.com/aSGU0Xce
 
Well, your #112 looks like it's catching addWeapon on line 114 of your scripts.txt (I assume you already commented this one out?)

Instead of commenting it, I would add this to the end of the line -

Code:
!"player addWeapon _arme_principale;"

And the #85 would be fixed by adding this to line 87 -

Code:
!"_vehicle setWeaponReloadingTime [_gunner,_muzzle,1];"

Now, sometimes after fixing one kick you'll find that the next block of code produces another kick, so it's not an immediate fix. Just need to take a few to test how new scripts and vehicles work with BE to iron out these issues.
 
Well, your #112 looks like it's catching addWeapon on line 114 of your scripts.txt (I assume you already commented this one out?)

Instead of commenting it, I would add this to the end of the line -

Code:
!"player addWeapon _arme_principale;"

And the #85 would be fixed by adding this to line 87 -

Code:
!"_vehicle setWeaponReloadingTime [_gunner,_muzzle,1];"

Now, sometimes after fixing one kick you'll find that the next block of code produces another kick, so it's not an immediate fix. Just need to take a few to test how new scripts and vehicles work with BE to iron out these issues.

I made a slight mistake, its inverted :oops:. The first code line is the # 85 and the second is the #112 :D

would that change something?
 
Sorry, it was a long weekend.

Not sure I understand what you're saying about them being inverted. Looking back again at what you posted and the suggestions I made, I still think those changes should work. Give it a shot and see what happens.
 
So guys to make some scripts work I have simply changed the lines causing the kicks from 5 to 1.
I know this isn't a good idea to do so I am wondering, whats the exact way to create an exception in the files?
So just say I install a new script called dayz.sqf in a folder called fixes and I get kicked for script restriction #1 which for demonstration purposes is "dayz"

In my scripts.log I have Jaimbo //guid// #1 dayz is awesome.
To create the exception do I put:
Code:
!"dayz is awesome;"
at the end of the line in scripts.txt?

Also do I need to specify what script it came from or?

Many thanks in advance!
 
With script restrictions, if it's kick #62, add 2 and add your fix to line 64.
The log generally gives you a clue. Like refuel kicks would go in the refuel line.
 
But how would I go about adding the fix? A lot of scripts tell you how to fix kicks, but what about scripts not specifically designed for dayz, but rather arma 2? Do I put the line of script you get kicked for, or the script file itself?

e.g !"setfog.sqf;" or !"setfog 1000;"?
Which one stops the kick?
 
Back
Top