[CODE]for _,v in pairs(ents.GetAll()) do
if IsValid(v) then
if v:IsPlayer() then
strMapIcon = "gui/player" -- I dont have any alternative
end
if v:IsSuperAdmin() then
strMapIcon = "gui/admin" -- I dont have any alternative
end[/CODE]
[CODE][ERROR] gamemodes/underdone/gamemode/core/clientfiles/cl_hud_minimap.lua:31: attempt to call method 'IsSuperAdmin' (a nil value)
1. v - gamemodes/underdone/gamemode/core/clientfiles/cl_hud_minimap.lua:31
2. unknown - lua/includes/modules/hook.lua:84
[/CODE]
Try something like
[CODE]
if IsValid(v) then
if v:IsPlayer() then
if v:IsSuperAdmin() then
strMapIcon = "gui/admin"
else
strMapIcon = "gui/player"
end
end
end[/CODE]
[QUOTE=lorp;52858436]Try something like
[CODE]
if IsValid(v) then
if v:IsPlayer() then
if v:IsSuperAdmin() then
strMapIcon = "gui/admin"
else
strMapIcon = "gui/player"
end
end
end[/CODE][/QUOTE]
Work tys.
Sorry, you need to Log In to post a reply to this thread.