1. Post #1

    September 2012
    96 Posts
    When it comes to Pointshop, there are two issues I'm having right now. One is because I run a TTT server, when people disguise it does not hide their model. I'm not sure how to make it so when they use the disguiser it reverts their model to the maps default. Another I have is how to add an equip/unequip option the store. I want to start having the ability to allow players to buy multiple models and equip them at will, so they start using up their points. I appreciate any help the community can give me.

  2. Post #2
    Gold Member

    May 2010
    64 Posts
    Custom models for TTT is pretty dumb as this is a way to spot them 10 times easier, if you see someone kill and leave, you instantly know that it is someone familiar with a custom model.

    I don't recommend it.

    Edit: Sorry for an answer not to the question but this can help making your TTT better
    Reply With Quote Edit / Delete Reply Windows 7 Norway Show Events Agree Agree x 1Disagree Disagree x 1 (list)

  3. Post #3

    September 2012
    96 Posts
    Custom models for TTT is pretty dumb as this is a way to spot them 10 times easier, if you see someone kill and leave, you instantly know that it is someone familiar with a custom model.

    I don't recommend it.

    Edit: Sorry for an answer not to the question but this can help making your TTT better

    I appreciate it, but the players love the models. If I can get the disguiser working, plus players have several of the same model, then all works well.

  4. Post #4
    Gold Member
    Ludicium's Avatar
    March 2012
    173 Posts
    Well how does TTT know what the map wants as the model?

    If you can figure out where that is I'm sure there is a function that is called to get said value. I am at school now but when I get home if you already don't have an answer I will take a peek for you.

  5. Post #5

    September 2012
    96 Posts
    I'm not entirely sure. I've tried looking into hooks, or variables but no such luck. I would love the help though. :)

  6. Post #6
    Gold Member
    Ludicium's Avatar
    March 2012
    173 Posts
    I'd love to help right now but going to have to wait till I get back from a robotics meeting.

  7. Post #7
    Gold Member
    Ludicium's Avatar
    March 2012
    173 Posts
    Alright well i think i found a solution. Before a players skin is set by your addon do this:
    SetGlobalString( "map_default_model", ply:GetModel())
    
    Then in the disguiser when the player is disguised do this:

    ply:SetModel(GetGlobalString("map_default_model"))
    

  8. Post #8
    Gold Member
    .\\Shadow}'s Avatar
    November 2009
    896 Posts
    If you're using the pointshop made by _Undefined, there's already a variable being set for the model before setting the custom one.

    Open up weaponry.lua and replace lines 427 - 437 with the following:

    local function SetDisguise(ply, cmd, args)
       if not ValidEntity(ply) or not ply:IsActiveTraitor() then return end
    
       if ply:HasEquipmentItem(EQUIP_DISGUISE) then
          local state = #args == 1 and tobool(args[1])
          if ply._OldModel then
             local old = ply._OldModel
             ply._OldModel = ply:GetModel()
             ply:SetModel(old)
          end
          ply:SetNWBool("disguised", state)
          LANG.Msg(ply, state and "disg_turned_on" or "disg_turned_off")
       end
    end
    concommand.Add("ttt_set_disguise", SetDisguise)
    

    Untested, but should work.

  9. Post #9

    September 2012
    96 Posts
    Thank you. Tomorrow as soon as I can I'll test it, and let you know if it works or not. Another question was about an equip/unequip option, if anyone knows how to set it up. Or if anyone wants to help set up a new pointshop from scratch in turn for a coding position for my group, with mod status on forums and group, and a custom tag with colors in game and forums.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1 (list)

  10. Post #10
    Gold Member
    .\\Shadow}'s Avatar
    November 2009
    896 Posts
    Sure, let me just code for free and then babysit your server for you. Sounds fun.

    ( http://www.facepunch.com/showthread.php?t=1193966 )
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Zing Zing x 3Winner Winner x 1Dumb Dumb x 1 (list)

  11. Post #11
    Gold Member
    Ludicium's Avatar
    March 2012
    173 Posts
    I thought he was asking for how to get to the servers default model.

  12. Post #12

    September 2012
    96 Posts
    You never know, eh? :) Some people want a group to work with. Babysitting the server is my job though. Anyway, I input the code and it seems to be working for the disguiser! Thanks!

  13. Post #13

    September 2012
    96 Posts
    I looked in Pointshop and I can not find where it defines the map default. It seems it does not, considering how it was for hats originally I believe. Your code with the disguiser works, but when activated it makes them into a gray default model, which has no animations or anything. Where do I need to put the map default?

  14. Post #14
    Gold Member
    Ludicium's Avatar
    March 2012
    173 Posts
    Do what I said...

  15. Post #15

    September 2012
    96 Posts
    I tried, but I can't find out where that is. :\ IT doesn't state directly.