Ulysses Stuff > Releases

Utime -- Show how long your players have been connected this session and total

<< < (31/84) > >>

TeoTown:
I'm very nooby with Lua. :c

I'm trying to add this to give the players experience points by how long they have played. I made a DarkRP chat command to check the total time but it appears as zero.


--- Code: ---local function CheckTime(ply)
ply:PrintMessage(HUD_PRINTTALK,"[UTime] You have played on the server for: " .. ply:GetNWInt("TotalUTime") .. ".")
return ""
end
AddChatCommand("/time", CheckTime)
--- End code ---

Is ply:GetNWInt("TotalUTime") wrong?

TweaK:
I think ply:GetUTimeTotalTime() is what you're looking for.

JackYack13:
Will there be a working release of this for GMod 13?

Megiddo:

--- Quote from: JackYack13 on October 07, 2012, 05:59:01 AM ---Will there be a working release of this for GMod 13?

--- End quote ---

Is it not already working?

JackYack13:

--- Quote from: Megiddo on October 07, 2012, 04:09:07 PM ---Is it not already working?

--- End quote ---

It spams my console and the blue box in the corner is white and doesn't show any text. Serverside stuff is probably working though.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version