• Pointshop help and Setting player model
    4 replies, posted
Hi there, I've been struggling to do a few things with my pointshop. Firstly giving double points to someone with our tag in [PxG], here is what I have so far; [code] if PS.Config.PointsOverTime then timer.Create('PS_PointsOverTime_' .. self:UniqueID(), PS.Config.PointsOverTimeDelay * 60, 0, function() PS.Config.PointsOverTimeAmount if string.find(self:Nick(), "[PxG]", 1, true) then PS.Config.PointsOverTimeAmount = PS.Config.PointsOverTimeAmount*2 end end) end [/code] Secondly due to hat positioning I am trying to set it so only one player model is selected upon round start (cs_phoenix) [code] hook.Add("TTTBeginRound", "BeginRoundDetectiveSkin", function() for k,v in pairs(player.GetAll()) do if v:SetModel(Model("player/phoenix.mdl")) end end end) [/code] Thanks in advance.
Thanks for the reply, Matt. And sure thing, I've positioned our hats and will just continue using random plyermodels. Thanks again.
With the player model thing, the hook isn't really needed. Spent a moment to think about your problems/errors, somewhere TTT must be setting your model. Take a look inside your shared.lua and there'll be a table of CSS characters, one of which is randomly picked when the round starts as the player model, that can be changed to as many or as little as you'd like.
[QUOTE=NiandraLades;43192271]With the player model thing, the hook isn't really needed. Spent a moment to think about your problems/errors, somewhere TTT must be setting your model. Take a look inside your shared.lua and there'll be a table of CSS characters, one of which is randomly picked when the round starts as the player model, that can be changed to as many or as little as you'd like.[/QUOTE] Thanks for the suggestion, I scrapped the idea but decided to have a look anyway. Line 271 of gamemodes/terrortown/gamemode/player_ext.lua seemed to do the trick. Thanks allot both of you.
Sorry, you need to Log In to post a reply to this thread.