• How do i send network from ULX Custom Command
    9 replies, posted
This is for my ALT PREVENTION System trying to add the function to work with ULX Administration mod. but i have no idea how. my target is to send the network string to target_ply() which is selected in the ulx menu local CATEGORY_NAME = "ABE Administration" function ulx.abeadd(calling_ply , target_ply) net.Start("abe_ulx_markuser") net.WriteBool(true) net.Send( target_ply:Entity(0) ) --ulx.fancyLogAdmins (calling_ply, true, "#A blacklisted #T", target_ply) end local abeadd = ulx.command( CATEGORY_NAME, "ulx abeadd", ulx.abeadd, "!abeadd", true) abeadd:addParam{ type = ULib.cmds.PlayerArg } abeadd:defaultAccess( ULib.ACCESS_ADMIN ) abeadd:help( "Adds player to alt blacklist, will ban player and their alts" )
for i=1, #target_plys do local v = target_plys[ i ] net.Start("abe_ulx_markuser") net.WriteBool(true) net.Send(v) end
[ERROR] addons/ulx_557962280/lua/ulx/modules/sh/abeadd.lua:11: attempt to get length of global 'target_plys' (a nil value)
rename target_plys to target_ply
[ERROR] addons/ulx_557962280/lua/ulx/modules/sh/abeadd.lua:11: attempt to get length of local 'target_ply' (a userdata value)
net.Start("abe_ulx_markuser") net.WriteBool(true) net.Send( target_ply )
nope does not work
change type to type=ULib.cmds.PlayersArg
@Neat How did you get it working? You picked my response as the answer, yet you said that it didn't work.
Your answer was the closest to the answer the command went through without errors yet did not get picked up by the user
Sorry, you need to Log In to post a reply to this thread.