Alright, I'll write it in text before I go on vacation.
First step, create the table - you do that by going into your MySQL Client like Navicat, HeidiSQL or phpmyadmin and then execute a query with this code:
CREATE TABLE `cust_spawn` (
`unique_id` INT(10) NULL DEFAULT NULL,
`worldspace`...
It's simple a form that sends POST data to a phpscript that inserts the data into the DB, If you want more instructions, I'll share the code when I get home.
You simply put each block of code and execute it as a query on your database :) Table i've tested, teh trigger I haven't yet, so there MIGHT be some syntax errors, but try it out :) remember if the trigger stops people from respawning/new people joining, remove it :)
EDIT: Should I make a video...
yeah, you can always use the data for a IF-sentence :) Haven't tried it, but this should work
delimiter $$
CREATE TRIGGER `custom_spawn` BEFORE INSERT
ON `databasename`.`survivor`
FOR EACH ROW
BEGIN
DECLARE x INT;
DECLARE y STRING;
SET x = (SELECT unique_id FROM cust_spawn WHERE...
If it still isn't working, create a MySQL Trigger for it, I've made a simple example (the body of the trigger)
BEGIN
DECLARE x INT;
SET x = (SELECT unique_id FROM cust_loadout_profile WHERE unique_id=NEW.unique_id);
IF NEW.unique_id = x THEN
SET NEW.model='Rocket_DZ';
END IF;
END
Sure, you can use MySQL Triggers (depending on what build you use) Lets say a person of a specific group dies, you want to set his next spawnpoint to a custom place
BEGIN
DECLARE x INT;
SET x = (SELECT unique_id FROM cust_loadout_profile WHERE unique_id=NEW.unique_id);
IF NEW.unique_id = x...
Tried compiling the script seven posted, put the exec vm in init, the other in scripts.txt, made the scripts folder with the two scripts. But still nothing when I've compiled the server and run it.
I'm having bugs with teleport, people not being able to connect (something went wrong) and can't pick anything up. I can't see whats wrong, because mostly it runs fine with 30-40 people on.
Is it possible for a hacker to change weather/break everyones leg? Or does my server somehow screw the database? Trying to find hackers is impossible...
I just had a hacker on my semi-popular server, he just killed everybody and destroyed all vehicles and stuff. How can I find out who it was? And how can I prevent it?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.