Jump to content
kennedyw

Anti-Theft Script

Recommended Posts

     | Anti-Theft Mission File Script |

First off, i do not claim ownership of this script, i am only providing it to people so they can have a little more protection over their mission files.

Step 1.

Create an Sqf file called: fn_itemStolen.sqf , (for example but name it something non suspicious), and place it inside the Core/items folder, create an items folder if you haven't already got one.

 

Step 2.

Open the file in a text editing program like notepad or notepad ++ etc..

 

Step 3.

Copy and paste this text into the file changing INSERT NAME to your exact server name or you will not be able to play and save, (rename the fn_itemStolen.sqf to whatever you named your file)

Quote

/*
    File: fn_itemStolen.sqf
*/
if (!isMultiplayer) exitWith {};
_servername = serverName;
if (_servername != "INSERT YOUR EXACT SERVER NAME HERE") exitWith {
    [] spawn {
        while {true} do {
        _layer = "normal" cutText ["This mission belongs to INSERT NAME","PLAIN"];
        sleep 30;
        if(vehicle player != player) then { vehicle player setDamage 1; };
        _veh = "Bo_GBU12_LGB" createVehicle position player;
        sleep 5;
        _layer = "normal" cutText ["This mission belongs to INSERT NAME","PLAIN"];
        player setDamage 1;
    sleep 2;
    "shit" cutText ["", "BLACK", 0.5, true];
        sleep 10;
        ["stealmission",false,true] call BIS_fnc_endMission;
        };
    };
};
 

 Step 4.

Open your init.sqf and paste this line [] execVM "core\items\fn_itemStolen.sqf"; along with your other functions like this;

Quote

/*
    File: init.sqf
    Author: 
    
    Description:
    
*/
StartProgress = false;

if (hasInterface) then {
    [] execVM "briefing.sqf"; //Load Briefing
};
[] execVM "KRON_Strings.sqf";
[] execVM "core\Custom\Scripts\fn_disableSnakes.sqf";
[] execVM "core\Custom\Scripts\fn_fastrope.sqf";
[] execVM "core\Custom\Scripts\fn_teargas.sqf";
[] execVM "core\Custom\Scripts\fn_markers.sqf";
[] execVM "core\items\fn_itemStolen.sqf";
[] execVM "script\nosidechat.sqf"; //Prevents sidechat

StartProgress = true;
 

And that's it! Remember that if you change your server name you will have to change it in the script, if someone steals your mission and you have obfuscated it using Mavericks ObfuSQF Tool then no normal arma 3 players will be able to open the file fully and find your anti theft script,

this is a good forum of security against new life players who want to steal your mission, which is why i recommend making the name not as suspicious as itemstolen and if you want your mission to be extra secure place this function inside and then obfuscate it for best results! :D

  • Like 1

Share this post


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

It is good for mods but not for missons 

Yea , but still works for mission files especially for new first time life server creators

Share this post


Link to post
Share on other sites
8 minutes ago, TulparHAN said:

I use Maverick.
Do I need this script?

exactly what is this script doing?

If you use this script in your mission, it makes your mission only usable on your server, e.g if your server is called like ALTIS LIFE 10 Mill and you insert this name into the INSERT NAME part of the script it means your mission can only be used if the server is called ALTIS LIFE 10 Mill, so you make your server name custom and then obfuscate your mission so no one can easily steal your mission and change the server name text in this anti theft script.

It's basically extra security because someone can still steal and use your obfuscated mission file they just cant change where is says your name everywhere easily, so this adds so they cant use your mission at all unless they call their server exactly like yours which they cant do if your server is up becuase they cant copy your name :)

Edited by kennedyw

Share this post


Link to post
Share on other sites
39 minutes ago, waren pumba said:

bonjour comment adapter ce script pour des mods ? pour que personne puisse utiliser mes mods hormis sur mon serveur ?

This won't stop anyone, as they could just edit this out of the mod. But it would be identical there. You just put it in the main .sqf of your mod to exec it.

Share this post


