• Running commands with rcon
    4 replies, posted
I want to run a consolecommand that I made in init.lua , I don't want everyone being able to use this command - only the rcon. How would I do it? I got if not ply:IsSuperAdmin() then return end and that works but the console can't do it.
[lua]if !IsValid(ply) then[/lua] The player object is null when it's ran by the console.
Thanks. [editline]21st December 2012[/editline] how come my CreateClientConVar commands that are in init.lua don't work by the normal console, only rcon? I didn't use any !isValid(ply) ?
[QUOTE=tyguy;38928124]how come my Create[B][U]Client[/U][/B]ConVar commands that are in init.lua don't work by the normal console, only rcon? I didn't use any !isValid(ply) ?[/QUOTE]
So that happens because it's in init.lua and it's creating from the client (in this case, is rcon?)
Sorry, you need to Log In to post a reply to this thread.