Right I Want to make my own custom commands for ulx but when i do it it's not working like this
local CATEGORY_NAME = "Private Stuff"
function ulx.respawn( calling_ply, target_ply )
if not target _ply:Alive() then
target_ply:Spawn()
ulx.fancyLogAdmin( calling_ply, true, "#A respawned #T", target_ply
end
end
local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx respawn,
"!respawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Respawns a player" )
Am i doing something wrong, if you guys know what's the problem plz send me a message
any error messages?
[QUOTE=Xaotic;46013716]any error messages?[/QUOTE]
Theres no error messages i go into notepad ++ when i have the gmod lua text highlighter and i use it but when i save it i restart my server but theres still the default commands
[code]function ulx.respawn( calling_ply, target_plys, should_silent )
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, should_silent ,"#A respawned #T!", affected_plys )
end
local respawn = ulx.command( "Utility", "ulx respawn", ulx.respawn, "!respawn")
respawn:addParam{ type=ULib.cmds.PlayersArg }
respawn:addParam{ type=ULib.cmds.BoolArg, invisible=true }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:setOpposite( "ulx srespawn", {_, _, true}, "!srespawn", true )
respawn:help( "Respawns <target(s)>." )[/code]
[QUOTE=stapler2025;46014277][code]function ulx.respawn( calling_ply, target_plys, should_silent )
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, should_silent ,"#A respawned #T!", affected_plys )
end
local respawn = ulx.command( "Utility", "ulx respawn", ulx.respawn, "!respawn")
respawn:addParam{ type=ULib.cmds.PlayersArg }
respawn:addParam{ type=ULib.cmds.BoolArg, invisible=true }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:setOpposite( "ulx srespawn", {_, _, true}, "!srespawn", true )
respawn:help( "Respawns <target(s)>." )[/code][/QUOTE]
cheers helped me alot thnx
Sorry, you need to Log In to post a reply to this thread.