Jump to content

[Howto/Release] Tie PlayerUID To All Buildable Objects / Keep plot pole after death [No SQL Triggers] UPDATE 16/04/2014


Recommended Posts

Is it possible to write a sql-command which set up the char-ID to the "new" format? There are many buildings onto our server and we havn´t deleted dead chars for months because every builded Item would be lost if he had built some. I really don´t have experience with sql :(

 

Hope that is OT again :)

 

And if I havn´t said by now: Thanks for your work. Thats awesome. I nearly run every of your scripts on our server. And everyone loves it.

Link to comment
Share on other sites

I don't allow reposting on other sites than this. I don't even have it public on my own site. You Can refer Them to this forum. Without possible visitors and donators for this site we wouldn't have this great mod, support the devs by at least make them visit.

What you ca do is post a translated version in this thread and refer them to that post, I might even merge it with the OP

Link to comment
Share on other sites

After you install this, everything you build will be connected to your UID instead of character id. And you can die how many times you want, and it will still be connected to your UID. It will not change the things you already have built before you install this. You need to replace plot pole.

Correct :)
Link to comment
Share on other sites


on your SQL run
show triggers;

 

i'm sure you have a trigger that update the character field

this what i get

How do i get this trigger to terminate?Be gone?

Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
character_data_AINS	INSERT	character_data	-- Edit trigger body code below this line. Do not edit lines above this one
BEGIN
	DECLARE oldCharacterID INT;
	SELECT 
		CharacterID INTO oldCharacterID
	FROM 
		character_data 
	WHERE
		PlayerUID = new.PlayerUID
			AND
		Alive = '0'
	ORDER BY CharacterID Desc
	LIMIT 1;

	IF (oldCharacterID IS NOT NULL) THEN
		UPDATE
			object_data
		SET
			CharacterID = new.CharacterID
		WHERE
			Classname = 'Plastic_Pole_EP1_DZ'
				AND
			CharacterID = oldCharacterID;
	END IF;
END	AFTER			root@localhost	utf8	utf8_general_ci	latin1_swedish_ci
Link to comment
Share on other sites

Will have a look when I get to a computer tomorrow mate but I know it's not the changes that's the issue it's some setting or mod you have. On a tablet right now. But try and list any mod or special settings regarding traders and vehicles that you have. Also post som more info like a report of what you do in game, what happens and what isn't working. Might be able to narrow it down.

From what you posted it sounds like the error is in the self action file, go over step 12 again and make sure you didn't miss or have too many " ; ( ) as those are usually the cause to a self action file acting up

Link to comment
Share on other sites

Will have a look when I get to a computer tomorrow mate but I know it's not the changes that's the issue it's some setting or mod you have. On a tablet right now. But try and list any mod or special settings regarding traders and vehicles that you have. Also post som more info like a report of what you do in game, what happens and what isn't working. Might be able to narrow it down.

From what you posted it sounds like the error is in the self action file, go over step 12 again and make sure you didn't miss or have too many " ; ( ) as those are usually the cause to a self action file acting up

 

This is my fn_selfactions without any of the changes required for this script. I believe the only modification to it that I've made is for the self bloodbag: http://pastebin.com/EQ3QXGW9

Link to comment
Share on other sites

I set up a test server and set this up from scratch. I simply copied the files from my Chernarus server over to the test server so everything is the same. I already have a player_build.sqf from the snap building script, so I just edited that file. That file is already defined in my custom compiles.sqf as being in custom\snap_build.

 

Before uploading these changes, I built a plot pole with two walls. Then, I uploaded the changes and restarted the server. When I spawned back in, I have no option to remove the plot pole. I can only maintain or maintain preview the plot pole. I can upgrade the walls. I can't put another plot pole down.

 

What suggestions do you have? 

 

*edit* Nevermind. I missed replacing one of the "\z\addons\dayz_code\actions\remove.sqf" references. I'll check to see if it's working properly now.

Link to comment
Share on other sites

It looks like before I posted that last reply, I actually didn't upload the files I modified. :)

 

Anyway, I went through and confirmed that every step was done correctly. I uploaded the new files, spawned in and now I can't unlock vehicles. I also get no options on my plot pole.

 

I don't have a custom variables.sqf. I don't have anything installed that require a modification of it.

 

*edit* Do I have to do something with my database? I placed a new plot pole, further away from the first one and in the database, that one is showing my Player UID in the CharacterID column. Does that have column need to be renamed?

Link to comment
Share on other sites

only thing you have to be sure of is that you don't have that trigger that updates the character field, else you use a normal SQL without any modification no need to change anything.

 

please give a pastebin link to your current fn_selfAction.sqf as the error is some thing you have done wrong. I'm 110% sure ;)

Link to comment
Share on other sites

only thing you have to be sure of is that you don't have that trigger that updates the character field, else you use a normal SQL without any modification no need to change anything.

 

please give a pastebin link to your current fn_selfAction.sqf as the error is some thing you have done wrong. I'm 110% sure ;)

 

The test server only has the default Epoch triggers. Nothing to update the character field.

 

My fn_selfactions.sqf: http://pastebin.com/EQ3QXGW9

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
×
×
  • Create New...