• attach pac outfit on spawn
    4 replies, posted
How would i make it so there is a default pac outfit attatched to a player on spawn? ive looked and can only find pac.setupent which only allows me to attach it to 1 person my error when i try to attach a pac outfit with a second player [CODE] [ERROR] addons/pac3/lua/pac3/core/client/integration_tools.lua:95: attempt to index local 'outfit' (a boolean value) 1. AttachPACPart - addons/pac3/lua/pac3/core/client/integration_tools.lua:95 2. func - gamemodes/testgm/gamemode/cl_init.lua:21 3. unknown - lua/includes/extensions/net.lua:32 [/CODE]
[url=https://github.com/CapsAdmin/pac3/wiki/PAC-in-gamemodes#how-do-i-attach-parts-to-my-entity]This might help you out[/url]
[QUOTE=LUModder;49912079][url=https://github.com/CapsAdmin/pac3/wiki/PAC-in-gamemodes#how-do-i-attach-parts-to-my-entity]This might help you out[/url][/QUOTE] ive already looked at this and cant manage to figure it out [editline]11th March 2016[/editline] [QUOTE=Wildo;49912089]ive already looked at this and cant manage to figure it out[/QUOTE] as stated previously if i do it like this players cannot see the pac outfit update on another player once changed and it brings up errors when i try to use this on different people
[lua] pac.AddEntityClassListener("entity_class",pac.luadata.ReadFile("outfitfilethatsontheserver.txt")) [/lua] This is going to be the simplest way.
My Code: [lua] concommand.Add("PacSetup", function(ply) pac.SetupENT(ply) end) concommand.Add("PacAdd", function(ply) ply:AttachPACPart(pac.luadata.ReadFile("pac3/" .. txt .. ".txt")) end) concommand.Add("PacRemove", function(ply) ply:RemovePACPart(pac.luadata.ReadFile("pac3/testpac.txt")) end) [/lua] [editline]11th March 2016[/editline] [QUOTE=LUModder;49912102][lua] pac.AddEntityClassListener("entity_class",pac.luadata.ReadFile("outfitfilethatsontheserver.txt")) [/lua] This is going to be the simplest way.[/QUOTE] im trying to attach the pac outfit to a player [editline]11th March 2016[/editline] [QUOTE=Wildo;49912108]My Code: [lua] concommand.Add("PacSetup", function(ply) pac.SetupENT(ply) end) concommand.Add("PacAdd", function(ply) ply:AttachPACPart(pac.luadata.ReadFile("pac3/" .. txt .. ".txt")) end) concommand.Add("PacRemove", function(ply) ply:RemovePACPart(pac.luadata.ReadFile("pac3/testpac.txt")) end) [/lua] [editline]11th March 2016[/editline] im trying to attach the pac outfit to a player[/QUOTE] i cant find any documentation anywhere about attaching pac outfits to players through lua
Sorry, you need to Log In to post a reply to this thread.