[Release] Custom Spawn Points Based on UID

Opticz

Well-Known Member
First of all I just want to say this isn't my code and I found it in this thread HERE.

The thread is basically a mish mash of people discussing it and finally figuring it out, So I thought I'd put it all into one post and write clear instructions on how to do it. This has only been tested on Bliss/Reality by me so I don't know if it will work on any others.

Credits: CaptainMack, Remasters
Installation:
------------------------------------------------------------------​
1. Go into PHPmyAdmin.
2. Click on your database name ( Usually on the left side ) Example: bliss_1234
3. Click on SQL at the top.
4. Now in the SQL input box paste the below code:​
Code:
CREATE TABLE `cust_spawn` (
`unique_id` 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:​
Code:
CREATE TRIGGER `custom_spawn`
  BEFORE INSERT ON `survivor`
  FOR EACH ROW
BEGIN
DECLARE x INT;
DECLARE y varchar(50);
SET x = (SELECT `unique_id` FROM `cust_spawn` WHERE `unique_id`=NEW.unique_id);
SET y = (SELECT `worldspace` FROM `cust_spawn` WHERE `unique_id`=NEW.unique_id);
IF NEW.unique_id = 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 :)
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:​
Code:
[268,[8627.69,12631.1,0.002]]
------------------------------------------------------------------​
Hopefully my instructions are clear enough, Just wanted to help people that might of missed the original thread and I wanted to try make the instructions clearer for people.​
Thanks​
Opticz :)
 
Back
Top