Alrighty so I've tried to implement a system where once you hit a ULX command it sends a concommand to whitelist a player. Instead of whitelisting the player it then spits this out from the console.
[CODE][ERROR] gamemodes/nutscript/gamemode/core/libs/sh_command.lua:23: attempt to call method 'IsUserGroup' (a nil value)
1. onCheckAccess - gamemodes/nutscript/gamemode/core/libs/sh_command.lua:23
2. onRun - gamemodes/nutscript/gamemode/core/libs/sh_command.lua:60
3. run - gamemodes/nutscript/gamemode/core/libs/sh_command.lua:145
4. parse - gamemodes/nutscript/gamemode/core/libs/sh_command.lua:180
5. unknown - gamemodes/nutscript/gamemode/core/libs/sh_command.lua:203
6. unknown - lua/includes/modules/concommand.lua:54[/CODE]
This is what I'm trying to run:
[CODE]local CATEGORY_NAME = "Whitelist"
function ulx.whitelistempiretrooper(calling_ply, target_ply)
RunConsoleCommand( "nut", "plywhitelist", target_ply, "empiretrooper" )
ulx.fancyLogAdmin( calling_ply, "#A whitelisted #T to Storm Trooper", target_ply )
end
local whitelistempiretrooper = ulx.command("Whitelist", "ulx whitelistempiretrooper", ulx.whitelistempiretrooper, "!wit")
whitelistempiretrooper:addParam{ type=ULib.cmds.PlayerArg }
whitelistempiretrooper:defaultAccess( ULib.ACCESS_SUPERADMIN )
whitelistempiretrooper:help( "Whitelists a player to Storm Trooper" )[/CODE]
Help would be highly appreciated!
You can't send a player entity into RunConsoleCommand; use their SteamID or name or whatever.
I changed it to a SteamID input and I still get the error.
It looks like you're using the old version of NutScript. Here's the link to the updated one: [url]https://github.com/rebel1324/NutScript[/url]
Sorry, you need to Log In to post a reply to this thread.