I tried one function I found on here but I got the errors below it. Anyone know a better way to do this or is this function like outdated or something?
[CODE]function GM:PlayerSetModel(ply)
local mdl = GAMEMODE.playermodel or "models/player/phoenix.mdl";
if ply:SteamID() == "" then
mdl = "models/player/Daedric.mdl";
end
util.PrecacheModel(mdl)
ply:SetModel(mdl)
end[/CODE]
[CODE][ERROR] addons/pointshop-master/lua/items/playermodels/zero.lua:1: attempt to index global 'umITEM' (a nil value)
1. unknown - addons/pointshop-master/lua/items/playermodels/zero.lua:1
2. include - [C]:-1
3. LoadItems - addons/pointshop-master/lua/sh_pointshop.lua:105
4. unknown - addons/pointshop-master/lua/autorun/pointshop.lua:35[/CODE]
[QUOTE=spocksgirl94;43686517]I tried one function I found on here but I got the errors below it. Anyone know a better way to do this or is this function like outdated or something?
[CODE]function GM:PlayerSetModel(ply)
local mdl = GAMEMODE.playermodel or "models/player/phoenix.mdl";
if ply:SteamID() == "" then
mdl = "models/player/Daedric.mdl";
end
util.PrecacheModel(mdl)
ply:SetModel(mdl)
end[/CODE]
[CODE][ERROR] addons/pointshop-master/lua/items/playermodels/zero.lua:1: attempt to index global 'umITEM' (a nil value)
1. unknown - addons/pointshop-master/lua/items/playermodels/zero.lua:1
2. include - [C]:-1
3. LoadItems - addons/pointshop-master/lua/sh_pointshop.lua:105
4. unknown - addons/pointshop-master/lua/autorun/pointshop.lua:35[/CODE][/QUOTE]
You didn't post the line with the error on it.
But it sounds like your ITEM.Name is umITEM.Name for some reason.
[QUOTE=spocksgirl94;43686517]
[CODE]function GM:PlayerSetModel(ply)
local mdl = GAMEMODE.playermodel or "models/player/phoenix.mdl";
if ply:SteamID() == "" then
mdl = "models/player/Daedric.mdl";
end
util.PrecacheModel(mdl)
ply:SetModel(mdl)
end[/CODE]
[/QUOTE]
That spacing :suicide:
You most likely misspelled something as Fortune said, show us the code where the error is
Line 1 shouldn't be umITEM it should be ITEM.
Sorry, you need to Log In to post a reply to this thread.