We have been trying all day to get models to work in point shop but we keep getting lua errors
Here is the code that we are trying to use
ITEM.Name = 'Grim Reaper'
ITEM.Price = 2500
ITEM.Model = 'models/player/rimreaper/grim.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
if (SERVER) then
player_manager.AddValidModel( "Grim Reaper", "models/player/rimreaper/grim.mdl" )
AddCSLuaFile( "CallThisAnything.lua" )
end
list.Set( "PlayerOptionsModel", "Grim Reaper", "models/player/rimreaper/grim.mdl" )
--// File Generated By Fox-Warrior's Resources Generator Version 2.06 \\--
if (SERVER) then
resource.AddFile( "models/grim.mdl" )
resource.AddFile( "materials/VGUI/entities/npc_grim.vmt" )
resource.AddFile( "materials/VGUI/entities/npc_grim.vtf" )
resource.AddFile( "materials/models/grim/grimbody.vmt" )
resource.AddFile( "materials/models/grim/grimbody.vtf" )
resource.AddFile( "materials/models/grim/grim_normal.vtf" )
resource.AddFile( "materials/models/grim/mouth.vmt" )
resource.AddFile( "materials/models/grim/mouth.vtf" )
resource.AddFile( "materials/models/grim/mouth_normal.vtf" )
resource.AddFile( "materials/models/grim/skelface.vmt" )
resource.AddFile( "materials/models/grim/skelface.vtf" )
resource.AddFile( "materials/models/grim/skelface2.vmt" )
resource.AddFile( "materials/models/grim/skelface2.vtf" )
resource.AddFile( "materials/models/grim/skelface2_normal.vtf" )
resource.AddFile( "materials/models/grim/skelface_normal.vtf" )
resource.AddFile( "materials/models/grim/stimer.vmt" )
resource.AddFile( "materials/models/grim/stimer.vtf" )
resource.AddFile( "materials/models/grim/sythe.vmt" )
resource.AddFile( "materials/models/grim/sythe.vtf" )
resource.AddFile( "materials/models/grim/sythe_mask.vtf" )
end
You should always post your error logs...
Also put the resources code into the resources file
garrysmod/lua/autorun/server/resources.lua
We are currently using Elpishost, How would i find the error logs ?
[editline]18th January 2014[/editline]
Nevermind i found them
Dankey Kang|2|STEAM_0:0:23674596
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
Dankey Kang|2|STEAM_0:0:23674596
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
Dankey Kang|3|STEAM_0:0:23674596
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
Dankey Kang|3|STEAM_0:0:23674596
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
TastelessExile|4|STEAM_0:0:18927147
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
TastelessExile|4|STEAM_0:0:18927147
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
Dankey Kang|5|STEAM_0:0:23674596
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
Dankey Kang|5|STEAM_0:0:23674596
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
Dankey Kang|6|STEAM_0:0:23674596
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
Dankey Kang|6|STEAM_0:0:23674596
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
TastelessExile|7|STEAM_0:0:18927147
Couldn't include file 'includes\modules\glon.lua' (File not found) (@addons/beta/lua/autorun/client/ev_autorun.lua (line 9))
TastelessExile|7|STEAM_0:0:18927147
[ERROR] addons/beta/lua/autorun/client/ev_autorun.lua:9: Module not found!
1. require - [C]:-1
2. unknown - addons/beta/lua/autorun/client/ev_autorun.lua:9
trim it down to just this:
[code]
ITEM.Name = 'Grim Reaper'
ITEM.Price = 2500
ITEM.Model = 'models/player/rimreaper/grim.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
[/code]
it'd be that playermanager.addmodel shit thats causing it to spaz out, pointshop isnt supposed to handle that kind of stuff (plus what it does is add the model to c menu which will kind of defeat the point of buying it)
edit: if that grim reaper model is on workshop somewhere use resource.AddWorkShop to link to it, resource.addfile is for fastdl and will only work if you actually have fastdl set up (plus fastdl is a worthless glitchy piece of shit)
that line would go into pointshop/lua/autorun/downloads.lua, create it if it doesnt exist
I tried that but before all we got was a big f*ck you sign (ERROR sign)
[QUOTE=jkarjy;43580398]I tried that but before all we got was a big f*ck you sign (ERROR sign)[/QUOTE]
that would be because the pointshop code is functioning correctly but your model wasn't downloading to clients so all they see is an error when they equip it, see above
Well i did something i dont really know what i did but it worked
Of course it worked why wouldnt it?
Ima genius
Sorry, you need to Log In to post a reply to this thread.