Ulysses Stuff > Suggestions
jail tp to coördinates
ULXGmodFan:
Hello,
I love ulx, especially with lots of plugins. Never have any trouble or miss stuff which I need for my sandbox building server. There is only 1 thing that's really missing for me and that's a jail tp command to preset coördinates. If your server runs on a map you sometimes have a jail included. I know some mods have it, but they're not half as good as ulx is. It can be simply done I think with a command for the sadmin ulx setjailposition or something. Or even jailposition1, jailposition2, jailpos3 and 4 so you can have 4 different cells or somehting. But that's not really needed for sandbox, but would definately be cool as an extra if it's not too much trouble. But a jailposition command would be super.
So I kindly would ask if it's possible to include it, it would be really really really awesome!
Thanks alot
Avoid:
Hello there,
eventhough this does not quite belong in the suggestions category, you can accomplish this task easily by yourself, take a look at jailtp:
--- Code: --- ------------------------------ Jail TP ------------------------------
function ulx.jailtp( calling_ply, target_ply, seconds )
local t = {}
t.start = calling_ply:GetPos() + Vector( 0, 0, 32 ) -- Move them up a bit so they can travel across the ground
t.endpos = calling_ply:GetPos() + calling_ply:EyeAngles():Forward() * 16384
t.filter = target_ply
if target_ply ~= calling_ply then
t.filter = { target_ply, calling_ply }
end
local tr = util.TraceEntity( t, target_ply )
local pos = tr.HitPos
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
elseif not jailableArea( pos ) then
ULib.tsayError( calling_ply, "That is not an area where a jail can be placed!", true )
return
else
if target_ply:InVehicle() then
target_ply:ExitVehicle()
end
target_ply:SetPos( pos )
target_ply:SetLocalVelocity( Vector( 0, 0, 0 ) ) -- Stop!
doJail( target_ply, seconds )
end
local str = "#A teleported and jailed #T"
if seconds > 0 then
str = str .. " for #i seconds"
end
ulx.fancyLogAdmin( calling_ply, str, target_ply, seconds )
end
local jailtp = ulx.command( CATEGORY_NAME, "ulx jailtp", ulx.jailtp, "!jailtp" )
jailtp:addParam{ type=ULib.cmds.PlayerArg }
jailtp:addParam{ type=ULib.cmds.NumArg, min=0, default=0, hint="seconds, 0 is forever", ULib.cmds.round, ULib.cmds.optional }
jailtp:defaultAccess( ULib.ACCESS_ADMIN )
jailtp:help( "Teleports, then jails target(s)." )
--- End code ---
Especially at those lines here:
--- Code: ---local pos = tr.HitPos
target_ply:SetPos( pos )
--- End code ---
Hope I pointed you in the right direction.
Avoid
ULXGmodFan:
I cant really do Code :-[ I figure I need to put the coördinates at the place where the 0,0,0 is?
But that way you can never change the position while playing. I think it would be handy to have as extra cmd. If a custom jail position isn't set the jail is at the current position as default :)
Neku:
You can have another command that stores the location in the data folder.
Then have jailtp send the target to the stored location .
ULXGmodFan:
--- Quote from: Neku on May 22, 2014, 09:41:00 PM ---You can have another command that stores the location in the data folder.
Then have jailtp send the target to the stored location .
--- End quote ---
Could you maybe provide me with steps? I really don't understand which file I should make and which extention etc. Thanks alot
Navigation
[0] Message Index
[#] Next page
Go to full version