Jump to content

Search the Community

Showing results for tags 'table'.

  • Search By Tags

    • table ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


  1. Lua tables are a fundamental data structure that allows you to store key-value pairs and create complex data structures. Tables in Lua are versatile and can contain values of different types. Let's dive into a detailed explanation with examples : Table Creation: To create a table in Lua, you...
  2. how to create any one vehicle that is listed in the table, with a delay per minute and a filter for re-creating the transport and the maximum number (car dealership)? server carTable = { -- id price x y z rz {475,5000,-2149,-775.5,32,-90}, {411,5000,-2149,-769.5,32,-90}, {416,...
  3. Hello everyone, I need your help with something please. I'm trying to create something like pick items and stuff like that, plants, mushrooms, etc etc. This creates a table with Objects and Collisions. I want to know how can I delete just the collision that I hit and the object in that positio...
  4. alguem consegue me ajudar, tentei fazer um codigo como se fosse um botão que iria aumentar a quantidade que você vai "comprar" mas ele só adicona o item 1 vez e eu queria que adicionasse 1 vez a cada click que o player fizer alguem tem alguma ideia de como me ajudar? Codigo: shop = { prodAtual...
  5. table = {} function table.contains(table, element) for _, value in pairs(table) do if value == element then return true end end return false end function tablefind(tab,el) for index, value in pairs(tab) do if value == el then return index end end end function OnClientGuiButton(...
  6. redditing

    Table

    I wanted to ask if there is a way to check what index the value in the table is for example, t = {} table.insert(t,"Hello") table.insert(t,"HELLO") table.insert(t,"HI") if index==1 and value=="HI" then -- false --do something elseif index==0 and value=="HELLO" then --false --do some...
  7. I have this: -- 2 points on each city. local spawnCoords = { {1125, -2036, 69.89, -90}, {2504, -1686, 13.55, 45}, {-1972, 643, 46.57, -45}, {-2720, -317, 7.85, 45}, {2023, 1008, 10.83, -90}, {1298, 2084, 12.83, -90}, } -- all skins. local validSkins = {0, 1, 2, 7, 9, 10, 11, 12, 13, 1...
  8. Iae rapaziada, seguinte fiz um code simples só para aprender melhor tabela, até agora estava tudo normal criando as markers, a mensagem na tela e tudo mais.... porém agora estou com o seguinte problema: São 3 markers cada uma tem uma cadeira do lado. O que tenho em mente é que quando o player h...
  9. local table = { {"1", "2", "3", "4"}, } function asdasdsdasdd() table.insert(table,"5","6","7","8") end What wrong? No errors and warnings in debugscript 3...
  10. Boa noite rapaziada, bom eu to fazendo um painel login e adicionei 3 musicas que tocam aleatoriamente em uma tabela nomeada (Tab_Musicas), no entanto ao player entrar na tela de login eu gostaria que aparecesse o nome da musica a qual esta tocando! E é ai que entra minha duvida. Como eu poderia est...
  11. I created a scoreboard system, but when i make a team, the team does not show in scoreboard.. how can i add this after playerlist?
  12. client: local Admins = {} addEvent("updateAdmins",true) addEventHandler("updateAdmins",root, function(t) Admins = t end) function isPlayerAdmin(player) if(Admins[player]) then return true end return false end function asdi() for k,v in ipairs(Admins) do...
  13. if i create a table, and i insert datas with table.insert, the datas are deleted when i reconnect.. why? how to save datas? sorry for my terrible english :ss
  14. local vehicles = {} addEventHandler("cmdHandler",getRootElement(), function(thePlayer, command) if(command == "/dveh") then for i, v in ipairs (vehicles) do local player, veh = unpack(v) if (player == thePlayer) then destroyElement...
  15. Why the table disappears after the cycle? Never this was not. shel = {} local shelPlaces = { [1] = { [1] = {x=0,y=0,z=0}, [2] = {x=0,y=0,z=0}, [3] = {x=0,y=0,z=0}, }, } function createShelters(gameId, players) local gameId = tonumber(gameId) shel[gameId] = {} for i=1,#shelPlaces do...
  16. Hello, I am scripting a new chat and the stuff I scripted is working. But now I have a problem. In my chat I am printing the first 13 messages in dxDraw. But now I want all indexes to +1, so if there come a 14th message it gets visible. local offset = 14 function drawChat() for i, v in...
  17. Hello, I have been writing gamemode for a long time, everything that is important (information about the vehicle, player, object) is stored on the server side in the table. My question is: what is safer and more optimal? Variables saved on the server side in the table and called to the client by e...
  18. I want create a script, which create a marker with random position, from a table. How to make this?
  19. Hello. As you can see, in my script i attached 2 weapons to a vehicle. I set a bind for shooting one of the gun. My problem is that when i start the function called "fire_gun_c" then both of the weapons will be fired. So my question is how can i only shoot the weapon "gun1" by using getAttachedEleme...
  20. Hey, I have a problem this code working player in server. But no working when player quit. exitLobby = function(self) local previousLobby = getElementData(localPlayer, "player:selectedLobby") if previousLobby then if self.lobbies[previousLobby] then for k,v in ipairs(self.lobbi...
  21. Hello everyone! I am beginner in all of this. I am a hobby scripter, because I have interest in scripting. BUT I have problem. I want to make a skill system(like you shoot a leg you get 1points for that), and I found a free resource that varies your skill up to 999 in server side and I found another...
  22. Hello, I am creating a PIN system on my server and wanted to ask you for help in my code. When I send the client to the server a trigger wanted to validate if the pin sent from the client to the server is an element of my table if yes setElementData will work and the Pin used will be unable to use a...
  23. Hello again. I have problem with table.insert. I have vehicle shop that saves data to tables and tables to element data. Always when you buy new vehicle, it should add sub-table to main-table and fill sub-table with data that i want to save. I also have panel where you can contro...
  24. --[[ -- Resource Name: Information. -- Author: Om (RipeMangoes69) -- Date: 4/12/2016 -- File: client.lua ]]-- -- GUI GUIEditor = { window = {}, label = {}, memo = {} } function createInfoObjects() local markers = { {area = "Los Santos Airport", x = 1582.45, y = -2286.32, z = 12},...
  25. Buenas, estoy creando un sistema de nametags cliente y estoy usando tablas, para que así cuando se loguee/desloguee, se muestre o no el texto en cuestión (el nametag). Todo va correcto, el problema que tengo es a la hora de usar table.insert, que sigue renderizando el nombre local nametags = {...
×
×
  • Create New...