Hi, I'm running a server on the map rp_downtown_v4c_v4 which has a large open area for admin sits, I made this basic ulx command that will teleport the admin that runs the command to the admin area with the person who made the report, I was just wondering if there is any way I can make it so that it will place the group of people randomly around the area so that if 2 admins start sits at the same time, they're not both placed in the same place in the admin sit area? Thanks for any help
function ulx.startsit( calling_ply, target_ply )
if ulx.getExclusive( target_ply, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( target_ply, calling_ply ), true )
return
elseif not target_ply:Alive() then
ULib.tsayError( calling_ply, target_ply:Nick() .. " is dead!", true )
return
else
if target_ply:InVehicle() then
target_ply:ExitVehicle()
end
target_ply:SetPos( Vector( 1249.226, -5828.228, -5828.228 ) )
target_ply:SetLocalVelocity( Vector( 0, 0, 0 ) )
calling_ply:SetPos( Vector( 1455.038, -5841.248, -134.968 ) )
calling_ply:SetLocalVelocity( Vector( 0, 0, 0 ) )
end
local str = "#A started an adminsit with #T"
ulx.fancyLogAdmin( calling_ply, str, target_ply, seconds )
end
local startsit = ulx.command( CATEGORY_NAME, "ulx startsit", ulx.startsit, "!startsit" )
startsit:addParam{ type=ULib.cmds.PlayerArg }
startsit:defaultAccess( ULib.ACCESS_ADMIN )
startsit:help( "Starts an adminsit and teleports all listed members to the adminzone." )
Edit: Also, I would like to be able to use the command to bring more than 1 person, but as far as I'm aware if I add more than 1 player name slot to the command I will have to fill every name slot every time (I didn't have time to check) So if anyone knows how to make it so there is an option to teleport multiple people that would be great.