Jump to content
  • 0

Anti-Dupe


Expherion

Question

Does anyone have an antidupe script which forces players to be frozen for any # of seconds before and after opening/closing a safe?  Additionally to prohibit logging out within any given # of meters of a storage object or vehicle?  And if they do it deletes their gear?  If someone could provide one it would be much appreciated!  Thanks.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
2 hours ago, Expherion said:

Does anyone have an antidupe script which forces players to be frozen for any # of seconds before and after opening/closing a safe?  Additionally to prohibit logging out within any given # of meters of a storage object or vehicle?  And if they do it deletes their gear?  If someone could provide one it would be much appreciated!  Thanks.

In the player_lockVault.sqf file, look for:

private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_alreadyPacking","_lockedClass","_text","_playerNear","_characterID","_PlayerUID","_vector"];

and below that add:

disableuserinput true;disableuserinput true;disableuserinput true;
systemchat "You may not move while locking this.";
sleep 0.1;

It will now look like this:

private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_alreadyPacking","_lockedClass","_text","_playerNear","_characterID","_PlayerUID","_vector"];

disableuserinput true;disableuserinput true;disableuserinput true;
systemchat "You may not move while locking this.";
sleep 0.1;

At the end of the file, insert this:



sleep 0.1;
disableuserinput false;disableuserinput false;disableuserinput false;
systemchat "You may now move!";

You can change the sleep timer at the end to what you want but it worked fine like this on my old 1.0.5.1 server. I haven't bothered to implement this onto my new 1.0.6.1 server yet but I'm sure it does the same.

 

I'm sure it would be very similar in the player_unlockVault.sqf file but I never had it added in there on my server. 

Edited by JohnnyBravo666
Adding onto the post
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...