Loading data from another table.
#1

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.
Reply
#2

Just save the player inventory during event start and thats it.

When event ends, give them their inventory back and for those who disconnect in between, their inventory is already saved; Right?
Reply
#3

Its saved into another table, not in main table.

And when they re-connnect server reads data from main table.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)