-
Posts
1,004 -
Joined
-
Last visited
Everything posted by Narutimmy
-
Gracias , lo tomare en cuenta. Como dije la isea es Ejemplo: 1.- Crear 1 Zona y Dividirla en 4, Cada 5mins 1 de ellas es seleccionada y si estas ahi mueres. Pero se acumulan, si ahorita toco la zona 1 y al rato la 3, entonces la zona 1 y 3 son de peligro y mueres, solo queda la 2 y 4. y asi has que solo quede 1. PD: lo de que el script estaba sucio por asi decirlo es porque apenas era un borrador
-
Andale eso funciona Perfecto
-
En realidad creo un rectangulo, faltandole una esquina, pero lo crea todo al mismo tiempo, no es lo que busco
-
Ya vi el error, la variable de Area 3 y 4 estaban ma, estaba localArea3 en lugar de local Area3 Ya realize la pruba y todo bien se seleccionan las 3, el problema es que cuando las 4 ya fueron seleccionadas si se vuelve a ejecutar tira el error de infinito, ahi alguna manera de identificar cuando ya no quede ninguna? Para que cuando eso pase se lanze una nueva funcion que aga lo mismo pero con otra tabla de areas?
-
Si, seriviria pero yo suelo usar while local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { Area1, Area2, Area3, Area4, } function ComenzarAreasGreen () while true do local RandomArea = randomSpawnTable [ math.random(1, #randomSpawnTable) ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) break end end end addCommandHandler("lol", function() ComenzarAreasGreen() end) acabo de probarlo y funciona bien. Ahi funciona pero solo se selecciona la 1 y la 2, y despues tira este error:
-
Dice Linea 81 Argumento 1 es nil local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { Area1, Area2, Area3, Area4, } function ComenzarAreasGreen () while true do local RandomArea = randomSpawnTable [ random ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) --- Linea 81 break end end end setTimer(ComenzarAreasGreen,15000,0)
-
Dice que RandomArea es Nil
-
No le entiendo nada a tu codigo xDD EDIT: Ya le entendi, pero no me sirve, el tuyo creo 1, y cuandova a crear otra elimina la anterior si no me equivico, eso no me sirve. Lo que quiero es crear por ejemplo 1 mapa y dividirlo en 4 zonas, al inicio puedes estar en las 4, pero luego ejemplo al azar la 3 se hace de peligro si estas ahi mueres, luego se hace de peligro la 2, entonces ya son de peligro la 2 y la 3, y asi hasta que solo quede 1 como zona segura, nose si me explico.
-
Si antes las tenia como Area 1, Area 2,Area3, ahora todas son Area1 por ejemplo. Claro que no. Se forma una tabla con las áreas, se definen como Areas[1], Areas[2], etc. (Depende del orden que se creen) aaa ok ok ya entendi, la segunda era, imagina que tienes 3 areas, das el random y sale el Area 1 y se le pone a parpadear no? pasan 15 seg se da otro random y sale la Area 3, en teoria solo falta la 2, pero da ramrom y sale la 3 otra vez, y da random y sale la 1 otras vez (teniendo mala suerte), la idea es que las que ya estan parpadeando ya no salgan en el random, y que cuando ya no falte ninguna ejecutar una funcion nueva.
-
Si antes las tenia como Area 1, Area 2,Area3, ahora todas son Area1 por ejemplo.
-
Eso funciona, el problema es que asi no puedo identificar cada una de las zonas, porque quiero hacer una funcion que por ejemplo mate a al usuario que entre a alguna de las Areas Parpadeando. Otra cosa, la idea es que ponga a flashear las zonas 1 por 1, el problema es que si toca una que ya esta flasheando lanza la otra funcion aonque aun falten algunas.
-
Hola bueno estoy haciendo un resource que lo que aga es basicamente seleccionar una de las areas creadas al azar y ponerla a parpadear y que si ya esta parpdeando seleccione otra, pero me da error, me dice que es nil ... local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { {"Area1"}, { "Area2" }, { "Area3" }, { "Area4" }, } function ComenzarAreasGreen () local RandomArea = randomSpawnTable [ random ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) else ComenzarAreasGreen () end end setTimer(ComenzarAreasGreen,15000,0)
-
ya lo use y si cuando activo sale que si quiero agregarlo , pero aun as no carga
-
El problema es que por ejemplo googlew si carga, pero mi web no, requestBrowserDomains{"http://thezombiworld.com,http://64.94.238.182"} --In order to render the browser on the full screen, we need to know the dimensions. local screenWidth, screenHeight = guiGetScreenSize() --Let's create a new browser in remote mode. local window = guiCreateWindow(0.02, 0.01, 0.95, 0.96, "TheZombiWorld", true) local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false, window) guiSetVisible(window,false) -- The event onClientBrowserCreated will be triggered, after the browser has been initialized. -- After this event has been triggered, we will be able to load our URL local theBrowser = guiGetBrowser(browser) -- Get the browser element from gui-browser addEventHandler("onClientBrowserCreated", theBrowser, function() -- After the browser has been initialized, we can load [url=http://www.youtube.com]http://www.youtube.com[/url] loadBrowserURL(source, "http://thezombiworld.com") end ) function open() guiSetVisible ( window, not guiGetVisible ( window ) ) showCursor ( guiGetVisible ( window ) ) end addCommandHandler("browser",open)
-
hola tengo la duda, como creo un browser? vi este script en el foto buscando en teria funciona pero ami no me anda, una ayuda? var = false local screenWidth, screenHeight = guiGetScreenSize() browser_ = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() if isElement(browser_) then dxDrawImage(0.01, 0.04, 0.98, 0.93, browser_, 0, 0, 0, tocolor(255,255,255,255), true) end end function loadBrowser_(bool) if bool == true then showCursor(true) loadBrowserURL(browser_, "https://www.youtube.com/watch?v=ohBQ59OXnYM") focusBrowser(browser_) addEventHandler("onClientRender", root, webBrowserRender) elseif bool == false then destroyElement(browser_) removeEventHandler("onClientRender", root, webBrowserRender) showCursor(false) end end bindKey("F1","down", function() if var == true then var = false loadBrowser_(false) elseif var == false then var = true loadBrowser_(true) end end)
-
Logre comvencerlo y me dijo como se hace y si, amm como puedo hacer para que cuando se cree el gang no se puedan usar caracteres como !,#, y eso que solo se puedan letras y numeros? tengo asi : local char = "[^0-9a-zA-Z_]"
-
Porque no son usuarios comunes son Brasileños, estan robando clanes ya que al meterse al clan sin permiso tienen acceso a la base o demas cosas.
-
Pasaría lo mismo, si el ped muere luego de que el timer es creado pasaría exáctamente lo mismo. Utiliza el script que te dieron por ahí arriba y cambia isPedDead por isElement Si eso es lo que ise ya esta funcionando bien Gracias a todos.
-
no no, osea ejemplo tu creas tu gang osea tu grupo no? y yo soy un usuario normal entonces mediante un bug o Algo entro a tu grupo sin tu permiso y me pongo rango fundador y te saco de tu grupo y me adueño de el, eso estan haciendo.
-
Hola vengo con un problema urgente que esta creando muchos problemas en el servidor, hace unos meses instale este sistema de grupos muy como ya que permite dar diferentes permisos a tus miembros, el problema es que ahi 1 usuario o mas no lose que de alguna manera se Mete a los clanes sin permiso sin invitacion ni nada, por si fuera poco Expulsa a todos los demas miembros incluidos al lider y demas. El usuario se crea una cuenta con el name "Moderator" para que los usuarios crean que es alguien del staff pero no. El sistema es este: https://community.multitheftauto.com/ind ... ls&id=8291 Server: ------------------------------------------------------------------------------------ -- PROJECT: N/A -- RIGHTS: All rights reserved by developers -- FILE: groupSystem/group.slua -- DEVELOPER: Sebbe (Smart) ------------------------------------------------------------------------------------ local groupTable = {} local log = true -- Set this to false if you don't want group stuff to be logged in your server.log local debugInfo = true -- Set this to false if you don't want to see see group logs in your debug mode. local GAC = {} -- index = account (string), [1] = group name, [2] = rank, [3] = warning level, [4] = date Joined, [5] = last time online (Not Available) local users = {} local myGang = {} local char = "[^0-9a-zA-Z_]" local rankCache = {} local db = dbConnect("sqlite", "/database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS groupmember (account TEXT, groupName TEXT, rank TEXT, warningLvl TEXT, joined TEXT, lastTime TEXT)") dbExec(db, "CREATE TABLE IF NOT EXISTS groups (name TEXT, leader TEXT, message TEXT, chatcolor TEXT, notecolor TEXT, date TEXT, turfcolor TEXT, cashflow TEXT)") dbExec(db, "CREATE TABLE IF NOT EXISTS groupRanks (groupName TEXT, name TEXT, permissions TEXT)") --Some misc functions _outputDebugString = outputDebugString function outputDebugString(string) if (debugInfo) then _outputDebugString(string) end end function getTime() local time = getRealTime() local date = string.format("%02d/%02d/%02d", time.monthday, (time.month+1), (time.year-100) ) local time = string.format("%02d:%02d", time.hour, time.minute) return date, time end MTAoutput = outputChatBox function outputChatBox(message, player, r, g, b, bool) if (isElement(message) and getElementType(message) == "player") then MTAoutput(player, message, r, g, b, bool) else MTAoutput(message, player, r, g, b, bool) end end function groupLog(group, message) if (log) then outputServerLog("GROUP: "..group.." - "..message) end if (debugInfo) then outputDebugString("GROUP: "..group.." - "..message) end end --Lets start local permToTable = { [1] = "invite", [2] = "promote", [3] = "demote", [4] = "kick", [5] = "warn", [6] = "delete", [7] = "deposit", [8] = "withdraw", [9] = "editInfo", [10] = "viewLog", [11] = "viewBlacklist", [12] = "addBlaclist", [13] = "changeTurfColor", [14] = "modifyAlliance", [15] = "modifyRanks", [16] = "withDrawMoney", } function account(plr) if (plr and isElement(plr)) then return getAccountName(getPlayerAccount(plr)) end end function loadGroupRanks(query) local the_table = dbPoll(query, 0) if (the_table) then for ind, data in pairs(the_table) do if (not rankCache[data.groupName]) then rankCache[data.groupName] = {} end if (not rankCache[data.groupName][data.name]) then rankCache[data.groupName][data.name] = {} end local JSONtable = fromJSON(data.permissions) for ind, value in pairs(JSONtable) do if (value and ind) then rankCache[data.groupName][data.name][ind] = true end end end end end dbQuery(loadGroupRanks, db, "SELECT * FROM groupRanks") function loadGroupStuff(query) local g_table = dbPoll(query, 0) if (not g_table) then return end for ind, data in ipairs(g_table) do groupTable[data.name] = {data.leader, data.message, data.chatcolor, data.notecolor, data.date, data.turfcolor, data.cashflow} end end dbQuery(loadGroupStuff, db, "SELECT * FROM groups") function loadClientGroup(query) local g_table = dbPoll(query, 0) if (not g_table) then return end for ind, data in ipairs(g_table) do if (getAccount(data.account)) then local player = getAccountPlayer(getAccount(data.account)) users[data.groupName] = {} table.insert(users[data.groupName], data.account) if (player) then setElementData(player, "Group", data.groupName) myGang[player] = data.groupName end GAC[data.account] = {data.groupName, data.rank, data.warningLvl, data.joined, data.lastTime or 0} end end end dbQuery(loadClientGroup, db, "SELECT * FROM groupmember") function addRank(group, rank, permissionTable) if (not rankCache[group]) then rankCache[group] = {} end --rankCache[group][rank] = {fromJSON(permissionTable)} dbExec(db, "INSERT INTO groupRanks VALUES (?, ?, ?)", tostring(group), tostring(rank), permissionTable) dbQuery(loadGroupRanks, db, "SELECT * FROM groupRanks") end function removeRank(group, rank) if (not rankCache[group]) then return true end if (rankCache[group][rank]) then rankCache[group][rank] = nil dbExec(db, "DELETE FROM groupRanks WHERE name=? AND groupName=?", tostring(rank), tostring(group)) dbQuery(loadGroupRanks, db, "SELECT * FROM groupRanks") return true end end function isRank(group, rank) if (not rankCache[group]) then return false end return rankCache[group][rank] end function groupMemberLogin() if (GAC[account(source)]) then myGang[source] = GAC[account(source)][1] setElementData(source, "Group", GAC[account(source)][1]) end end addEventHandler("onPlayerLogin", root, groupMemberLogin) function getGroupMembers(group) local temp = {} for ind, data in pairs(users) do if (ind == group) then table.insert(temp, data[1]) end end return temp end function getPlayerGroup(player) if (not GAC[account(player)]) then return false end return GAC[account(player)][1] end function getPlayerGroupRank(player) if (not GAC[account(player)]) then return false end return GAC[account(player)][2] end function getPlayerWarningLevel(player) if (not GAC[account(player)]) then return false end return GAC[account(player)][3] end function getGroupBankAmount(group) if (not groupTable[group]) then return end return groupTable[group][7] end function getPlayerJoinDate(player) if (not GAC[account(player)]) then return false end return GAC[account(player)][4] end function getHexCode(r, g, b) if (r and g and b) then return string.format("#%.2X%.2X%.2X", r, g, b) end end function getGroupChatColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][3]) return color[1], color[2], color[3] end function outputGroupMessage(message, group) for ind, data in pairs(GAC) do if (data[1] == group) then local acc = getAccount(ind) if (getAccountPlayer(acc)) then local color = fromJSON(groupTable[group][3]) local hex = getHexCode(color[1], color[2], color[3]) outputChatBox(hex.."("..group..") #FFFFFF"..message, getAccountPlayer(acc), 255, 255, 255, true) groupLog(group, message) end end end end function checkGroupAccess(player, actionID) local rank = getPlayerGroupRank(player) local group = getPlayerGroup(player) if (not rankCache[group]) then return false end if (rankCache[group] and rankCache[group][rank]) then if (tostring(actionID)) then for ind, data in pairs(permToTable) do if (data == actionID) then actionID = ind break end end end local actionID = tonumber(actionID) if (rankCache[group][rank][actionID]) then return true end end end function getPermissionCount(group, rank) if (not rankCache[group]) then return false end local count = 0 if (rankCache[group] and rankCache[group][rank]) then for ind, data in pairs(rankCache[group][rank]) do count = count + 1 end end return count end
-
Si el ped muere luego de la condicional el debug aparecería, cambia el isPedDead por isElement y funcionará
-
mismo error Otr cosa "isPedDead" no sirve ya que cuando el ped muere es destruido automaticamente
-
Nu funciona :I addEventHandler( "Taser", getRootElement(), function() if source then setElementFrozen (source,true) setElementData(source,"Anim2",true) setPedAnimation(source, "CRACK", "crckdeth2", 5000, false, false, false, true) Elemento = source setTimer(function() if Elemento then if not isPedDead (Elemento) then ----23 setElementData(Elemento , "Anim2",false) ----24 setElementFrozen(Elemento , false) ----25 end end end, 5000, 1) end end)
-
Yo uso para eso : engineSetModelLODDistance pero debes ponerlo para cada objeto de los que usas en tu mappeo, si quieres que siempre les sea visible pones una cantidad alta como 500, si quieres que solo se vea cuando estan muy cercas 300, o muy muy lejos pones 1000. Y Si quieres reducir la distancia general de todo pues. setFarClipDistance(400) setFogDistance(300)
