02.05.2017, 14:37
Hey,
Recently i had been working on a event system, but as my serve mode is dayz, which means all players have alot of loots & weapons all the time that they got after hours of looting, i didnt wanted them to lose thoe things... thus i made another table in database (usersEx) that i am using to save payer data before event starts & load it once the event is over... until that we're fine.
now the problems comes with, what of the player disconnects while in event? he would lose everything & would spawn in event area... I had found a solution for that but now i realize its not efficient, the solution was to check if the player isinevent at disconnect, if yes, delete the row from oroginal table and insert it from the other table, now the problem is sometimes the insert query is not executed but only the delete query is, thus player losses all his data.
So, I was here to ask for some suggestions about how should make it that if player disconnects during the event, his data before the event gets restored (the one saved in usersEx).
Thanks in advance.
Recently i had been working on a event system, but as my serve mode is dayz, which means all players have alot of loots & weapons all the time that they got after hours of looting, i didnt wanted them to lose thoe things... thus i made another table in database (usersEx) that i am using to save payer data before event starts & load it once the event is over... until that we're fine.
now the problems comes with, what of the player disconnects while in event? he would lose everything & would spawn in event area... I had found a solution for that but now i realize its not efficient, the solution was to check if the player isinevent at disconnect, if yes, delete the row from oroginal table and insert it from the other table, now the problem is sometimes the insert query is not executed but only the delete query is, thus player losses all his data.
So, I was here to ask for some suggestions about how should make it that if player disconnects during the event, his data before the event gets restored (the one saved in usersEx).
Thanks in advance.