how do i add a playermodel to a pointshop?

i tried to add one from a tutorial but it wouldnt work. this is what it said :


[superbike221|2|STEAM_0:1:59630520] Lua Error:

[ERROR] addons/lucario player model and npc/lua/autorun/lucario_playermodel.lua:
11: invalid escape sequence near '"C:'
  1. unknown - addons/lucario player model and npc/lua/autorun/lucario_playermod
el.lua:0


[superbike221|2|STEAM_0:1:59630520] Lua Error:

[ERROR] addons/pointshop-master/lua/items/playermodels/lucario.lua:3: invalid es
cape sequence near ''C:'
  1. unknown - addons/pointshop-master/lua/items/playermodels/lucario.lua:0


[superbike221|2|STEAM_0:1:59630520] Lua Error:
[POINTSHOP] Item missing name: playermodels/lucario.lua

please help


(User was banned for this post ("Use the Developer Discussion section for threads like this" - Megafan))

Post your code.

?

[editline]29th May 2014[/editline]

what code?

Your pointshop playermodel code that is producing the error.

[editline]29th May 2014[/editline]

Also, post lucario_playermodel.lua.

dont

lucario.lua
from the pointshop file


ITEM.Name = 'lucario'
ITEM.Price = 1000
ITEM.Model = 'C:\gmod\garrysmod\addons\Lucario Player Model and NPC\models\smashbros\lucario_player\lucario_player.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

lucario_playermodel.lua


list.Set( "PlayerOptionsModel", "Lucario", "models/smashbros/lucario_player/lucario_player.mdl" )
player_manager.AddValidModel( "Lucario", "models/smashbros/lucario_player/lucario_player.mdl" )
player_manager.AddValidHands( "Lucario", "models/weapons/c_lucario_arms.mdl", 0, "00000000" )

list.Set( "PlayerOptionsModel", "Lucario Color", "models/smashbros/lucario_player_color/lucario_player_color.mdl" )
player_manager.AddValidModel( "Lucario Color", "models/smashbros/lucario_player_color/lucario_player_color.mdl" )
player_manager.AddValidHands( "Lucario Color", "models/weapons/c_lucario_arms_color.mdl", 0, "00000000" )


if (SERVER) then 
player_manager.AddValidModel( "lucario", "C:\gmod\garrysmod\addons\LucarioPlayerModelandNPC\models\smashbros\lucario_player" )
AddCSLuaFile( "poop.lua" )
end

list.Set( "PlayerOptionsModel", "lucario", "C:\gmod\garrysmod\addons\LucarioPlayer ModelandNPC\models\smashbros\lucario_player" )


--// File Generated By Fox-Warrior's Resources Generator Version 2.06 \\--

if (SERVER) then
	resource.AddFile( "models/weapons/c_lucario_arms.mdl" )
	resource.AddFile( "models/weapons/c_lucario_arms_color.mdl" )
	resource.AddFile( "models/smashbros/lucario_player_color/lucario_player_color.mdl" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.mdl" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.dx80.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.dx90.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.phy" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.sw.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.vvd" )
	resource.AddFile( "materials/vgui/entities/npc_lucario.vmt" )
	resource.AddFile( "materials/vgui/entities/npc_lucario.vtf" )
	resource.AddFile( "materials/vgui/entities/npc_lucario_evil.vmt" )
	resource.AddFile( "materials/vgui/entities/npc_lucario_evil.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_l.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_l.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/flat2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioarmleg.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioarmleg.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucariobody.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucariobody.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioface.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioface.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_l.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_l.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/flat2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioarmleg.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioarmleg.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucariobody.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucariobody.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioface.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioface.vtf" )
end

Change your model paths in both files to start from models/, not C:/. Also, you don’t need list.Set anymore; it’s obsolete.

ty

[editline]30th May 2014[/editline]

still not working tho:suicide:

[editline]30th May 2014[/editline]

edited lucario.lua


ITEM.Name = 'lucario'
ITEM.Price = 1000
ITEM.Model = 'models\smashbros\lucario_player\lucario_player.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


edited lucario_playermodel.lua


if (SERVER) then 
player_manager.AddValidModel( "lucario", "models\smashbros\lucario_player" )
AddCSLuaFile( "poop.lua" )
end

--// File Generated By Fox-Warrior's Resources Generator Version 2.06 \\--

if (SERVER) then
	resource.AddFile( "models/weapons/c_lucario_arms.mdl" )
	resource.AddFile( "models/weapons/c_lucario_arms_color.mdl" )
	resource.AddFile( "models/smashbros/lucario_player_color/lucario_player_color.mdl" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.mdl" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.dx80.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.dx90.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.phy" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.sw.vtx" )
	resource.AddFile( "models/smashbros/lucario_player/lucario_player.vvd" )
	resource.AddFile( "materials/vgui/entities/npc_lucario.vmt" )
	resource.AddFile( "materials/vgui/entities/npc_lucario.vtf" )
	resource.AddFile( "materials/vgui/entities/npc_lucario_evil.vmt" )
	resource.AddFile( "materials/vgui/entities/npc_lucario_evil.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_l.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_l.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/eyeball_r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/flat2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioarmleg.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioarmleg.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucariobody.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucariobody.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioeyeiris2r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioface.vmt" )
	resource.AddFile( "materials/models/smashbros/lucariocolor/lucarioface.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_l.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_l.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/eyeball_r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/flat2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioarmleg.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioarmleg.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucariobody.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucariobody.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2r.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioeyeiris2r.vtf" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioface.vmt" )
	resource.AddFile( "materials/models/smashbros/lucario/lucarioface.vtf" )
end

Swap ** to /

like this ?/???



if (SERVER) then 
player_manager.AddValidModel( "lucario", "models/smashbros/lucario_player" )
AddCSLuaFile( "poop.lua" )
end


ITEM.Name = 'lucario'
ITEM.Price = 1000
ITEM.Model = 'models/smashbros/lucario_player/lucario_player.mdl'

[editline]30th May 2014[/editline]

it works!!! TY TY TY TY

[editline]30th May 2014[/editline]

it doesnt show me singing my crowbar tho :frowning: . but i cant have everything.

[editline]30th May 2014[/editline]

i just added a pedobear model. now that i know how to its really fast

[editline]30th May 2014[/editline]

any way
this is solved so i will now close thread

[editline]30th May 2014[/editline]

i dont know how to close