• Make NPC model player model?
    6 replies, posted
Is there a way to make these NPC models into player models? [url]http://www.garrysmod.org/downloads/?a=view&id=81649[/url] The normal combine elite model has player animations, so would a lua file do it? If so, how would I do this? Thanks.
[LUA] for k,v in pairs(player.GetAll()) do v:SetModel("model you want to use") local a = v.GetPos() v:Kill() v:Spawn() v:Setpos(a) end [/LUA]
[QUOTE=dingusnin;25169117][LUA] for k,v in pairs(plater.GetAll()) do v:SetModel("model you want to use") local a = v.GetPos() v:Kill() v:Spawn() v:Setpos(a) end [/LUA][/QUOTE] I'm new to scripting. Where do I put this file, what do I name it, and do I edit anything other than "model you want to use"?
well this code will only run once , and it sets ALL players model to that. , i will post new code and explain how to make it work [editline]06:31AM[/editline] [LUA] concommand.Add("combine_me", function() for k,v in pairs(player.GetAll()) do if v.SteamID() == "STEAM_ID:Goes:Here" then v:SetModel("models/aperturee1/combine_super_soldier.mdl") local a = v.GetPos() v:Kill() v:Spawn() v:Setpos(a) end end) [/LUA] [editline]06:32AM[/editline] And you put it in autorun/server , and then in console do combine_me to make you combine :P
Thanks! [editline]10:43PM[/editline] [QUOTE=dingusnin;25169211]well this code will only run once , and it sets ALL players model to that. , i will post new code and explain how to make it work [editline]06:31AM[/editline] [LUA] concommand.Add("combine_me", function() for k,v in pairs(plater.GetAll()) do if v.SteamID() == "STEAM_ID:Goes:Here" then v:SetModel("models/aperturee1/combine_super_soldier.mdl") local a = v.GetPos() v:Kill() v:Spawn() v:Setpos(a) end end) [/LUA] [editline]06:32AM[/editline] And you put it in autorun/server , and then in console do combine_me to make you combine :P[/QUOTE] Is that "for k,v in pairs([i]player[/i].GetAll()) do" Player not plater?
lawl, sorry for that erorr , and yes it should be :P
Dear god please someone stop dingusnin. To make NPC models into player models you will need to decompile them and recompile them with the needed model includes in the qc
Sorry, you need to Log In to post a reply to this thread.