Jump to content

Quisiera bindear un comando para un teleport ?


djantony

Recommended Posts

 
matchmarker = createMarker(2510.401, -2866.36344.369"cylinder"2.5



 
local favelaPos = {
  {3308.538, -1852.67536.98},
  {3249.941, -1830.95937.088},
  {3235.886, -1855.5237.081},
  {3233.154, -1906.03136.05},
  {3321.249, -1905.91236.222},
  {3254.726, -1884.03933.667},
  {3245.802, -1881.80337.347},
  {3269.945, -1870.98236.98}
  }
 
function info (thePlayer)
  exports["a_infobox"]:addBox(thePlayer, "info""Para entrar al PVP con mp4 usa el comando /pvp")
end
addEventHandler("onMarkerHit", matchmarker, info)
 
function start (thePlayer)
 local x, y, z = getElementPosition(thePlayer)
 local spawn = math.random(1)
 local rnd = math.random1, #favelaPos )
 if getPlayerMoney (thePlayer) >=0 then
  if (getDistanceBetweenPoints3D(x, y, z, 2510.401, -2866.36344.369)) < 5 then
    if spawn == 1 then
      exports.TDMinfobox:showBox("Entrastes ala Zona PVP de MP4""info", thePlayer); 
    setElementInterior(thePlayer, 0)
    setElementPosition(thePlayer, favelaPos[rnd][1], favelaPos[rnd][2], favelaPos[rnd][3], favelaPos[rnd][4] )
    takePlayerMoney(thePlayer, 0)
    giveWeapon(thePlayer, 311000)
    setElementHealth ( thePlayer, 100 )
    
    
    end 
  else
    exports["a_infobox"]:addBox(thePlayer, "error""Estas lejos del market")
  end
 else
      outputChatBox(" No tienes suficiente dinero", thePlayer, 0255255)
 end
end
addCommandHandler("pvp", start)  


 
addCommandHandler'salir',
  functionthePlayer )
    setElementInterior(thePlayer, 0)
    setElementPosition(thePlayer, 2525.195, -2861.17945.369
    takeWeapon( thePlayer, 31 )
  end
)

 
Link to comment
function info (thePlayer)
  bindKey(thePlayer,"f3","down","pvp")
  exports["a_infobox"]:addBox(thePlayer, "info", "Para entrar al PVP con mp4 usa el comando /pvp o presiona la tecla f3")
end
addEventHandler("onMarkerHit", matchmarker, info)

 

Edited by _SAXI_
Link to comment
On 17/09/2021 at 12:16, _SAXI_ said:
function info (thePlayer)
  bindKey(thePlayer,"f3","down","pvp")
  exports["a_infobox"]:addBox(thePlayer, "info", "Para entrar al PVP con mp4 usa el comando /pvp o presiona la tecla f3")
end
addEventHandler("onMarkerHit", matchmarker, info)

 

Muchas gracias ❤️

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...