Tomas
Members-
Posts
2,530 -
Joined
-
Last visited
Everything posted by Tomas
-
Postea el código donde haces el call
-
En la línea 49 y 51 te faltó cambiarlo, lo probaré en un rato.
-
(AYUDA) Necesito saber el nombre de este RESOURCE:
Tomas replied to Digore's topic in Recursos y aportes
¿No será el freeroam? -
De nada, hay varias formas tu decidiste esa ._.
-
Para hacer lo de abrir y cerrar puedes usar una función booleana.
-
No lo probaste y ya no funciona?
-
function kilLDayZPlayer(killer, headshot, weapon) pedCol = false local account = getPlayerAccount(source) if not account then return end killPed(source) triggerClientEvent(source, "hideInventoryManual", source) if getElementData(source, "alivetime") > 10 and not isElementInWater(source) then local x, y, z = getElementPosition(source) if getDistanceBetweenPoints3D(x, y, z, 6000, 6000, 0) > 200 then local x, y, z = getElementPosition(source) local rotX, rotY, rotZ = getElementRotation(source) local skin = getElementModel(source) local ped = createPed(skin, x, y, z, rotZ) pedCol = createColSphere(x, y, z, 1.5) killPed(ped) setTimer(destroyDeadPlayer, 2700000, 1, ped, pedCol) attachElements(pedCol, ped, 0, 0, 0) setElementData(pedCol, "parent", ped) setElementData(pedCol, "playername", getPlayerName(source)) setElementData(pedCol, "deadman", true) setElementData(pedCol, "MAX_Slots", getElementData(source, "MAX_Slots")) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol, "deadreason", getPlayerName(source) .. " is dead. Cause of death: " .. (weapon or "Unknown") .. ". Time of death: " .. hours .. ":" .. minutes .. " o'clock.") end end if killer then if not getElementData(source, "bandit") then addPlayerStats(killer, "humanity", math.random(-2500, -1000)) else addPlayerStats(killer, "humanity", math.random(1000, 2500)) end setElementData(killer, "murders", getElementData(killer, "murders") + 1) if 0 > getElementData(killer, "humanity") then setElementData(killer, "bandit", true) end if getElementData(source, "bandit") == true then setElementData(killer, "banditskilled", getElementData(killer, "banditskilled") + 1) end if headshot == true then setElementData(killer, "headshots", getElementData(killer, "headshots") + 1) end triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #00ffccwas killed by "..getPlayerName(killer).." #00ffccwith "..(weapon).. ".",0,22,255, "died") else triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #00FFFF was killed by nobody.",0,22,255, "died") end if pedCol then for i, data in ipairs(playerDataTable) do local plusData = getElementData(source, data[1]) if data[1] == "M1911 Mag" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "M9 SD Mag" then plusData = math.floor(getElementData(source, data[1]) / 15) elseif data[1] == "Desert Eagle Mag" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "PDW Mag" then plusData = math.floor(getElementData(source, data[1]) / 30) elseif data[1] == "MP5A5 Mag" then plusData = math.floor(getElementData(source, data[1]) / 20) elseif data[1] == "AK Mag" then plusData = math.floor(getElementData(source, data[1]) / 30) elseif data[1] == "M4 Mag" then plusData = math.floor(getElementData(source, data[1]) / 20) elseif data[1] == "CZ 550 Mag" then plusData = math.floor(getElementData(source, data[1]) / 5) elseif data[1] == "Lee Enfield Mag" then plusData = math.floor(getElementData(source, data[1]) / 10) elseif data[1] == "1866 Slug" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "M79 Launcher" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "2Rnd. Slug" then plusData = math.floor(getElementData(source, data[1]) / 2) end setElementData(pedCol, data[1], plusData) end local skinID = getElementData(source, "skin") local skin = getSkinNameFromID(skinID) setElementData(pedCol, skin, 1) local backpackSlots = getElementData(source, "MAX_Slots") if backpackSlots == 36 then setElementData(pedCol, "Assault Pack (ACU)", 1) elseif backpackSlots == 45 then setElementData(pedCol, "Alice Pack", 1) elseif backpackSlots == 75 then setElementData(pedCol, "Czech Backpack", 1) elseif backpackSlots == 125 then setElementData(pedCol, "Coyote Backpack", 1) elseif backpackSlots == 55 then setElementData(pedCol, "British Assault Pack", 1) elseif backpackSlots == 24 then setElementData(pedCol, "Patrol Pack", 1) elseif backpackSlots == 26 then setElementData(pedCol, "Vest Pouch Pack", 1) elseif backpackSlots == 16 then setElementData(pedCol, "Survival Pack (ACU)", 1) end end setTimer(setElementPosition, 500, 1, source, 6000, 6000, 0) triggerClientEvent(source, "onClientPlayerDeathInfo", source) setAccountData(account, "isDead", true) setElementData(source, "isDead", true) destroyElement(getElementData(source, "playerCol")) setTimer(spawnDayZPlayer, 5000, 1, source) end addEvent("kilLDayZPlayer", true) addEventHandler("kilLDayZPlayer", getRootElement(), kilLDayZPlayer) Probá con eso. Ese código podría ser muy optimizado.
-
Cambia el mensaje de la línea 49 function kilLDayZPlayer(killer, headshot, weapon) pedCol = false local account = getPlayerAccount(source) if not account then return end killPed(source) triggerClientEvent(source, "hideInventoryManual", source) if getElementData(source, "alivetime") > 10 and not isElementInWater(source) then local x, y, z = getElementPosition(source) if getDistanceBetweenPoints3D(x, y, z, 6000, 6000, 0) > 200 then local x, y, z = getElementPosition(source) local rotX, rotY, rotZ = getElementRotation(source) local skin = getElementModel(source) local ped = createPed(skin, x, y, z, rotZ) pedCol = createColSphere(x, y, z, 1.5) killPed(ped) setTimer(destroyDeadPlayer, 2700000, 1, ped, pedCol) attachElements(pedCol, ped, 0, 0, 0) setElementData(pedCol, "parent", ped) setElementData(pedCol, "playername", getPlayerName(source)) setElementData(pedCol, "deadman", true) setElementData(pedCol, "MAX_Slots", getElementData(source, "MAX_Slots")) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol, "deadreason", getPlayerName(source) .. " is dead. Cause of death: " .. (weapon or "Unknown") .. ". Time of death: " .. hours .. ":" .. minutes .. " o'clock.") end end if killer then if not getElementData(source, "bandit") then addPlayerStats(killer, "humanity", math.random(-2500, -1000)) else addPlayerStats(killer, "humanity", math.random(1000, 2500)) end setElementData(killer, "murders", getElementData(killer, "murders") + 1) if 0 > getElementData(killer, "humanity") then setElementData(killer, "bandit", true) end if getElementData(source, "bandit") == true then setElementData(killer, "banditskilled", getElementData(killer, "banditskilled") + 1) end if headshot == true then setElementData(killer, "headshots", getElementData(killer, "headshots") + 1) end else triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #FFFFFF was killed by nobody.",0,22,255, "died") end if pedCol then for i, data in ipairs(playerDataTable) do local plusData = getElementData(source, data[1]) if data[1] == "M1911 Mag" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "M9 SD Mag" then plusData = math.floor(getElementData(source, data[1]) / 15) elseif data[1] == "Desert Eagle Mag" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "PDW Mag" then plusData = math.floor(getElementData(source, data[1]) / 30) elseif data[1] == "MP5A5 Mag" then plusData = math.floor(getElementData(source, data[1]) / 20) elseif data[1] == "AK Mag" then plusData = math.floor(getElementData(source, data[1]) / 30) elseif data[1] == "M4 Mag" then plusData = math.floor(getElementData(source, data[1]) / 20) elseif data[1] == "CZ 550 Mag" then plusData = math.floor(getElementData(source, data[1]) / 5) elseif data[1] == "Lee Enfield Mag" then plusData = math.floor(getElementData(source, data[1]) / 10) elseif data[1] == "1866 Slug" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "M79 Launcher" then plusData = math.floor(getElementData(source, data[1]) / 7) elseif data[1] == "2Rnd. Slug" then plusData = math.floor(getElementData(source, data[1]) / 2) end setElementData(pedCol, data[1], plusData) end local skinID = getElementData(source, "skin") local skin = getSkinNameFromID(skinID) setElementData(pedCol, skin, 1) local backpackSlots = getElementData(source, "MAX_Slots") if backpackSlots == 36 then setElementData(pedCol, "Assault Pack (ACU)", 1) elseif backpackSlots == 45 then setElementData(pedCol, "Alice Pack", 1) elseif backpackSlots == 75 then setElementData(pedCol, "Czech Backpack", 1) elseif backpackSlots == 125 then setElementData(pedCol, "Coyote Backpack", 1) elseif backpackSlots == 55 then setElementData(pedCol, "British Assault Pack", 1) elseif backpackSlots == 24 then setElementData(pedCol, "Patrol Pack", 1) elseif backpackSlots == 26 then setElementData(pedCol, "Vest Pouch Pack", 1) elseif backpackSlots == 16 then setElementData(pedCol, "Survival Pack (ACU)", 1) end end setTimer(setElementPosition, 500, 1, source, 6000, 6000, 0) triggerClientEvent(source, "onClientPlayerDeathInfo", source) setAccountData(account, "isDead", true) setElementData(source, "isDead", true) triggerClientEvent ( "onRollMessageStart", getRootElement(),"#FFFFFF"..getPlayerName(source).." #FFFFFFwas killed by "..(getPlayerName(killer) or "unknown")..".",0,22,255, "died") destroyElement(getElementData(source, "playerCol")) setTimer(spawnDayZPlayer, 5000, 1, source) end addEvent("kilLDayZPlayer", true) addEventHandler("kilLDayZPlayer", getRootElement(), kilLDayZPlayer)
-
No es un comando, es una función.
-
Al Rhino no se le puede cambiar los colores...
-
FosterMyHost.com - Alojamiento de calidad
Tomas replied to FosterMyHost's topic in Soluciones de hosting
Recomiendas algo que ya no existe? :FP: X9 -
Creo que se puede sólo editando los models originales.
-
Se puede editar desde el archivo y luego reiniciar el ACL...
-
Debes definir el killer en la función del evento onPlayerWasted/onClientPlayerWasted, para ver si existe usa un if
-
[Proyecto] Zone Gaming | Nueva Comunidad
Tomas replied to Noiz3's topic in Servidores en donde jugar
Woow -
Debes usar /srun
-
Un resource.
-
A que te refieres en el runcode?
-
for i,v in ipairs (getElementsByType("vehicle")) do destroyElement(v) end Ejecutas eso en el runcode y eliminaría todos los vehículos
-
Asus, anoche cuando lo probé el script tira un error en la línea 71, dice que 'd' es un valor nil, yo lo que hice fue cambiarlo pro 'data' y funcionó, aunque creo que no está al 100% funcionando porque el texto no se ve y no funciona el evento, haber si hice algo mal local button = exports.dxButton:dxCreateButton(500, 500, 300, 100, "Test", false) addEventHandler("onClientDXClick",button,function() outputChatBox("Clicked") end )
-
[Proyecto] Zone Gaming | Nueva Comunidad
Tomas replied to Noiz3's topic in Servidores en donde jugar
Excelente idea! Ansioso por ver los avances -
Gracias
-
@alex17 ¿De dónde sacaste el 736 y el 210?