Link to post
Share on other sites

How would I be able to execute it from within a mod? Been playing with it most of yesterday and couldn't make it work the way it was intended. No messages were displayed neither was the players killed.

Share this post


Link to post
Share on other sites

You can add an eventHandler in the config.cpp for an init and then you can put it inside a file.

class EventHandlers
{
	init="[] execVM '\Mod_Name\script\iLikePears.sqf'";
};

 

  • Like 2

Share this post


Link to post
Share on other sites
11 hours ago, ToxicRageTv said:

You can add an eventHandler in the config.cpp for an init and then you can put it inside a file.

class EventHandlers
{
	init="[] execVM '\Mod_Name\script\iLikePears.sqf'";
};

 

Apparently still doesn't execute on either the client or server.

No leads in the RPT logs either...

Client log: https://pastebin.com/5wiEgzzF

Server log: https://pastebin.com/1tNSVUyd

config.cpp: https://pastebin.com/3YYijfxq (Cut some the config our, to avoid copycats stealing out work)

 

And yes, files are in the correct directories.

 

Any ideas as to why?

 

EDIT: Been doing some digging, and it turns out that the init stuff doesn't get run for some reason. The script works fine when i execVM it from the Debug Console.

Edited by Dunkstormen

Share this post


Link to post
Share on other sites
On 1/16/2019 at 11:08 AM, Dunkstormen said:

Apparently still doesn't execute on either the client or server.

No leads in the RPT logs either...

Client log: https://pastebin.com/5wiEgzzF

Server log: https://pastebin.com/1tNSVUyd

config.cpp: https://pastebin.com/3YYijfxq (Cut some the config our, to avoid copycats stealing out work)

 

And yes, files are in the correct directories.

 

Any ideas as to why?

 

EDIT: Been doing some digging, and it turns out that the init stuff doesn't get run for some reason. The script works fine when i execVM it from the Debug Console.

you need to put the eventHandler inside the class of the object. ex.
 

class Toxic_TestObject: House_F
{
    displayName="Test Object";
    model="\Toxic_Test\Testing.p3d";
    scope=2;
    scopecurator=2;
    class EventHandlers
    {
        init="[] execVM '\Mod_Name\script\iLikePears.sqf'";
    };
};

 

Share this post


Link to post
Share on other sites

Hello,
I have just tried to put this in my mission file and have tested it and i get an error which i have put in the pastebin along with the full rpt:

Error

Full RPT

The rpts are when i tested it with the server name being incorrect and the mission ran fine.

Thanks for any replies, its probably just me using the script wrong. I am using 4.4r4.

Share this post


Link to post
Share on other sites
23 hours ago, Josh_Bernstein said:

Hello,
I have just tried to put this in my mission file and have tested it and i get an error which i have put in the pastebin along with the full rpt:

Error

Full RPT

The rpts are when i tested it with the server name being incorrect and the mission ran fine.

Thanks for any replies, its probably just me using the script wrong. I am using 4.4r4.

13:57:12 Error in expression <elect 3;

_projectile = _this select 4;

_originalDamage = if (_part == "") the>

13:57:12   Error position: <originalDamage = if (_part == "") the>

13:57:12   Error Missing ;

13:57:12 File core\functions\fn_handleDamage.sqf [life_fnc_handleDamage], line 70

 

 

13:57:12 Error in expression <fe_fnc_pullOutVeh]"

if (pisNull objectParent player) exitWith {};

if (pl>

13:57:12   Error position: <objectParent player) exitWith {};

if (pl>

13:57:12   Error Missing )

13:57:12 File core\functions\fn_pullOutVeh.sqf [life_fnc_pullOutVeh], line 8

 

 

13:57:23 Error in expression <createVehicle position player;

sleep 5;

     _layer = "normal" cutText ["This>

13:57:23   Error position: <     _layer = "normal" cutText ["This>

13:57:23   Error Invalid number in expression

13:57:23 File mpmissions\__cur_mp.Altis\core\items\fn_itemStolen.sqf, line 14

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.