• [Help] Help with a way to save a players job in Dark Rp
    2 replies, posted
How can I save a persons job after they have logged off? Im comprising a Dark Rp server and was wondering if this was possible. Also if you could post the solution, it would be most appreciated.
Why would you want to do this, what if they log off and they keep their job they log back on and the limit is reached what happens I mean darkrp is meant for voting to become what you want to be I don't know if this is even possible to make a permanent job in Darkrp.
[code]hook.Add("PlayerDisconnect", "job", function(pl) file.Write(pl:SteamID().." - JOB", pl:Team()) end) hook.Add("PlayerInitialSpawn", "spawn", function(pl) job = (file.Exists(pl:SteamID().."- JOB") and file.Read(pl:SteamID().."- JOB") or TEAM_CITIZEN) -- whatever the command is to set a players job end)[/code] that would probably work
Sorry, you need to Log In to post a reply to this thread.