• XP Bar/Play Time
    2 replies, posted
Hi. I'm trying to make a XP bar that stores a players level, and it goes up in xp whenever the player reaches a certain total playtime. How would I go about doing this?
*cough* [url]http://www.facepunch.com/showthread.php?t=758625[/url] A little something I made. It's not the same that you want, but it's similar. It has an exp bar, but gets exp through shooting things. About your idea 1. Storing it: Use SQLite. That's how I used mine (refer to the exp_data.lua). 2. Exp bar: Just use the draw/surface libraries on the client (refer to the exp_hud.lua) 3. Playtime: You store the CurTime() as networked integer on the player on inital connect, then when they leave you use CurTime() - ply:GetNWInt("JoinTime") to get how long they've been on. Add that to a total (another NWInt), and save it in the SQL database.
Hmm... very nice it seems to be working thanks =-)
Sorry, you need to Log In to post a reply to this thread.