Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: $VDFOREVER on July 27, 2020, 08:24:14 AM

Title: help ulx, lua
Post by: $VDFOREVER on July 27, 2020, 08:24:14 AM
Help in lua, I'm a complete zero, I need to move there when I execute (sorry google translate)
Code: Lua
  1. local CATEGORY_NAME = "admin"
  2.  
  3. function ulx.adminzone(ply)
  4.  
  5.                                 local str = "#A tp admin zone"
  6.                                 ulx.fancyLogAdmin(ply, str)                    
  7.         end
  8.  
  9. local adminzone = ulx.command(CATEGORY_NAME, "ulx az", ulx.adminzone, "!az")
  10. adminzone:defaultAccess( ULib.ACCESS_ADMIN )
  11. adminzone:help( "tp admin zone" )
  12.  
  13.  
  14.  
  15. function adminzone(ply)
  16.  
  17.         ply:SetPos(Vector(-1244.353638, 1044.383301, 80.597824)) -- admin zone position
  18. end
Title: Re: help ulx, lua
Post by: MrPresident on July 29, 2020, 05:51:21 PM
Code: Lua
  1. local CATEGORY_NAME = "admin"
  2.  
  3. function ulx.adminzone(ply)
  4.         local str = "#A tp admin zone"
  5.         ulx.fancyLogAdmin(ply, str)
  6.         adminzone( ply )       
  7. end
  8. local adminzone = ulx.command(CATEGORY_NAME, "ulx az", ulx.adminzone, "!az")
  9. adminzone:defaultAccess( ULib.ACCESS_ADMIN )
  10. adminzone:help( "tp admin zone" )
  11.  
  12.  
  13.  
  14. function adminzone( ply )
  15.         ply:SetPos(Vector(-1244.353638, 1044.383301, 80.597824)) -- admin zone position
  16. end
  17.  
Title: Re: help ulx, lua
Post by: MrPresident on July 29, 2020, 05:52:07 PM
You were close. You just needed to call that function you created to teleport the player.