This is my full code...
vector1 = 83.237251
vector2 = -414.578888
vector3 = -12223.580078
angle1 = 1.759990
angle2 = 150.339874
angle3 = 0.000000
local CATEGORY_NAME = "Teleport"
function ulx.sit( calling_ply, target_ply )
if not calling_ply:IsValid() then
Msg( "You are the console, you can't teleport or teleport others since you can't see the world!\n" )
return
end
if ulx.getExclusive( target_ply, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( target_ply, calling_ply ), true )
return
end
if not target_ply:Alive() then
ULib.tsayError( calling_ply, target_ply:Nick() .. " is dead!", true )
return
end
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 )
if target_ply:InVehicle() then
target_ply:ExitVehicle()
end
target_ply:SetPos( Vector( vector1, vector2, vector3 ) )
target_ply:SetPos( Angle( angle1, angle2, angle3 ) )
target_ply:SetLocalVelocity( Vector( 0, 0, 0 ) ) -- Stop!
ulx.fancyLogAdmin( calling_ply, "#A teleported #T to the sit", target_ply )
end
local sitc = ulx.command( CATEGORY_NAME, "ulx sit", ulx.sit, {"!sit", "!tps"} )
sitc:addParam{ type=ULib.cmds.PlayerArg, ULib.cmds.optional }
sitc:defaultAccess( ULib.ACCESS_ADMIN )
sitc:help( "Teleports target to a sit." )
The fancylog does not work!!!!!!!!! it does not say in the server #A teleported #T to the sit
HELP
Okay, well first off, I would never use "~" to declare "not", generally it's obsolete, and most people I would say do not know that actually means "not".
Secondly, ONCE AGAIN, what does "SIT" mean?
sitc:help( "Teleports target to a sit." )
Even my bachelor's degree in Language Arts doesn't even help me. This entire script doesn't make sense to me at all, it literally just looks like a different version of !jailtp.
SO PLEASE TELL US NOW: What does this actually do, what is it
supposed to do?! Yeah, we can read your code, and see what scriptly it is supposed to do, but to most of us it just looks like stuff written on a piece of paper. When you're requesting help, please, please, please,
please,
please, give some details of what its even supposed to do, so us people with imaginations can actually imagine it's initial goal.
So now that I'm done with my rant, as for your facnelogadmin thing not working. Try moving it all the way to the top like this:
vector1 = 83.237251
vector2 = -414.578888
vector3 = -12223.580078
angle1 = 1.759990
angle2 = 150.339874
angle3 = 0.000000
local CATEGORY_NAME = "Teleport"
function ulx.sit( calling_ply, target_ply )
ulx.fancyLogAdmin( calling_ply, "#A teleported #T to the sit", target_ply )
if not calling_ply:IsValid() then
Msg( "You are the console, you can't teleport or teleport others since you can't see the world!\n" )
return
end
if ulx.getExclusive( target_ply, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( target_ply, calling_ply ), true )
return
end
if not target_ply:Alive() then
ULib.tsayError( calling_ply, target_ply:Nick() .. " is dead!", true )
return
end
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 )
if target_ply:InVehicle() then
target_ply:ExitVehicle()
end
target_ply:SetPos( Vector( vector1, vector2, vector3 ) )
target_ply:SetPos( Angle( angle1, angle2, angle3 ) )
target_ply:SetLocalVelocity( Vector( 0, 0, 0 ) ) -- Stop!
end
local sitc = ulx.command( CATEGORY_NAME, "ulx sit", ulx.sit, {"!sit", "!tps"} )
sitc:addParam{ type=ULib.cmds.PlayerArg, ULib.cmds.optional }
sitc:defaultAccess( ULib.ACCESS_ADMIN )
sitc:help( "Teleports target to a sit." )
Obviously do not leave it at the top if you find out what the problem is, but put it on the top to make sure the entire code is actually be executed correctly. You have some return ends, meaning that it may not be getting past the return end. People who actually try to problem solve, usually use "print" (I use "MsgN" because I see no difference) to see if there code is being executed to the next line of code. So I'll suggest to you to do the same, but instead of putting "print", use fancylogadmin and use it as a test.