Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DEFINER=`dayz`@`localhost` PROCEDURE `createobj`(IN `otype` VARCHAR(50), IN `fuel` DOUBLE)
- LANGUAGE SQL
- NOT DETERMINISTIC
- CONTAINS SQL
- SQL SECURITY DEFINER
- COMMENT ''
- BEGIN
- set @NewID = (select (max(unique_id)+1) as id1 from dayz.objects) ;
- set @uid1 = (select (max(unique_id)+1) as id1 from dayz.objects) ;
- set @pos1 = set @pos1 = (select pos from dayz.survivor where is_dead = 0 and unique_id = '72267014');
- insert into dayz.objects
- set unique_id = @NewID;
- update dayz.objects
- set uid = @uid1
- where unique_id = @NewID;
- update dayz.objects
- set pos = @pos1
- where unique_id = @NewID;
- update dayz.objects
- set Inventory = '[]'
- where unique_id = @NewID;
- update dayz.objects
- set otype = otype
- where unique_id = @NewID;
- update dayz.objects
- set fuel = fuel
- where unique_id = @NewID;
- update dayz.objects
- set instance = 1
- where unique_id = @NewID;
- END
Add Comment
Please, Sign In to add comment