help with respawn commend

hi i have code for respawn commend and its say that i dont have accses to the commend

code :


function ulx.spawn( calling_ply, target_plys )
	local affected_plys = {}
	for k,v in pairs(target_plys) do 
		if !v:Alive() then 
			v:Spawn()
			table.insert(affected_plys, v)
		end 
	end 
	ulx.fancyLogAdmin( calling_ply, "#A spawned #T", affected_plys )
end
local spawn = ulx.command( Utility, "ulx spawn", ulx.spawn, "!spawn" )
spawn:addParam{ type=ULib.cmds.PlayersArg }
spawn:defaultAccess( ULib.ACCESS_ADMIN )
spawn:help( "Spawnd target(s)." )

iv put the file in \garrysmod\addons\ulx\lua\ulx\modules\sh
how can i fix it ?



spawn:defaultAccess( ULib.ACCESS_ADMIN )


Try changing that

yea but for what ? maybe the names of the groups ?

To ULib.ACCESS_ALL?

try it and still didint work D:

Are you getting any errors? Looking at your code you seem to have forgotten to surround ‘Utility’ in quotes, so that may be breaking something.

Why don’t you just make a new custom folder and autorun / lua / init.lua and use PlayerSay or OnPlayerChat function/hook? It is way easier…

Probably because he wants to use the features of ULX commands, e.g. permissions.