Ulysses Stuff > Suggestions

Linking the two.

(1/3) > >>

SkuD:
The Idea:
I would like to have the module UTime with UTeam and ulx to automatically determine what user group a player is put in.  When a player hits a specified amount of play time they are automatically upgraded to next player grouping until they hit the max limit of groups a player can achieve. 

I am definitely not an advanced coder but I can get my way around eventually.  I can picture how the code should be but am a bit lost on how to link the files into one.  If anyone has some free time to aid me with this I would appreciate the help and/or input.

JamminR:
If anyone can help with this, zakap can. He uses time based point systems for advancement on his server [gmod4president]
I'm not fully aware how he has it all set up, but know it can be done.

Now, as to whether he has time to assist or not, or perhaps make a release of his code, I do not know.

Also, does UTime work? I've not tried it since the update. Thought it was broken for some reason.
I know that zakap uses TheBigA's time script, which was written for him(zakap) originally to keep time and point count originally anyway.

SkuD:
Utime appears to be working fine.  It gets some random startup errors that mean nothing, just the way that scripts are loaded on startup.

MrPresident:
I did this once, but I just wrote a simple timer script for my server that checked players time every 30 seconds and promoted them if they needed to be promoted. I don't know how UTime stores it's times so I can't really help you there.

SkuD:
Thats pretty much what I was looking to accomplish.  It appears it is or can be SQL database.   
The function that holds the time appears to be this:    


--- Code: ---function onJoin( ply )
local uid = ply:UniqueID()
local row = sql.QueryRow( "SELECT totaltime, lastvisit FROM utime WHERE player = " .. uid .. ";" )
local time = 0
ply:SetUTime( time ), ply:SetUTimeStart( CurTime() )
--- End code ---


With time being your total hours played and current being the session.

Navigation

[0] Message Index

[#] Next page

Go to full version