Jump to content


Photo

Need help: Server side regeneration


  • Please log in to reply
2 replies to this topic

#1 Savarix

Savarix

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:Studio

Posted 05 February 2012 - 06:28 AM

Ok, so a client's health falls to, say, 50%. He then logs off knowing his health will regenerate over time while he is off to sleep.

So the client won't be changing the health variable over time since it is turned off so it is all up to the server. The server can't also specifically target a single username and regenerate that variable for him because there will be too many players (hope you know what I mean).

All of player's variables are stored in a single INI file. How can a user' health regenerate while he is not logged in a client program? I was thinking of using ds stacks and list commands but I don't that will work. Also I don't want to use SQL (unless I really need to).

Thanks in advance :)
  • 0

#2 orange451

orange451

    GMC Member

  • GMC Member
  • 1080 posts
  • Version:GM8.1

Posted 06 February 2012 - 11:30 PM

in the server, when he logs off, store the server computers time when he logged off. When he logs on, compare it to the current server computers time.
  • 0

#3 Savarix

Savarix

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:Studio

Posted 07 February 2012 - 12:21 AM

Never mind I just used for loop.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users