OnPlayerUpdate
#1

Will the server lag or will i have any problems if i for example make a callback which saves the user database and then use this inside.. OnPlayerUpdate so it saves user file continually or should i make a timer ?
Reply
#2

Writing to disk in OnPlayerUpdate is the worst thing you could possibly do. Better to use a 10, 20, 30 minute timer or write changes the instant they're changed.
Reply
#3

Why onplayerupdate? when you can save them under onplayerdeath? anyway I tried before saving player database under onplayerupdate and I can feel the delay, for me adding timer in onplayerupdate will make things worst. But let us see if someone recommend better.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Writing to disk in OnPlayerUpdate is the worst thing you could possibly do. Better to use a 10, 20, 30 minute timer or write changes the instant they're changed.
So you suggest me to use a timer.. OK thanks Vince this is what i wanted actually to here because i wasn't sure.. ! Thanks.
But i set the timer onplayerconnect ?
Reply
#5

Quote:
Originally Posted by vassilis
Посмотреть сообщение
So you suggest me to use a timer.. OK thanks Vince this is what i wanted actually to here because i wasn't sure.. ! Thanks.
But i set the timer onplayerconnect ?
You set a timer under public OnGameModeInit() because you need a global timer (SetTimer not SetTimerEx)
Reply
#6

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
You set a timer under public OnGameModeInit() because you need a global timer (SetTimer not SetTimerEx)
Ok i understand now thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)