Player model wont equip

Post Reply
kArp
New to forums
New to forums
Posts: 9
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Sep 08, 2013 10:11 am

Player model wont equip

Post by kArp »

I have this problem when someone puts there character on it goes on automatically on prep time, but when the actual game starts it unequips any suggestions? Heres my code

Code: Select all

ITEM.Name = 'Corvo'
ITEM.Price = 250
ITEM.Model = 'models/player/corvo.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

function ITEM:PlayerSetModel(ply)
	ply:SetModel(self.Model)
end
User avatar
Aeternal
Compulsive poster
Compulsive poster
Posts: 60
Joined: Sun Nov 24, 2013 7:41 am
Contact:

Re: Player model wont equip

Post by Aeternal »

Go to garrysmod/gamemodes/terrortown/gamemode and find player.ext.lua then scroll down to line 271 and delete it. That line states that if a player dies pre round that they'll spawn when it starts but also sets the model back to default. Doing this however will make a model change color and theres a fix for that but I forgot :(
Image
Post Reply