Jump to content
  • 0

Battleye - Exception for specific script only


jahangir13

Question

Hi,

 

I am using admintools and if I spawn an item crate I get kicked by battleye. So far so good as it's set that s.o. gets kicked for creating a vehicle 'box'.

 

createvehicles.txt:

//new
1 "" !="WeaponHolder" !="TinCan" !="Rabbit" !="Goat01_EP1" !="Goat02_EP1" !="Goat" !="WildBoar" !="Sheep" !="Sheep02_EP$
1 "SeaGull"
5 "box" !="DebugBoxPlayer_DZ" !="MedBox0" !="AmmoBoxSmall_556" !="AmmoBoxSmall_762" !="ItemMatchbox" !="ItemToolbox" !=$
5 "Mine"

 

The createvehicles.log:

04.10.2014 04:17:28: [666] jahan (37.24.14.111:2304) - - #2 "USOrdnanceBox" 3:112 [8918,16172,31]

 

I want: not to get kicket if the box USOrdnanceBox is created from the admintools script file admintools\crates\items.sqf

 

What I don't want:

- switch 5 (kick) to 1 (log) in front of the line (#2)

- make an exception at the end of the line for USOrdnanceBox, like !="USOrdnanceBox" (as then everybody, as I understand it, can spawn such a thing.

 

I want not to be kicked if the command to create this vehicle was called from the file/script mentioned above only. In all other cases the player should get kicked.

 

In the script file:

_classname = "USOrdnanceBox";

// Location of player and crate
_dir = getdir player;
_pos = getposATL player;
_pos = [(_pos select 0)+1*sin(_dir),(_pos select 1)+1*cos(_dir), (_pos select 2)];
_spawnCrate = createVehicle [_classname, _pos, [], 0, "CAN_COLLIDE"];

 

What I read in forums etc. was to make an exception for the line of code which actually spawns this vehicle...so I tried to add this at the end of the createvehiclex.txt line:

 

!"_spawnCrate = createVehicle \[_classname"

and also this:

!"_spawnCrate = createVehicle \[\"USOrdnanceBox\""

...

Also don't know if the syntax is !="xyz" or just !"xyz". And do I need to put the FULL line of code here? Don't think so...it just parses for the text which is here...if it matches, the execption should work?

 

Everything I tried here did not work. Anyone an idea how this is done the right way?

 

Regards,

jahan.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ok thanks for the answer. Will try that as soon as I can. In my opinion these things are not documented properly or I did not find these stuff after searching and reading for very long. There are a lot of forum posts and 90% of all tell you to change a "5" to a "1".

 

Do you have a link to a full documentation of these kind of things?

 

EDIT:

Hm that did not work. In the log I get this:

14:37:34 Player [666] jahan kicked off by BattlEye: CreateVehicle Restriction #2
14:37:34 "get: STRING (76561197980730579), sent: STRING (76561197980730579)"

 

I've entered your line from above behind line 3 in createvehicle.txt (the line which kicks for creating boxes).

So but _classname will get replaced so as in your line this needs to be set to the actual vehicle to spawn?

I guess the place to enter this is createvehicle.txt? Or is it in scripts.txt?

 

I've read somewhere that it should alsp be possible to allow things for a complete script. Say for admintools\crates\items.sqf.

 

Dou you know an exception for that?

Link to comment
Share on other sites

  • 0

Yes, that's how I did it now. I thought maybe it is possible to allow the creation of "USOrdnanceBox" but just if the command to create it is called from within the script admintools/crates/items.sqf. If called from any other script --> kick.

 

But it seems that this is not possible. But anyways...thanks for the help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...