Jump to content

djantony

Members
  • Posts

    24
  • Joined

About djantony

  • Birthday 25/08/2001

Details

  • Gang
    Lima
  • Location
    Barranca
  • Occupation
    Taxitas
  • Interests
    script

Recent Profile Visitors

826 profile views

djantony's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. n -- | Variables local screenW, screenH = guiGetScreenSize() local sx, sy = (screenW / 1920), (screenH / 1080) local panelVisible = false local topPlayers = {} local alpha = 255 local sf_medium = dxCreateFont("SFPRODISPLAY_Medium.ttf", sx*20, false, "cleartype") local interface = {} -- | Dibujar el Panel de Estadísticas function drawTopPanel() --| Animations if not interface["animations"]["general"]["outTick"] then interface["animations"]["general"]["alpha"] = interpolateBetween(0, 0, 0, 255, 0, 0, (getTickCount() - interface["animations"]["general"]["tick"]) / 700, "OutQuad") else if not interface["animations"]["general"]["oldAlpha"] then interface["animations"]["general"]["oldAlpha"] = interface["animations"]["general"]["alpha"] end if (getTickCount() - interface["animations"]["general"]["outTick"]) >= 400 then closeHelp() end interface["animations"]["general"]["alpha"] = interpolateBetween(interface["animations"]["general"]["oldAlpha"], 0, 0, 0, 0, 0, (getTickCount() - interface["animations"]["general"]["outTick"]) / 700, "OutQuad") end local alpha = interface["animations"]["general"]["alpha"] -- Fondo con bordes redondeados dxDrawRoundedRectangle(478, 197, 964, 800, tocolor(33, 35, 38, (alpha/100)*98), 15, false) -- Icono y Título dxDrawImage(531, 245, 28, 28, Images["icon: death"], 0, 0, 0, tocolor(111,0,255, alpha)) dxDrawText("TOP JUGADORES", 576, 240, 100, 22, tocolor(255, 255, 255, (alpha/100)*85), 0.66, sf_medium, "left", "top") dxDrawText("Ranking de los mejores jugadores por Kills, Deaths y K/D Ratio", 576, 259.94, 332, 19, tocolor(255, 255, 255, (alpha/100)*25), 0.5, sf_medium, "left", "top") -- Botón de Cerrar (X) dxDrawImage(1367, 245, 21, 21, Images["icon: exit"], 0, 0, 0, (isCursorOnElement(1367, 245, 21, 21) and tocolor(255, 255, 255, (alpha/100)*25) or tocolor(255, 255, 255, (alpha/100)*15)), false) -- Botones de navegación -- Global dxDrawImage(531, 307, 21, 21, Images["icon: kill"], 0, 0, 0, (interface["page"] == "global" and tocolor(111,0,255, alpha) or (isCursorOnElement(531, 307, 77, 21) and tocolor(255, 255, 255, (alpha/100)*25) or tocolor(255, 255, 255, (alpha/100)*15))), false) dxDrawText("Global", 557, 307, 51, 18, (interface["page"] == "global" and tocolor(111,0,255, alpha) or (isCursorOnElement(531, 307, 77, 21) and tocolor(255, 255, 255, (alpha/100)*25) or tocolor(255, 255, 255, (alpha/100)*15))), 0.59, sf_medium, "left", "top") -- Zona Roja dxDrawImage(627, 307, 21, 21, Images["icon: kill"], 0, 0, 0, (interface["page"] == "roja" and tocolor(111,0,255, alpha) or (isCursorOnElement(627, 307, 73, 21) and tocolor(255, 255, 255, (alpha/100)*25) or tocolor(255, 255, 255, (alpha/100)*15))), false) dxDrawText("Zona Roja", 653, 307, 47, 18, (interface["page"] == "roja" and tocolor(111,0,255, alpha) or (isCursorOnElement(627, 307, 73, 21) and tocolor(255, 255, 255, (alpha/100)*25) or tocolor(255, 255, 255, (alpha/100)*15))), 0.59, sf_medium, "left", "top") -- Mostrar contenido según la pestaña seleccionada if interface["page"] == "global" then -- Dibujar encabezados de la tabla dxDrawText("Rank", 530, 350, 570, 280, tocolor(255, 215, 0, alpha), 0.7, "default-bold") dxDrawText("Nick", 590, 350, 750, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Acoounts", 690, 350, 850, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Kills", 800, 350, 960, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Deaths", 890, 350, 1050, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("K/D", 970, 350, 1140, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Level", 1040, 350, 1230, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Status", 1100, 350, 1320, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- Dibujar filas de la tabla for i, player in ipairs(topPlayers) do if player.rank and player.nick and player.account and player.kills and player.deaths and player.kdr and player.level then local y = 370 + (i * 30) -- Posición vertical de cada jugador -- Verificar si el jugador está conectado (online) local status = "Offline" -- Por defecto, se asume que está offline local onlinePlayer = getPlayerFromName(player.nick) if onlinePlayer then status = "Online" end -- Definir el color dependiendo del estado local statusColor = (status == "Online") and tocolor(0, 255, 0, alpha) or tocolor(255, 0, 0, alpha) -- Dibujar los textos en la interfaz dxDrawText(player.rank .. "°", 535, y, 650, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- Rango del jugador dxDrawText(player.nick, 590, y, 750, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- Kills dxDrawText(player.account, 690, y, 850, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- Deaths dxDrawText(player.kills, 800, y, 950, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- K/D Ratio dxDrawText(player.deaths, 890, y, 1050, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- K/D Ratio dxDrawText(player.kdr, 970, y, 1150, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- K/D Ratio dxDrawText(player.level, 1040, y, 1250, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") -- K/D Ratio dxDrawText(status, 1100, y, 1350, 280, statusColor, 0.7, "default-bold") -- K/D Ratio end end elseif interface["page"] == "roja" then dxDrawText("Top", 535, 350, 570, 280, tocolor(255, 215, 0, alpha), 0.7, "default-bold") dxDrawText("User", 590, 350, 750, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Kills", 780, 350, 850, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("Deaths", 880, 350, 960, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") dxDrawText("K/D", 980, 350, 1050, 280, tocolor(255, 255, 255, alpha), 0.7, "default-bold") end --| Scroll -- dxDrawRoundedRectangle(1009, 439, 6, 378, tocolor(255, 255, 255, (alpha/100)*2), 3, false) -- interface["scroll"]["smooth"] = interpolateBetween(interface["scroll"]["oldPos"], 0, 0, interface["scroll"]["newPos"], 0, 0, (getTickCount() - interface["scroll"]["tick"]) / 400, "OutQuad") -- dxDrawRoundedRectangle(1009, interface["scroll"]["smooth"], 6, 146.91, tocolor(111,0,255, alpha), 2.5, false) end function openHelp() if not isEventHandlerAdded('onClientRender', root, drawTopPanel) then interface = { animations = { general = { alpha = 0, tick = getTickCount(), }, nav = { tick = getTickCount(), oldPos = 549, newPos = 549, }, }, page = "global", scroll = { data = 0, tick = getTickCount(), oldPos = 439, newPos = 439, }, } addEventHandler('onClientRender', root, drawTopPanel) showCursor(true) showChat(false) triggerServerEvent("requestTopStats", localPlayer) end end addEvent("FS:openHelp", true) addEventHandler("FS:openHelp", root, drawTopPanel) function closeHelp() if isEventHandlerAdded('onClientRender', root, drawTopPanel) then if not interface["animations"]["general"]["outTick"] then interface["animations"]["general"]["outTick"] = getTickCount() return end removeEventHandler('onClientRender', root, drawTopPanel) showCursor(false) showChat(true) end end function toggleProducts() if isEventHandlerAdded('onClientRender', root, drawTopPanel) then closeHelp() else openHelp() end end bindKey("F2", "down", toggleProducts) function closeHelp() if isEventHandlerAdded('onClientRender', root, drawTopPanel) then if not interface["animations"]["general"]["outTick"] then interface["animations"]["general"]["outTick"] = getTickCount() return end removeEventHandler('onClientRender', root, drawTopPanel) showCursor(false) showChat(true) end end --| Scroll function scrollItens(button) if isEventHandlerAdded('onClientRender', root, renderHelp) then local data = (interface["scroll"]["data"] or 0) if (button == "mouse_wheel_up") and (data > 0) then data = (data - 1) elseif (button == "mouse_wheel_down") and (data < (#config["help"][ interface["page"] ]["itens"] - 5)) then data = (data + 1) end interface["scroll"]["data"], interface["scroll"]["oldPos"], interface["scroll"]["newPos"], interface["scroll"]["tick"] = data, interface["scroll"]["smooth"], (439 + (231/(#config["help"][ interface["page"] ]["itens"] - 5)*data)), getTickCount() end end bindKey("mouse_wheel_up", "down", scrollItens) bindKey("mouse_wheel_down", "down", scrollItens) addEventHandler("onClientClick", root, function(button, state) if isEventHandlerAdded('onClientRender', root, drawTopPanel) then if (button == "left") and (state == "down") then --| Close panel if isCursorOnElement(1367, 245, 21, 21) then closeHelp() --| Navegation elseif isCursorOnElement(531, 307, 77, 21) then interface["page"] = "global" interface["animations"]["nav"]["oldPos"], interface["animations"]["nav"]["newPos"], interface["animations"]["nav"]["tick"] = interface["animations"]["nav"]["smooth"], 549, getTickCount() --interface["scroll"]["data"], interface["scroll"]["oldPos"], interface["scroll"]["newPos"], interface["scroll"]["tick"] = data, interface["scroll"]["smooth"], (439 + (231/(#topPlayers - 5)*0)), getTickCount() elseif isCursorOnElement(627, 307, 73, 21) then interface["page"] = "roja" interface["animations"]["nav"]["oldPos"], interface["animations"]["nav"]["newPos"], interface["animations"]["nav"]["tick"] = interface["animations"]["nav"]["smooth"], 653, getTickCount() -- interface["scroll"]["data"], interface["scroll"]["oldPos"], interface["scroll"]["newPos"], interface["scroll"]["tick"] = data, interface["scroll"]["smooth"], (439 + (231/(#config["help"][ interface["page"] ]["itens"] - 5)*0)), getTickCount() end end end end) -- | Cerrar panel con clic en "X" client.lua addEventHandler("onClientClick", root, function(button, state) if panelVisible and button == "left" and state == "down" then if isCursorOnElement(1150, 190, 21, 21) then toggleTopPanel() end end end) addEvent("updateTopStats", true) addEventHandler("updateTopStats", root, function(data) topPlayers = data or {} -- Guarda la lista de jugadores recibida del servidor end) local lastWeekday = getRealTime().weekday -- não mexa local updatePlayersDataTime = 5 -- atualizar a cada 5 minutos local tableInsert = table.insert local tableSort = table.sort function recebeKills ( thePlayer ) local thePlayer = client or thePlayer local data = getAccounts () local playerData = {} local playerData2 = {} local dmKills = {} local kill = 0 local death = 0 local killsTemp = 0 local deathsTemp = 0 for i, acc in ipairs(data) do kill, death = tonumber(getAccountData (acc, "kills") or 0), tonumber(getAccountData (acc, "deaths") or 0) killsTemp, deathsTemp = tonumber(getAccountData (acc, "killsTemp") or 0), tonumber(getAccountData (acc, "deathsTemp") or 0) local DMKill, DMDeath = 0, 0 local status, nick, level = "Offline", "", "N/A" if getAccountPlayer(acc) then local p = getAccountPlayer(acc) level = getElementData(p, "level") or 1 status = "Online" nick = getElementData( p, "player-lastnick" ) or getPlayerName(p) --level = getElementData(p, 'Level') or "N/A" DMKill = getElementData(p, 'DMKill') or 0 DMDeath = getElementData(p, 'DMDeath') or 0 else nick = getAccountData( acc, "player-lastnick" ) or "?" level = getAccountData( acc, "level" ) or 1 --level = getAccountData(acc, 'Level') or "N/A" DMKill = getAccountData(acc, 'DMKill') or 0 DMDeath = getAccountData(acc, 'DMDeath') or 0 end local ratio = kill / death if death == 0 and kill == 0 then -- Se ambos os valores forem 0, deixa o ratio em 0 também. ratio = 0 elseif kill ~= 0 and death == 0 then -- Se death for 0 mas kill não, deixa o ratio como Desconocido, pois não é possível dividir algo por 0. ratio = "?" end local ratioTemp = killsTemp / deathsTemp if deathsTemp == 0 and killsTemp == 0 then -- Se ambos os valores forem 0, deixa o ratio em 0 também. ratioTemp = 0 elseif killsTemp ~= 0 and deathsTemp == 0 then -- Se death for 0 mas kill não, deixa o ratio como Desconocido, pois não é possível dividir algo por 0. ratioTemp = "?" end tableInsert( playerData, { { nick:gsub("#%x%x%x%x%x%x", ""), getAccountName(acc), status }, kill, death, ratio, killsTemp, deathsTemp, ratioTemp, level = level } ) tableInsert(dmKills, { { nick:gsub("#%x%x%x%x%x%x", ""), getAccountName(acc), status }, kill, death, ratio, killsTemp, deathsTemp, ratioTemp, level = level, DMKill = DMKill, DMDeath = DMDeath }) end for i,v in pairs(playerData) do playerData2[ #playerData2 + 1 ] = { v[1], v[5], v[6], v[7], level = v.level or "1" } end tableSort( playerData, function(a, b) return a[2] > b[2] end ) tableSort( playerData2, function(a, b) return a[2] > b[2] end ) tableSort( dmKills, function(a, b) return a.DMKill > b.DMKill end ) if #playerData > 100 then for i=101, #playerData do playerData[i] = nil end end if #playerData2 > 100 then for i=101, #playerData2 do playerData2[i] = nil end end if #dmKills > 100 then for i=101, #dmKills do dmKills[i] = nil end end --triggerClientEvent (thePlayer, "showRank", thePlayer, playerData, playerData2, dmKills) end addEvent ("getRank", true) addEventHandler ("getRank", getRootElement(), recebeKills) function salvaKills (ammo, killer, weapon, bodypart, stealth) if not isGuestAccount (getPlayerAccount(source)) then local deaths = tonumber( getAccountData (getPlayerAccount(source), "deaths") or 0 ) local deathsTemp = tonumber( getAccountData (getPlayerAccount(source), "deathsTemp") or 0 ) setAccountData (getPlayerAccount(source), "deaths", deaths + 1) setAccountData (getPlayerAccount(source), "deathsTemp", deathsTemp + 1) end if killer and killer ~= source then if getElementType (killer) == "player" then if not isGuestAccount (getPlayerAccount(killer)) then local kills = tonumber( getAccountData (getPlayerAccount(killer), "kills") or 0 ) local killsTemp = tonumber( getAccountData (getPlayerAccount(killer), "killsTemp") or 0 ) setAccountData (getPlayerAccount(killer), "kills", kills + 1) setAccountData (getPlayerAccount(killer), "killsTemp", killsTemp + 1) end elseif getElementType (killer) == "vehicle" then killer = getVehicleController (killer) if killer then if not isGuestAccount (getPlayerAccount(killer)) then local kills = tonumber( getAccountData (getPlayerAccount(killer), "kills") or 0 ) local killsTemp = tonumber( getAccountData (getPlayerAccount(killer), "killsTemp") or 0 ) setAccountData (getPlayerAccount(killer), "kills", kills + 1) setAccountData (getPlayerAccount(killer), "killsTemp", killsTemp + 1) end end end end end addEventHandler ("onPlayerWasted", getRootElement(), salvaKills) function checkWeeklyRank () if getRealTime().weekday == 0 and (lastWeekday == 6) then resetWeeklyKillsData () lastWeekday = getRealTime().weekday else lastWeekday = getRealTime().weekday end end addEventHandler ("onResourceStart", resourceRoot, function () setTimer (function () for i, player in pairs(getElementsByType("player")) do recebeKills (player) end end, 2000, 1) setTimer (function () checkWeeklyRank () end, 60000 * updatePlayersDataTime, 0) end) function resetWeeklyKillsData () local now = getRealTime() -- Recebe os dados do momento atual. local hours = now.hour local minutes = now.minute local days = now.monthday local months = now.month local years = now.year for i, acc in pairs(getAccounts()) do if getAccountData(acc, "killsTemp") then setAccountData(acc, "killsTemp", 0) end if getAccountData(acc, "deathsTemp") then setAccountData(acc, "deathsTemp", 0) end end local dateUpdate = string.format( "%02d/%02d/%02d", tostring(days),tostring(months + 1),tostring(years + 1900) ) local timeUpdate = string.format( "%02d:%02d", tostring(hours),tostring(minutes) ) print ("[RankSystem] Rank semanal resetado!") print ("[RankSystem] Data: "..dateUpdate) print ("[RankSystem] Hora: "..timeUpdate) end function getAccountRank( acc, weekly ) if not (acc) then return false end local accDataStr = weekly and "killsTemp" or "kills" local accsRank = {} local accounts = getAccounts () for _, accnt in ipairs(accounts) do local kills = tonumber(getAccountData (accnt, accDataStr) or 0) tableInsert( accsRank, { accnt, kills } ) end tableSort( accsRank, function(a, b) return a[2] > b[2] end ) for i, t in ipairs(accsRank) do if acc == t[1] then return i end end return false end function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function math.round(number, decimals, method) if number and type(number) == "number" then decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end return 0 end -- | Base de datos de jugadores (Ejemplo, reemplázalo con tu BD real) local playerStats = {} -- | Función para obtener estadísticas y enviarlas al cliente -- Evento para manejar la solicitud de estadísticas del cliente addEvent("requestTopStats", true) -- Definimos el evento addEventHandler("requestTopStats", root, function() sendTopStats(source) -- Llamamos a la función para enviar las estadísticas al jugador que lo solicita end) function sendTopStats(player) local topData = {} -- Obtener todas las cuentas registradas local accounts = getAccounts() -- Asegúrate de que esta función devuelve una lista válida de cuentas registradas local maxPlayers = 20 -- Limitar a 20 jugadores for _, account in ipairs(accounts) do if account and not isGuestAccount(account) then -- Verifica si la cuenta no es nula antes de proceder local accountName = getAccountName(account) if accountName then local Levels = tostring (getAccountData(account,"Level") or "0") -- local Levels = getAccountSerial(account) local nicks = getAccountName(account) local kills = tostring(getAccountData(account, "kills") or "0") local deaths = tostring(getAccountData(account, "deaths") or "0") local killsTemp = tostring(getAccountData(account, "killsTemp") or "0") local deathsTemp = tostring(getAccountData(account, "deathsTemp") or "0") local ratio = kills / deaths local ratioTemp = killsTemp / deathsTemp local killsrank = getAccountRank(account) or "Desconocido" local killsrankTemp = getAccountRank(account, true) or "Desconocido" -- Manejo de división por cero en el ratio if tonumber(deaths) == 0 and tonumber(kills) == 0 then ratio = "0" elseif tonumber(kills) ~= 0 and tonumber(deaths) == 0 then ratio = "Desconocido" end if tonumber(deathsTemp) == 0 and tonumber(killsTemp) == 0 then ratioTemp = 0 elseif tonumber(killsTemp) ~= 0 and tonumber(deathsTemp) == 0 then ratioTemp = "Desconocido" end -- Agregar el ranking con el sufijo de posición if killsrank ~= "Desconocido" then killsrank = tostring(killsrank) .. "º" end if killsrankTemp ~= "Desconocido" then killsrankTemp = tostring(killsrankTemp) .. "º" end -- Redondear los ratios if ratio ~= "Desconocido" then ratio = tostring(math.round(tonumber(ratio), 2, "floor")) end if ratioTemp ~= "0/0" then ratioTemp = tostring(math.round(tonumber(ratioTemp), 2, "floor")) end -- Insertar los datos en la tabla table.insert(topData, { rank = killsrankTemp, nick = nicks, account = accountName, -- Nombre de la cuenta kills = killsTemp, deaths = deathsTemp, kdr = ratioTemp, level = Levels, }) if #topData >= maxPlayers then break end end end end -- Ordenamos los datos por kills (mayor a menor) table.sort(topData, function(a, b) return a.kills > b.kills end) -- Enviamos los datos al cliente triggerClientEvent(player, "updateTopStats", player, topData) end lo que pasa que en mi codigo puse el rango que esta en el server.lua , pero cuando lo pongo en el client su rango player.rank sale desordenado
  2. Cómo puedo hacer para que al entrar en una colShape se desactive el F1 > Panel freeroam (o cualquier otro bindKey, en este caso, el freeroam)?
  3. CMDBLOQUEAR = { ["almoto1"] = true, ["alpack1"] = true, ["almoney1"] = true, ["alvida1"] = true, ["alcolete1"] = true, ["alfix1"] = true, ["me"] = true, ["exit"] = true, ["logout"] = true, ["x1"] = true, ["logout"] = true, ["resetar"] = true, } function BLOQUEARCOMANDOS( Comando ) if CMDBLOQUEAR[ Comando ] == true then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then return end cancelEvent() triggerClientEvent(source, "addNotification", root, "Você não tem essa permissão!") end end addEventHandler("onPlayerCommand", root, BLOQUEARCOMANDOS) Encontre estre script de bloqueo de comando pero es para ACL quisiera un ayuda para convertirlo en bloqueo pero para TEAM
  4. quisiera crear un comando para silenciar toda la música del servidor por ejemplo tengo 2 sistemas de música , una del panel de música 3d y otro panel de radio auto , quisiera crear un comando para que otros no les fastidié la música
  5. Estoy comprando una GM de RPG escucho sus ofertas y su proyecto
  6. Nesecito un script que cuando mi auto cae al agua me teletransporte automaticamente ala pista ?
  7. 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 )
  8. 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 )
  9. tengo bien configurado el voice en el config. pero cuando activo el script voice dura 10 segundos en funcionar despues de ai no funciona nose escucha y puedo ablar me pueden ayudar porfavor nose que estaria pasando ?
  10. function textToSpeech(txt,lang) if lang then playSound("http://translate.google.com/translate_tts?tl="..lang.."&q="..txt.."&client=tw-ob", false) else playSound("http://translate.google.com/translate_tts?tl=en&q="..txt.."&client=tw-ob", false) end end addEvent("client_textToSpeech" , true ) addEventHandler("client_textToSpeech" , getRootElement(), textToSpeech) mi ayuda es como lo puedo poner en español como ven ese script lo encontre en una comunidad brasileña me ayuda para ponerlo en español?
  11. local cWindow = guiCreateWindow(337, 177, 816, 762, "CINEMA", false) local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false, cWindow) local theBrowser = guiGetBrowser(browser) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "http://www.youtube.com") end ) CINEMA = { button = {}, window = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() guiWindowSetSizable(cWindow, false) guiSetProperty(cWindow, "CaptionColour", "FF0309FB") guiSetVisible(cWindow,false) CINEMA.button[1] = guiCreateButton(9, 608, 388, 35, "GET URL", false, cWindow) guiSetFont(CINEMA.button[1], "default-bold-small") guiSetProperty(CINEMA.button[1], "NormalTextColour", "FFFF0000") CINEMA.button[2] = guiCreateButton(427, 608, 381, 35, "PUT VIDEO IN CINEMA", false, cWindow) guiSetFont(CINEMA.button[2], "default-bold-small") guiSetProperty(CINEMA.button[2], "NormalTextColour", "FFFF0000") CINEMA.button[3] = guiCreateButton(10, 653, 388, 35, "CLOSE", false, cWindow) guiSetFont(CINEMA.button[3], "default-bold-small") guiSetProperty(CINEMA.button[3], "NormalTextColour", "FFFF0000") CINEMA.button[4] = guiCreateButton(425, 654, 383, 34, "VIEW VIDEO IN FULL SCREEN MODE", false, cWindow) guiSetFont(CINEMA.button[4], "default-bold-small") guiSetProperty(CINEMA.button[4], "NormalTextColour", "FFFF0000") CINEMA.edit[1] = guiCreateEdit(11, 700, 796, 52, "", false, cWindow) guiEditSetReadOnly(CINEMA.edit[1], true) end ) function geturl() if source == CINEMA.button[1] then guiSetText(CINEMA.edit[1],getBrowserURL(theBrowser)) end end addEventHandler("onClientGUIClick",root,geturl) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c , ...) end local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() local x, y = 110.7, 1024.15 dxDrawMaterialLine3D(x, y, 23.25, x, y, 14.75, webBrowser, 18.2, tocolor(255, 255, 255, 255), x, y+1, 19) end function fullscreen() local URLs = string.sub(guiGetText(CINEMA.edit[1]),"33") if source == CINEMA.button[4] then loadBrowserURL(webBrowser, "https://www.youtube.com/embed/"..URLs.."?autoplay=1&iv_load_policy=3&enablejsapi=1&fs=0&theme=light") end end addEventHandler("onClientGUIClick",root,fullscreen) function brow() if source == CINEMA.button[2] then loadBrowserURL(webBrowser, guiGetText(CINEMA.edit[1])) addEventHandler("onClientPreRender", root, webBrowserRender) end end addEventHandler("onClientBrowserCreated", webBrowser, brow) addEventHandler("onClientGUIClick",root,brow) function url() guiSetVisible(cWindow,true) showCursor( true ) guiSetInputEnabled( true ) end addCommandHandler("cinema",url) function closeman() if source == CINEMA.button[3] then guiSetVisible(cWindow,false) showCursor( false ) guiSetInputEnabled( false ) end end addEventHandler("onClientGUIClick",root,closeman) el error es que no me reproduce un live de youtube
  12. como ver youtube en vivo mta sa osea tengo un script de cinema pero al poner un video de youtube en vivo no reproduce ?
×
×
  • Create New...