Jump to content

Deconstruct Buildables


Snowmobil

Recommended Posts

So on 1.0.4.2 I just simpy need the SQl-Trigger, right?

So I dont need to change the fn_SelfActions.sqf?

 

If so, could someone post the SQL-Trigger which is workin without having issues?

 

Would be very nice!  Thanks!

Link to comment
Share on other sites

So on 1.0.4.2 I just simpy need the SQl-Trigger, right?

So I dont need to change the fn_SelfActions.sqf?

 

If so, could someone post the SQL-Trigger which is workin without having issues?

 

Would be very nice!  Thanks!

 

That SQL trigger is to update objects with your new character ID upon death. You'll still need to follow the original steps to allow the object removal option. There's a working copy of the trigger somewhere back in this thread.

Link to comment
Share on other sites

  • 2 weeks later...

DELIMITER ;
DROP TRIGGER IF EXISTS epoch.`update_owner`;
DELIMITER //
CREATE TRIGGER epoch.`update_owner`
AFTER INSERT ON epoch.character_data
FOR EACH ROW
BEGIN
UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN
(SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID)
AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' );
END//
DELIMITER ;

This code work with DayZ Epoch v 1.0.4.2 ?

 

Link to comment
Share on other sites

It's been 3 months I'm working on the server development, this is the last step before opening.
 
But .... I don't know SQL well (how to write a triger in my database with Navicat).
Could you please help me.
 
Please find after the error message. ( Syntax error sql )
 
http://nsa34.casimages.com/img/2014/06/06/140606025452769928.jpg
Your Help will be really appreciate.
Link to comment
Share on other sites

1- Add to Queries
2- Name : update_owner

3- Past this code :

DELIMITER ;
DROP TRIGGER IF EXISTS epoch.`update_owner`;
DELIMITER //
CREATE TRIGGER epoch.`update_owner`
AFTER INSERT ON epoch.character_data
FOR EACH ROW
BEGIN
UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN
(SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID)
AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' );
END//
DELIMITER ;

4- Open this code and click "Run", one time and only once ? ( No need to restart the query after each server restart ?)
5- That all ? Nothing else to do ?

Link to comment
Share on other sites

Hey Guys,

 

 

so If I just want to update the OwnerID I dont need to do the all the work on the first page, right?

 

Cuz when I u build an Object u r able to deconstruct it without refund, so If I just update the Owner ID I should be able to deconstruct it after I died and a restart happend, shouldnt I?

 

Would be nice if someone could answer this.

 

 

Greetings

Link to comment
Share on other sites

  • 7 months later...

This isn't needed because Epoch now has the ability to remove any buildables under your current character ID.

how do you allow players to removes their buildables in 1.05?

i have tried all these scripts and nothing seems to be working.

is there a way to allow players to build and remove items before and after death? without having to replace a plot?

Link to comment
Share on other sites

 

There's a "//" missing near the bottom. This works:

DELIMITER ;
DROP TRIGGER IF EXISTS epoch.`update_owner`;
DELIMITER //
CREATE TRIGGER epoch.`update_owner`
AFTER INSERT ON epoch.character_data
FOR EACH ROW
BEGIN
UPDATE epoch.object_data SET CharacterID= NEW.CharacterID WHERE CharacterID IN
(SELECT CharacterID FROM player_login WHERE PlayerUID= NEW.PlayerUID)
AND (Classname = 'WoodSmallWall_DZ' OR Classname = 'WoodSmallWallThird_DZ' OR Classname = 'WoodLargeWall_DZ' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'WoodLargeWallDoor_DZ' OR Classname = 'WoodSmallWallDoor_DZ' OR Classname = 'WoodStairs_DZ' OR Classname = 'WoodStairsSans_DZ' OR Classname = 'WoodSmallWallWin_DZ' OR Classname = 'WoodLargeWallWin_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'WoodRamp_DZ' OR Classname = 'WoodLadder_DZ' OR Classname = 'WoodFloor_DZ' OR Classname = 'WoodFloorQuarter_DZ' OR Classname = 'WoodFloorHalf_DZ' OR Classname = 'Wooden_shed_DZ' OR Classname ='Land_DZE_WoodDoor' OR Classname = 'Land_DZE_LargeWoodDoor' OR Classname = 'Land_DZE_GarageWoodDoor' OR Classname = 'CinderWall_DZ' OR Classname = 'CinderWallHalf_DZ' OR Classname = 'CinderWallDoorway_DZ' OR Classname = 'CinderWallDoor_DZ' OR Classname = 'CinderWallSmallDoorway_DZ' OR Classname = 'CinderWallDoorSmall_DZ' OR Classname = 'Plastic_Pole_EP1_DZ' OR Classname = 'TentStorage' OR Classname = 'TentStorageDomed' OR Classname = 'TentStorageDomed2' OR Classname = 'LightPole_DZ' OR Classname ='SandNest_DZ' OR Classname = 'MetalFloor_DZ' OR Classname = 'Hedgehog_DZ' OR Classname = 'Sandbag1_DZ' OR Classname = 'WoodGate_DZ' OR Classname = 'Land_HBarrier1_DZ' OR Classname = 'Land_HBarrier3_DZ' OR Classname = 'Fence_corrugated_DZ' OR Classname = 'M240Nest_DZ' OR Classname = 'CanvasHut_DZ' OR Classname = 'ParkBench_DZ' OR Classname = 'MetalGate_DZ' OR Classname = 'OutHouse_DZ' OR Classname = 'WoodShack_DZ' OR Classname = 'StorageShed_DZ' OR Classname = 'StickFence_DZ' OR Classname = 'DesertCamoNet_DZ' OR Classname = 'ForestCamoNet_DZ' OR Classname = 'DesertLargeCamoNet_DZ' OR Classname = 'ForestLargeCamoNet_DZ' OR Classname = 'DeerStand_DZ' OR Classname = 'MetalPanel_DZ' OR Classname = 'WorkBench_DZ' );
END//
DELIMITER ;

where do you put this file?

also will this work in 1.05?

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