Jump to content
  • 0

Jail for banned and punished players (custom spawn location)


X060T

Question

Hi, all!

 

I would like to offer you an idea of ​​the script. I'd like to create the area on the map (may be island or locked castle tower) which will be use like the jail. If you want to punish the player for breaking server rules or cheating, then you put it in the jail instead of giving ban.Creating of custom area is rather easily in 3D editor, not as easy as the spawn code.arma2oa_2014_01_22_17_56_31_183.jpgarma2oa_2014_01_22_17_57_14_350.jpg
So, for creating such script we need some custom spawn location code whith the list UIDs which would call from data base table, because adding  of banned and punished players would be easy.

Installation:
------------------------------------------------------------------​
1. Go into PHPmyAdmin.​
2. Click on your database name ( Usually dayz_epoch)
3. Click on SQL at the top.
4. Now in the SQL input box paste the below code:​
 
CREATE TABLE `cust_spawn` (
`PlayerUID` INT(10) NULL DEFAULT NULL,
`worldspace` VARCHAR(50) NULL DEFAULT NULL
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
Now click OK.​
The above code will create a new "cust_spawn" table into the DB.​
5. Now click "clear" on the SQL page.​
6. Paste the below code into the SQL page like before:​
 
CREATE TRIGGER `custom_spawn`
  BEFORE INSERT ON `character_data`
  FOR EACH ROW
BEGIN
DECLARE x INT;
DECLARE y varchar(50);
SET x = (SELECT `PlayerUID` FROM `cust_spawn` WHERE `PlayerUID`=NEW.PlayerUID);
SET y = (SELECT `worldspace` FROM `cust_spawn` WHERE `PlayerUID`=NEW.PlayerUID);
IF NEW.PlayerUID = x THEN
SET NEW.worldspace=y;
END IF;
END;$$
Before clicking "ok" paste " $$ " into the delimiter box just below the sql box, Now click ok.​
Now you have made your custom spawn table with the custom spawn point trigger clear.png
To setup a custom spawn point go into your new "cust_spawn" table on the left side, Click on "Insert" at the top and paste the UID of the player and enter the location you want them to spawn.​
Example of location coords to paste are below:​
 
[268,[8627.69,12631.1,0.002]]

P.S. sorry 4 my English;)

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Good job man!!!

 

I used to create a Spawn Table and allow my server player to respawn directly in their own bases. You lost the adventure of return to base but player are happy with that.

 

I only have to associate every player to his base position.

 

Many Thanks.

Link to comment
Share on other sites

  • 0

In my experience if you punish someone in-game for violating rules and still have them in the game, they will spend all thier time humping everyone over side, whining and bitching and trolling till you ban them anyway.

 

This needs the ability to stop them talking in side too ^^

Link to comment
Share on other sites

  • 0

There's an arrest and detain script being developed over at Open Dayz. I have a semi-rough beta of it on my servers and it fits this bill quite nicely. It has a 10 minute auto-timeout if you just leave the person so they can recover after that on their own. That's what I'd wait for on something like this, it's simple and easy and the offending person gets very little attention, which is hugely important when dealing with 'tards like this.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...