{"action":"created","issue":{"url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/248","labels_url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/248/comments","events_url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/248/events","html_url":"https://github.com/R4Z0R49/DayZAdmin/issues/248","id":72677484,"number":248,"title":"healPlayer in functions.php not working","user":{"login":"nsonP","id":11528813,"avatar_url":"https://avatars.githubusercontent.com/u/11528813?v=3","gravatar_id":"","url":"https://api.github.com/users/nsonP","html_url":"https://github.com/nsonP","followers_url":"https://api.github.com/users/nsonP/followers","following_url":"https://api.github.com/users/nsonP/following{/other_user}","gists_url":"https://api.github.com/users/nsonP/gists{/gist_id}","starred_url":"https://api.github.com/users/nsonP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsonP/subscriptions","organizations_url":"https://api.github.com/users/nsonP/orgs","repos_url":"https://api.github.com/users/nsonP/repos","events_url":"https://api.github.com/users/nsonP/events{/privacy}","received_events_url":"https://api.github.com/users/nsonP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-02T18:08:04Z","updated_at":"2015-05-02T22:16:20Z","closed_at":null,"body":"Have been trying to fix this function for a while now. The problem is that the function healPlayer in actions.php is not adding the blood type and the flag that tells if it should be visible for the player or not.\r\n\r\n```\r\n$db->Execute(\"UPDATE Character_DATA SET Medical = '[false,false,false,false,false,false,false,12000,[],[0,0],0,[0,0]]' WHERE CharacterID = ? AND Alive = 1\", $CharacterID);\r\n\r\n[false,false,false,false,false,false,false,12000,[],[0,0],0,[0,0]]\r\n```\r\nThe new string should look like:\r\n```\r\n[false,false,false,false,false,false,false,12000,[],[0,0],0,\"A\",false,[0,0,0]]\r\n```\r\n\r\nA quick fix would be to just update the string with above and have a static blood type but then the players will get the same blood typ every time the function is used.\r\n\r\nA better approach that i have been trying to implement is to copy the last original part of the string and then replace the rest with static info.\r\n\r\n__*example:*__\r\n```\r\nSET @Part1 := '[false,false,false,false,false,false,false,12000,[],[0,0],0,\"';\r\nSET @Part2 :=  (SELECT substring_index(medical, ',\"', -1) FROM character_dead where CharacterID = 2);\r\nUPDATE character_dead SET Medical = @Part1+@Part2 WHERE CharacterID = 2;\r\nUPDATE character_dead SET Medical = CONCAT(medical, '@part2') CharacterID = 2;\r\n``` \r\nIts working fine as a mysql query but not together with php and adodb.\r\nAny idea of how to fix this one?"},"comment":{"url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/comments/98408631","html_url":"https://github.com/R4Z0R49/DayZAdmin/issues/248#issuecomment-98408631","issue_url":"https://api.github.com/repos/R4Z0R49/DayZAdmin/issues/248","id":98408631,"user":{"login":"R4Z0R49","id":1015182,"avatar_url":"https://avatars.githubusercontent.com/u/1015182?v=3","gravatar_id":"","url":"https://api.github.com/users/R4Z0R49","html_url":"https://github.com/R4Z0R49","followers_url":"https://api.github.com/users/R4Z0R49/followers","following_url":"https://api.github.com/users/R4Z0R49/following{/other_user}","gists_url":"https://api.github.com/users/R4Z0R49/gists{/gist_id}","starred_url":"https://api.github.com/users/R4Z0R49/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4Z0R49/subscriptions","organizations_url":"https://api.github.com/users/R4Z0R49/orgs","repos_url":"https://api.github.com/users/R4Z0R49/repos","events_url":"https://api.github.com/users/R4Z0R49/events{/privacy}","received_events_url":"https://api.github.com/users/R4Z0R49/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T22:16:20Z","updated_at":"2015-05-02T22:16:20Z","body":"Cheers Marcuzz, Wriley"}}