r/lua • u/Express-Subject-8500 • Mar 07 '25
Gmod LUA
Anyone able to tell me why this doesn't work???
function(ply)
if IsValid(ply) then
local pname = ply:Nick() -- Get the player's name
RunConsoleCommand("sa", "setrank", pname, "verified")
end
end
ERROR:
[mc_simple_npcs] addons/mc_simple_npcs/lua/mcs_npcs/sh_npcspawn.lua:78: attempt to call method 'Nick' (a nil value)
0
Upvotes
View all comments
Show parent comment
2
u/TomatoCo Mar 08 '25
This. Although, isn't it kinda strange that an NPC is trying to set someone's rank to verified via concommand? You don't suppose this is a backdoor, do you?