djantony Posted September 15, 2021 Share Posted September 15, 2021 matchmarker = createMarker(2510.401, -2866.363, 44.369, "cylinder", 2.5) local favelaPos = { {3308.538, -1852.675, 36.98}, {3249.941, -1830.959, 37.088}, {3235.886, -1855.52, 37.081}, {3233.154, -1906.031, 36.05}, {3321.249, -1905.912, 36.222}, {3254.726, -1884.039, 33.667}, {3245.802, -1881.803, 37.347}, {3269.945, -1870.982, 36.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.random( 1, #favelaPos ) if getPlayerMoney (thePlayer) >=0 then if (getDistanceBetweenPoints3D(x, y, z, 2510.401, -2866.363, 44.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, 31, 1000) setElementHealth ( thePlayer, 100 ) end else exports["a_infobox"]:addBox(thePlayer, "error", "Estas lejos del market") end else outputChatBox(" No tienes suficiente dinero", thePlayer, 0, 255, 255) end end addCommandHandler("pvp", start) addCommandHandler( 'salir', function( thePlayer ) setElementInterior(thePlayer, 0) setElementPosition(thePlayer, 2525.195, -2861.179, 45.369) takeWeapon( thePlayer, 31 ) end ) Link to comment
Moderators Vinyard Posted September 15, 2021 Moderators Share Posted September 15, 2021 Hi, your thread has been moved to a more language-specific section so that you can get better help in your native language. Link to comment
_SAXI_ Posted September 17, 2021 Share Posted September 17, 2021 (edited) 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 September 17, 2021 by _SAXI_ Link to comment
ғɪʟɪғ Posted September 17, 2021 Share Posted September 17, 2021 Hola! Buen dia Esto te puede ayudar : https://wiki.multitheftauto.com/wiki/BindKey Link to comment
djantony Posted September 22, 2021 Author Share Posted September 22, 2021 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now