
#Dv^
Members-
Content Count
451 -
Joined
-
Last visited
-
Verifica que los módulos sean del tipo .sha. Utiliza estos módulos con compatibilidad Linux: https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL
-
No es necesario que crees un colshape para obtener a los jugadores dentro del él. Puedes usar getDistanceBetweenPoints3D para calcular la distancia y poner una condicional con ello. En el evento onPlayerChat, si miras su primer ejemplo puedes observar como está estructurado así, con lo mismo que buscas..., a excepción de que quieres poner la cuenta de la persona de quien manda el mensaje. Te recomendaría poner una condicional o "or" respecto a getAccountName, debido a que te puede retorna false si el jugador tiene una cuenta invitado. Lo mismo con getPlayerTeam, podría darte error si
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=15958
-
Martin786843 started following #Dv^
-
Si sigues en la búsqueda, contáctame al privado.
-
La useful getPointFromDistanceRotation te puede ayudar a este problema, mira su ejemplo. -- Uselful function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(90 - angle); local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end -- Server-side addCommandHandler("explosion", function (player) local x,y,z = getElementPosition(player); for i=1, 8 do local newX, newY = getPointFromDistanceRotation(x, y, 2, 360 * (i/8)); createExplosion(newX, newY, z, 0, player) end end );
-
Postea el código, así podremos ayudarte.
-
https://wiki.multitheftauto.com/wiki/SetDevelopmentMode
-
marker_1 = createMarker() marker_2 = createMarker() marker_3 = createMarker() marker_4 = createMarker() marker_5 = createMarker() addEventHandler("onMarkerHit", root, function(hit, dim) if source == marker_1 then -- código elseif source == marker_2 then -- código elseif source == marker_3 then -- código elseif source == marker_4 then -- código elseif source == marker_5 then -- código end end ) Así lo quieres.
-
local Down_up1 = createMarker(0, -3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) local Up_Down1 = createMarker(0, 3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) function Up (source ) local x, y, z = getElementPosition(source) setElementPosition ( source, 0, 3400, z) end function Down (source ) local x, y, z = getElementPosition(source) setElementPosition ( source, 0, -3400, z) end addEventHandler( "onMarkerHit", Down_up1, Up ) addEventHandler( "onMarkerHit", Up_Down1, Down ) Prueba así.
-
#Dv^ started following JOB Client-side
-
#Dv^ started following [AYUDA] Objeto enfrente del jugador. and [REL] Custom GUI Widget System
-
Depende de que manera quieras insertar al jugador en una tabla. local _table = {} addEventHandler("onPlayerJoin", root, -- al ingresar, se insertará en la tabla. function() _table[source] = true end ) addEventHandler("onPlayerLogin", root, function() if _table[source] then -- si está en la tabla, devolverá la siguiente afirmación. return print("El jugador ya se encuentra en la tabla.") end _table[source] = true -- de lo contrario, si no está en la tabla se insertará. end ) addEventHandler("onPlayerLogout", root, -- opcional.
-
[AYUDA] Objeto enfrente del jugador.
#Dv^ replied to KaMi's topic in Ayuda relacionada al cliente/servidor
x = x - math.sin (math.rad (rx)) * 1 y = y + math.cos (math.rad (rx)) * 1 createObject ( 3260, x, y, z, 0, 90, rx ) addCommandHandler("tabla", function (source) local x,y,z = getElementPosition(source) local rx = getElementRotation(source) x = x - math.sin (math.rad (rx)) * 1 y = y + math.cos (math.rad (rx)) * 1 setPedAnimation( source, "knife", "knife_part") setPedWeaponSlot ( source, 10 ) setTimer ( function() createObject ( 3260, x, y, z, 0, 90, rx ) setPedAnimation( source, false) e