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
Serene Posted December 10, 2021 Share Posted December 10, 2021 Hola, use este código para Transportarse mediante comando: local tele= { {0, 0, 15} } function teleT(thePlayer, command) local pos= math.random(#tele) local car = getPedOccupiedVehicle(thePlayer) if (car) then setElementPosition(car, unpack (tele[pos])) else setElementPosition(thePlayer, unpack (tele[pos])) end end --end addCommandHandler("pvp", teleT) 1 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