-
Posts
1,102 -
Joined
Everything posted by Enargy,
-
You gotta use triggerClientEvent
-
local neonEl = getElementData(vehicle, "neon") local neonElNs = getElementData(neonEl, "neon") destroyElement(neonElNs[1]) What's this?
-
No te van a dar soporte para este tema.
-
[APORTE] Export para iniciar - parar - reiniciar resources
Enargy, replied to Jakepankeke's topic in Recursos y aportes
Sinceramente no veo como este código es de utilidad porque ya existen; restartResource, stopResource, startResource. Puedes hacer algo con tu imaginación, se creativo o improvisa algo. Buen trabajo. -
'nemesis' no tiene ningún valor.
-
function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end convertNumber(getPlayerMoney(client))
-
Debes bindear la función de abrir el panel en el lado del server.
-
El Freeroam no es un gamemode, digamos que es como una herramienta que utiliza el 'Play'(Lo que es el gamemode) para su funcionalidad. Puedes usar el mismo source del freeroam para lo del warp. En el archivo fr_client mas abajo esta la opción de los botones: borra todos los atributos exceptuando el Warp.
-
Should work...
-
1. setGameSpeed 2. getElementRotation, math.cos, math.sin, math.rad, toggleControl. 3. En el map editor hay una opcion en las definiciones edf una llamada spawnpoint. Luego en el resource zombies cambias el valor Stream method(creo que se llamaba asi) y lo cambias al 1 que viene por defecto en 0. 4. Obviamente si tienes mas de 30 timers corriendo dara lag.
-
Prueba con este codigo que postee dias atras. function getVehiclesInWater() local vehiclesInWater = {} for _, vehicle in ipairs(getElementsByType("vehicle")) do if isElementInWater(vehicle) then table.insert(vehiclesInWater, vehicle ) end end return vehiclesInWater end setTimer( function() for i, vehicle in pairs(getVehiclesInWater()) do respawnVehicle(vehicle) setElementPosition(vehicle, x,y,z) end end, 600*1000, 0) -- Cada 10 Minutos la funcion se inicia. x,y,z seran las coordenadas asignadas al momento de que regreses el valor del elementData.
-
Crea el texto en serverside y luego lo destruyes al terminar de cargar el client.
-
Eso lo que hace es que se repita, porque el fuego no dura mucho tiempo. Obviamente es eso. Al morir el timer sigue corriendo. Usa isPedDead antes de poner al elemento en llamas y en ese caso regresas la funcion a false. if isPedDead(thePlayer) then return false end ó puedes usar killTimer en lugar de regresar la funcion a nula.
-
A mi me ha pasado que cuando muero incendiado derrepente me prendo otra vez .
-
Debe ser que al hacer spawn y otra persona aparece en tu mismo punto de aparición, el fuego antes apagarse se propaga al estar cerca de alguien y ambos se queman. Si eso pasa en lugar de usar onPlayerSpawn usas onPlayerWasted; sino pues no entiendo.
-
Esa funcion no existe. @Aldaire usa getEventHandlers y usas el ejemplo que te brinda el source.
-
addEventHandler("onPlayerSpawn", root, function() if isPedOnFire(source) then return setPedOnFire(source, false) end end)
-
[ZONE GAMING] Metal Gear Solid - Proyecto Oficial
Enargy, replied to Noiz3's topic in Servidores en donde jugar
Parece prometedor. Buena suerte. -
Listo! (Hace dias que lo está pero con los estudios no me queda tiempo libre) PD:Muchas gracias enargy, y porcierto.. ¿te importaria que te pusiese en la zona de agradecimientos de los créditos del server? function agua() for i,veh in ipairs(getElementsByType("vehicle")) do if isElementInWater(veh) then local col = getElementData(veh,"parent") local id = getElementData(col,"spawn")[1] local x = getElementData(col,"spawn")[2] local y = getElementData(col,"spawn")[3] local z = getElementData(col,"spawn")[4] local xveh,yveh,zveh = getElementPosition(veh) if not (getVehicleType(id) == "Boat") then setElementPosition(veh,x,y,z+1) setElementRotation(veh,0,0,0) local tires,engine,bateria,part,rotor,ggasolina,cusuario,maxslots,spawns,nombre,max_fuel = getVehicleAddonInfos (getElementModel(veh)) setElementData(col,"Rueda_inVehicle",math.random(0,tires)) setElementData(col,"Motor_inVehicle",math.random(0,engine)) setElementData(col,"Bateria_inVehicle",math.random(0,bateria)) setElementData(col,"Deposito_inVehicle",math.random(0,part)) setElementData(col,"Rotor_inVehicle",math.random(0,rotor)) fixVehicle(veh) end end end end Si tu quieres pues no hay problemas. Aunque no es necesario
-
Oshtia tío que valerosho. Deberiais de hasher tambien chaval que pueda el majo interactuar con armas. E.g: al escribirle "quiero que mates a rodrigo" y el ped le dispare a rodrigo. Esho si estarias chulo chaval. PD: No entiendo porque los españoles hablan mordiendoce la lengua.
-
IsCursorOnElement isMouseInPosition
-
local myped = exports.slothbot:spawnBot ( -377.888671875, 2184.87109375, 42.431251525879, 0, ( 226 ), 0, 0, akatsuki, 4, "fire", true ) setTimer ( createElement, 5100, 1, myped ) ¿?
-
Yo use el index para poder identificarlos y no confundirme, pero en la misma tabla agregas otra columna que te indique el nombre local peds = { {"Enargy", 201, x, y, z, 0}, {}, } local mensajes = { "Hola", "Buenas tardes", "Buenas", "Oli", "EQUISDE" } function creacionPeds ( ) for k, v in ipairs ( peds ) do local skin = v[1] local name, x, y, z, rz = v[1], v[2], v[3], v[4], v[5] if ( skin and x and y and z and rz ) then ped = createPed ( skin, x, y, z, rz ) setElementData(ped,"name", tostring(name)) outputDebugString ( "[interaccion] Peds creados satisfactoriamente." ) else outputDebugString ( "[interaccion] No has colocado los datos de creación de PEDS bien." ) end end end addEventHandler ( "onResourceStart", getRootElement(), creacionPeds ) function sendMessageToNearbyPlayers( message, messageType ) if messageType == 0 then for index, ped in ipairs(getElementsByType ( "ped" )) do if ped and getElementType(ped) == "ped" then local x, y, z = getElementPosition ( source ) local x1, y1, z1 = getElementPosition ( ped ) local distance = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) local name = getElementData(ped, "name") or "N/A" if distance < 1 then for _, txt in ipairs(mensajes) do if string.find ( message, txt ) then outputChatBox ( name.." dice: Hola buenas tardes, ¿En qué le puedo ayudar?", source, 255, 255, 255 ) end end end end end end end -- attach our new chat handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers )
-
Tu script estaba del todo mal, intentabas conseguir la posición de una tabla y extraer un valor que no existe' peds' y es ped . Ya funciona -- Tabla de los peds -- Se usa [skin] [x] [y] [z] [rotacion x] [rotacion y] [rotacion z] local peds = { {201, x, y, z, 0}, {}, } local mensajes = { "Hola", "Buenas tardes", "Buenas", "Oli", "EQUISDE" } function creacionPeds ( ) for k, v in ipairs ( peds ) do local skin = v[1] local x, y, z, rz = v[2], v[3], v[4], v[5] if ( skin and x and y and z and rz ) then createPed ( skin, x, y, z, rz ) outputDebugString ( "[interaccion] Peds creados satisfactoriamente." ) else outputDebugString ( "[interaccion] No has colocado los datos de creación de PEDS bien." ) end end end addEventHandler ( "onResourceStart", getRootElement(), creacionPeds ) function sendMessageToNearbyPlayers( message, messageType ) if messageType == 0 then for index, ped in ipairs(getElementsByType ( "ped" )) do if ped and getElementType(ped) == "ped" then local x, y, z = getElementPosition ( source ) local x1, y1, z1 = getElementPosition ( ped ) local distance = getDistanceBetweenPoints3D ( x, y, z, x1, y1, z1 ) if distance < 1 then for _, txt in ipairs(mensajes) do if string.find ( message, txt ) then outputChatBox ( "Ped#"..index.." dice: Hola buenas tardes, ¿En qué le puedo ayudar?", source, 255, 255, 255 ) end end end end end end end -- attach our new chat handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers )
-
ped = createPed ( skin, x, y, z, rot ) El ped se esta creando con la misma variable, intenta poder diferenciarla con otra. Puedes usar el indice de la tabla que te ofrece el loop para diferenciar la variable. ped = {} function creacionPeds ( ) for k, v in ipairs ( peds ) do local skin = v[1] local x, y, z = v[2], v[3], v[4] local rot = v[5] if skin and x and y and z and rot then ped[k] = createPed ( skin, x, y, z, rot ) setElementFrozen ( ped[k], true ) -- Crea un radio alrededor del ped que al estar el jugador dentro, es decir, cerca de él, te responde. radio = createColSphere ( x, y, z, 1 ) outputDebugString ( "[interaccion] Peds creados satisfactoriamente." ) else outputDebugString ( "[interaccion] No has colocado los datos de creación de PEDS bien." ) end end end addEventHandler ( "onResourceStart", getRootElement(), creacionPeds )
