• Pointshop - Point Based on ULX usergroup
    2 replies, posted
Hello, I have [URL="http://facepunch.com/showthread.php?t=1286577"]Pointshop[/URL] installed on my server, as well as the latest version of ULX. I'm new to Lua, but not to programming in general. Anyway, I'm trying to make my TTT server give different points to different ULX ranks. Here is what I've done ([URL="http://pastebin.com/CcCH2rU5"]Full sv_player_extension[/URL]): [CODE] if PS.Config.PointsOverTime then if self:IsUserGroup("superadmin") then givepoints = (PS.Config.PointsOverTimeAmount + 15) elseif self:IsUserGroup("admin") then givepoints = (PS.Config.PointsOverTimeAmount + 10) elseif self:IsUserGroup("donator") then givepoints = (PS.Config.PointsOverTimeAmount + 5) else givepoints = (PS.Config.PointsOverTimeAmount) end timer.Create('PS_PointsOverTime_' .. self:UniqueID(), PS.Config.PointsOverTimeDelay * 60, 0, function() self:PS_GivePoints(givepoints) self:PS_Notify("You've been given ", givepoints, " points for playing on the server!") end) [/CODE] For some reason, this seems to be giving the players 'random' points. For example, I'm a superadmin, and sometimes I get 25, 20, 15 or sometimes just 10. Anybody got any ideas?
Does anybody know what's going wrong? I've found a similar problem regarding a script I made that outputs the players name and SteamID into the chatbox upon disconnect. (The script would show the usergroups 'colour' using 'ply:IsUserGroup( "superadmin" )'.
I think you miss posting a bit of the code (there is supposed to be 3 ends as default) but i can help you over steam if you still have this issue [url]http://steamcommunity.com/profiles/76561198029868701/[/url] Or you could just post the whole code of that lua file
Sorry, you need to Log In to post a reply to this thread.