[This was an experiment to see what I could do - turns out I can’t do it] ^^
I’m very new to Lua, so obviously, this will have some obvious failures which I cannot spot (guess all of it D:)
I want to make it so admins can change their playermodel to a prop, I thought it would be pretty simple, I had a very quick go (using the Wiki for almost all of it) and I made a small piece of Lua. I also have no idea on how to make the command itself. - Also some reconstruction would be nice.
if ply:IsAdmin() then self.Entity:SetModel("models/props_c17/oildrum001.mdl") ply:ChatPrint("Player model changed!") else ply:ChatPrint("You are not an admin on this server!") end
I tried to in single player, and it comes up with no errors, however, I cannot check if it works. Any help would be welcome, tips etc would be very appreciated!
An explanation on what the code I put together actually does would also be appreciated.