1. Post #1

    November 2012
    14 Posts
    I would like to add new player models to my TTT server point shop. I have no idea how t, if you could help it would be much appreciated.
    Reply With Quote Edit / Delete Reply Windows XP United States Show Events Dumb Dumb x 2 (list)

  2. Post #2
    your lack of title is bothering me
    Nookyava's Avatar
    January 2013
    3,249 Posts
    Take your item file. Fill it out. Here's an example from the actual pointshop itself that you are able to edit:

    Code:
    ITEM.Name = 'Kleiner'
    ITEM.Price = 250
    ITEM.Model = 'models/player/kleiner.mdl'
    
    function ITEM:OnEquip(ply, modifications)
    	if not ply._OldModel then
    		ply._OldModel = ply:GetModel()
    	end
    	
    	timer.Simple(1, function() ply:SetModel(self.Model) end)
    end
    
    function ITEM:OnHolster(ply)
    	if ply._OldModel then
    		ply:SetModel(ply._OldModel)
    	end
    end
    Now, lets say you want to make it Alyx instead.


    Code:
    ITEM.Name = 'Alyx'
    ITEM.Price = 375
    ITEM.Model = 'models/player/alyx.mdl'
    
    function ITEM:OnEquip(ply, modifications)
    	if not ply._OldModel then
    		ply._OldModel = ply:GetModel()
    	end
    	
    	timer.Simple(1, function() ply:SetModel(self.Model) end)
    end
    
    function ITEM:OnHolster(ply)
    	if ply._OldModel then
    		ply:SetModel(ply._OldModel)
    	end
    end
    That is all you have to do. Look between the two different codes and see what I changed only. Once you have it, take the .lua file and place it into pointshop/lua/items/playermodels/
    Then just change the map and there you go, it's in the shop.

    NOTE: If you are adding a custom player model like my server has, then you will need to add force-downloads. I'm assuming you know how to do this but just reminding you.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Informative Informative x 3 (list)

  3. Post #3
    Posting in OIFY without a permit
    Its Waffles's Avatar
    January 2013
    367 Posts
    Wait, I thought TTT dose not let the user change there player model?
    When i ran TTT, the pointshop didn't change the user's player model.
    Hmm

  4. Post #4

    November 2012
    14 Posts
    Thanks for the help. How the fuck is this a dumb question to whoever said it was. xD

  5. Post #5

    November 2012
    18 Posts
    Before coming here I also tried add ALYX as a test

    ITEM.Model = 'models/player/alyx.mdl'

    That didnt work, you had to change it to,

    ITEM.Model = 'models/alyx.mdl'
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Funny Funny x 1 (list)

  6. Post #6
    Gold Member
    justinthedemond's Avatar
    August 2011
    14 Posts
    This was very helpful. Thank you.