OrbTanT
Members-
Posts
226 -
Joined
-
Last visited
Everything posted by OrbTanT
-
algum erro no debugscript?
-
Aconselho a tabular e identar seus scripts, fazendo isto seus scripts vão ficar com uma aparência melhor e mais organizado, facilitando bastante na hora de arrumar possíveis erros. DNL, não sei se estou correto sobre tabulação e identação. se é assim que chamam corretamente. setPlayerTeam(player, nil) para tirar o jogador da team quando player sair do veiculo. setPlayetTeam(player, team) para colocar o jogador na team quando entrar no veiculo. function TaxiSystemEntrarNoTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then setPlayerTeam(source, getTeamFromName("Taxistas")) destroyElement(BlipsTaxi[source]) setElementData(Taxista,"TaxistaStat",ocupado) end end end addEventHandler ("onPlayerVehicleEnter",getRootElement(),TaxiSystemEntrarNoTaxi) function TaxiSystemSairTaxi(Carro,assento,jacked) if not (getElementModel(Carro) == 420) then return end if not (getElementData(source,"TaxiClient")) then return end if not (assento == 0) then local Taxista = getVehicleController(Carro) if Taxista and getElementData(Taxista,"Taxista") and (getPlayerTeam(Taxista) == getTeamFromName("Taxistas")) then removeElementData(source,"TaxiClient") setElementData(Taxista,"TaxistaStat",vazio) takePlayerMoney(source,tonumber(PrecoTaxi)) givePlayerMoney(Taxista,tonumber(PrecoTaxi)) setPlayerTeam(source, nil) end end end addEventHandler ("onPlayerVehicleExit",getRootElement(),TaxiSystemSairTaxi) bom espero ter ajudado, mais ao ler o script, notei possíveis erros no debug, posso estar enganado. Obs: acabei colocando setPlayerTeam(source, getTeamFromName("Taxistas")), não função errada, por favor mudar e colocar na função da linha 71
-
No caso da team/grupo de taxistas você já tem essa team criada no servidor?
-
me desculpe mas ta realmente muito difícil de entender como esse script funciona. Posso estar enganado, mais não tem source em "setTimer". E também o element player não está sendo definido dentro do timer.
-
[AJUDA] Scripts de gangue, grupo, polica com dinheiro do jogo
OrbTanT replied to [L]ost's topic in Programação em Lua
eu fiz esse comando para criar uma gang, a cor da gang será aleatoria. para mudar o preço para criar uma gang só mudar o valor em local gangCost. local gangCost = 650000 function createGang(player, commandName, commandGang, gangName) if (commandGang == "criar") then if (gangName) then if (getPlayerMoney(player) >= gangCost) then local r, g, b = math.random(0,255), math.random(0,255), math.random(0,255) local team = createTeam(gangName, r, g, b) if (team) then setPlayerTeam(player, team) takePlayerMoney(player, gangCost) outputChatBox("[GANG] "..gangName.." criada com sucesso!!", player, 0, 255, 0) else outputChatBox("Falha ao criar a gang!", player, 255, 0, 0) end else outputChatBox("Dinheiro insuficiente para criar uma gang! Valor: "..tostring(gangCost).." !", player, 255, 0, 0) end else outputChatBox("Digite o nome da gang. Exemplo: /gang criar GroveStreet", player, 255, 0, 0) end end end addCommandHandler("gang", createGang) script server side. Espero ter ajudado. -
Gamemode baseado no jogo BattleGrounds e H1Z1. interessados chamar no discord Orb'Tant#5760 Funciona da seguinte forma: Jogador cria uma conta e customiza seu personagem. Ao customizar seu personagem, o jogador irá cair aleatoriamente no mapa com um paraquedas e procurar por armas, kit medico e analgésicos. Sistema de pickups: ao ficar em cima do pickup o jogador precisa apertar "Tab" para pegar. quando o pickup der respawn novamente será um pickup diferente. Sistema de Cura: Kit medico cura a vida do player até 70, não importa o quão baixa esteja, Analgésicos curam a vida em 20 a cada uso. Para usar o jogador tem que apertar 1 para analgésico e 2 para kit medico e ficar parado até terminar de aplicar. Veículos espalhados pelo mapa, com sistema de combustível, Ao acabar o combustível o motor do veiculo simplesmente não vai funcionar. A cada 10 minutos, o servidor irá soltar um Gás Toxico, escolhendo aleatoriamente umas das cidades principais, como Los Santos, San Fierro ou Las Venturas, para ser a zona segura do mapa, isto serve para aproximar os jogadores para o PvP. A cada 5 minutos irá passar um avião em locais aleatórios no mapa, jogando bombas. A cada 30 minutos, irá passar um avião em locais aleatório, jogando um pacote com Kit de armas. Servidor conta também com um sistema de Headshot, onde tiros na cabeça tiram bem mais vida.
-
Você pode usar setElementData, quando jogador digitar /colocarcinto, ai quando jogador bater, você usa um getElementData, pra verificar se ele está com cinto de segurança, se ele não estiver você tira a vida do jogador usando setElementHealth e getElementHealth.
-
Personal, I would like to know if it is possible to use setGlitchEnabled, to set the glitch only for a specific player, since I made a system of duels and would like to activate only in the duel, duels happen in other dimensions.
-
Atualização 1.0.2 IP: mtasa://144.217.167.81:22003 Correções de bugs: Deathpickups: Um bug foi corrigido quando sua arma for substituída sem sua permissão. Interiors: Todos os teleports interiores foram fixados. Propriedades: Uma propriedade bugada foi removida. Reportado por Simpson Melhorias: Bases: Um limite foi adicionado, agora, para comprar uma base, sua gangue deve ter no mínimo 5 territórios. Sistema de dominação: O código foi completamente recriado e agora irá fornecer um desempenho muito melhor para o servidor e os jogadores! Gang zonas: Gang zonas foram adicionados e agora estão totalmente funcionais! Gang zonas: Um comando e hud foi adicionado para ver quem é dono das gang zonas. (/gangzonas) Villas: Uma nova villa foi adicionada, o que lhe dá um pacote de armas extra em spawn! Villas: Um comando e hud foi adicionado para ver quem é dono das villas. (/villas) Sugerido por Simpson (tópico) Villas: Um painel foi adicionado em cada villa mostrando os benefícios que a villa tem. Smartphone: Um novo aplicativo foi adicionado, permitindo que você transfira dinheiro sem ir ao banco, mesmo para jogadores offline! Veículos especiais: O tanque e outros veículos especiais foram melhorados. Dano de armas: O dano de algumas armas foram editado. Fazendo Sawed-off e M4 mais forte, e tec9 e uzi mais fraco. Mapas: Bases: Escadas foram adicionadas na Base War Ship 69, permitindo que os jogadores para entrar no navio a partir do solo. Eventos: Foram adicionados três novos mapas de eventos.
-
Obrigado!
-
Olá pessoal, Venho convidar a todos para entrarem no recém lançado servidor da Imperial Network, cujo game mode é Gang War, trabalhamos muitos nele e gostaríamos de contar com a presença de todos, para conheçer nosso game mode, nossos sistema, irei colocar uma imagens. IP: mtasa://144.217.167.81:22003 Algumas imagens então em línguas diferentes. Isso ocorre por que o servidor é traduzido em vários idiomas, e não importa de onde você é, ou qual idioma você fala, você vai gostar de jogar no nosso servidor. Painel de Login: Seleção de Skins: Painel de Usuário: Smartphone: Auto Selling: Ammunation: Banco: Propriedades: Sistema de gang: Algumas bases: Novo veiculo especial: Sistema de roupas: Sistema de dominação: Espero a presença de todos, obrigado pela atenção.
-
That's right, it's going to work very well, thanks to everyone who helped
-
Almost this, but thanks for helping.
-
Personally you have tips on how to do this effect on the f11 map of the server, the part of the gas I made working using a marker to show the gas advancing, but wanted to show on the map the area that the gas already dominated and the area of the safe zone, The marker I've made every second goes on to show that the gas is moving forward. I need tips on how to do this on the map. thank you. http://images.akamai.steamusercontent.com/ugc/530632224570612267/6D6C22D06BD55ED57A6CFD0FBCD641CE37DEB610/
-
Really thanks for the help
-
I'm doing a medical kit system where the player has to stand still for 5 seconds and stay in the same position to be able to use the medical kit, even if I'm stopped without moving back I moved, tried to pack In various ways, what is the problem? function isElementMoving ( theElement ) if isElement ( theElement ) then local x, y, z = getElementVelocity( theElement ) return x ~= 0 or y ~= 0 or z ~= 0 end return false end function onPlayerTryUsinKit(player) if(player.type == "player") then isKit = player:getData("kit") if (isKit ~= false) then if not (isPedInVehicle(player)) then isMoving = isElementMoving(player) if (isMoving) then player:outputChat("Você precisa estar parado para usar o Kit Medico!", 255, 255, 0, false) else player:outputChat("Fique parado por 5 segundo para aplicar o Kit Medico", 255, 255, 0, false) posX, posY, posZ = player:getPosition() player:setData("dataX", posX) player:setData("dataY", posY) Timer(useKitMedic, 5000, 1, player) end end else player:outputChat("Você não tem Kit Medico para usar!", 255, 255, 0, false) end end end function useKitMedic(player) dataX = player:getData("dataX") dataY = player:getData("dataY") x, y, z = player:getPosition() if not(x == dataX) and (y == dataY) then player:outputChat("Falha ao usar o Kit Medico! Voce se moveu!", 255, 0, 0, false) else kitTimer = Timer(function(player) health = player:getHealth() player:setHealth(health + 5) end, 1000, 0, player) end end addEventHandler("onResourceStart", resourceRoot, function () local players = getElementsByType("player") for k,v in ipairs(players) do bindKey(v, "K", "down", onPlayerTryUsinKit) end end )
-
I can not use a killTimer, because it uses the timer to check if the players are in the territory or not.
-
Personal, script is working well, only problem is when the two gangs meet in the same territory, it is repeated several times as a message because of the timer, already trying in several ways to run only once. Repeat this several times because of the timer: if ( isOwnerInTurf and isGangInTurf ) then exports.GWgang:outputGangMessage ( "O ataque no territorio "..turfLocs[id].name.." está pausado enquanto as duas gangs estiverem no territorio! Elimine a gang inimiga!", turfLocs[id].attackers, 255, 255, 0) exports.GWgang:outputGangMessage ( "O ataque no territorio "..turfLocs[id].name.." está pausado enquanto as duas gangs estiverem no territorio! Elimine a gang inimiga!", turfLocs[id].owner, 255, 255, 0) setTimer ( function ( ) for id, data in pairs ( turfLocs ) do if ( data.attackers ) then local players = { attackers = { }, owners = { } } local isGangInTurf = false local isOwnerInTurf = false for i, v in pairs ( getElementsWithinColShape ( data.col, "player" ) ) do local g = exports.GWgang:getPlayerGang ( v ) if ( g == data.attackers ) then isGangInTurf = true table.insert ( players.attackers, v ) elseif ( g == data.owner ) then isOwnerInTurf = true table.insert ( players.owners, v ) end end if ( isOwnerInTurf and isGangInTurf ) then exports.GWgang:outputGangMessage ( "O ataque no territorio "..turfLocs[id].name.." está pausado enquanto as duas gangs estiverem no territorio! Elimine a gang inimiga!", turfLocs[id].attackers, 255, 255, 0) exports.GWgang:outputGangMessage ( "O ataque no territorio "..turfLocs[id].name.." está pausado enquanto as duas gangs estiverem no territorio! Elimine a gang inimiga!", turfLocs[id].owner, 255, 255, 0) else -- ADICONAR PONTOS NO ATAQUE if ( isGangInTurf ) then -- PREPARAR A GUERRA if ( turfLocs[id].attackProg == 0 ) then turfLocs[id].prepProg = data.prepProg + 2 if ( turfLocs[id].prepProg >= 100 ) then turfLocs[id].prepProg = 0 turfLocs[id].attackProg = 1 beginTurfWarOnTurf ( id ) end -- ATAQUE GUERRA else turfLocs[id].attackProg = turfLocs[id].attackProg + 1 if ( turfLocs[id].attackProg == 100 ) then exports.GWgang:outputGangMessage ( "Sua gang dominou o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].owner.."!", turfLocs[id].attackers, 0, 255, 0) exports.GWgang:outputGangMessage ( "Sua gang perdeu o territorio "..turfLocs[id].name.." para a gang "..turfLocs[id].attackers.."!.", turfLocs[id].owner, 255, 0, 0) outputChatBox("[TERRITORIOS] A gang "..turfLocs[id].attackers.." dominou o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].owner.."!", root, 255, 100, 100 ) setTurfOwner ( id, turfLocs[id].attackers ) end end -- TIRAR PONTOS DA GANG ATACANTE else -- PREPARANDO ATAQUE if ( turfLocs[id].attackProg == 0 ) then turfLocs[id].prepProg = data.prepProg - 2 if ( turfLocs[id].prepProg <= 0 ) then exports.GWgang:outputGangMessage ( "Sua gang falhou em atacar o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].owner.."!", turfLocs[id].attackers, 255, 0, 0 ) exports.GWgang:outputGangMessage ( "Sua gang defendeu o territorio "..turfLocs[id].name.."!", turfLocs[id].owner..", da gang "..turfLocs[id].attackers..", quando está quase iniciando o ataque", 0, 255, 0 ) setTurfOwner ( id, turfLocs[id].owner ) end -- ATACANDO GUERRA else turfLocs[id].attackProg = data.attackProg - 1 if ( turfLocs[id].attackProg <= 0 ) then exports.GWgang:outputGangMessage ( "Sua gang falhou em dominar o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].owner.."!", turfLocs[id].attackers, 255, 0, 0 ) exports.GWgang:outputGangMessage ( "Sua gang defendeu o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].attackers.."!", turfLocs[id].owner, 0, 255, 0 ) outputChatBox("[TERRITORIOS] A gang "..turfLocs[id].owner.." defendeu o territorio "..turfLocs[id].name.." da gang "..turfLocs[id].attackers.."!", root, 255, 100, 100 ) setTurfOwner ( id, turfLocs[id].owner ) end end end end for i, v in pairs ( players ) do for k, p in pairs ( v ) do triggerClientEvent ( p, "SAGWTurfs:upadateClientInfo", p, turfLocs [ id ] ) end end end end end, 800, 0 ) addEvent ( "SAGWTurfs:onTurfProgressChange", true )
-
Works perfectly, thanks, now I can finish property system
-
Almost did work, but it was returning the sum in the outputChatBox until it arrived in the result, I wanted the outputChatBox to return only the total result, already added local lucre = {1500, 2500, 1000, 5000} local total = 0 function loopLucre(player, comandName) for _,v in pairs(lucre) do total = total + v outputChatBox("My lucre is "..tostring(total), player, 255, 255, 0) end end addCommandHandler("lucre", loopLucre) he returned: My lucre is 1500 My lucre is 4000 My lucre is 5000 My lucre is 10000 I wanted it to just come back: My lucre is 10000
-
Help me, I'm kinda bad that tables, but how can I get the total result of number that are in table for example. local lucre = {1500, 2500, 1000, 5000} I tried to loop in the lucre table, plus it returns each separate value as 1500, 2500, how can I retrieve the table data and add them up before passing through the outputChatBox
-
In function sendpropertiesEarning, I can not find a form of the player receives the profit of all properties together, type [PROPERTIES] you received $ 750000 of your properties
-
Well, I edited gaming nerd 's resource to make a system of profit properties after buying it, it' s all working, part of buying and selling, adding the owner in sql, but I 'm not able to hit part of the profit, can anybody help me. local _setElementData = setElementData function setElementData ( element, group, value ) return _setElementData ( element, group, value, true ) end local propertiesLocs = { } function createProperties ( x, y, z, value, earnings, owner, forcedId, name ) local pickup = createPickup ( x, y, z, 3, 1273, 0) local blip = createBlip ( x, y, z, 31) if ( not forcedId or propertiesLocs [ id ] ) then id = 0 while ( propertiesLocs [ id ] ) do id = id + 1 end else id = forcedId end propertiesLocs[id] = { } propertiesLocs[id].pickup = pickup propertiesLocs[id].blip = blip propertiesLocs[id].owner = owner or "offline" propertiesLocs[id].name = name propertiesLocs[id].value = value propertiesLocs[id].earnings = earnings setBlipVisibleDistance ( propertiesLocs[id].blip, 200 ) setElementData ( propertiesLocs[id].pickup, "propertieId", id ) setElementData ( propertiesLocs[id].pickup, "propertieTable", propertiesLocs [ id ] ) setElementData ( propertiesLocs[id].pickup, "propertieName", propertiesLocs[id].name ) setElementData ( propertiesLocs[id].pickup, "propertieValue", propertiesLocs[id].value ) setElementData ( propertiesLocs[id].pickup, "propertieEarnings", propertiesLocs[id].earnings ) setElementData ( propertiesLocs[id].pickup, "propertieOwner", propertiesLocs[id].owner ) addEventHandler("onPickupHit", propertiesLocs[id].pickup, onPickupPropertieHit) return propertiesLocs[id]; end function onPickupPropertieHit ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" ) then local propertieOwner = getPropertieOwner(id) if ( propertieOwner ~= getPlayerName(player) ) then outputChatBox("[PROPRIEDADES] Digite /comprar . Para comprar esta propriedade!", player, 255, 255, 0, false) else outputChatBox("[PROPRIEDADES] Digite /vender . Para vender esta propriedade!", player, 255, 255, 0, false) end end end function buyPropertie ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" ) then for id, data in pairs ( propertiesLocs ) do if (isElementWithinPickup(player, propertiesLocs[id].pickup)) then local propertieOwner = getPropertieOwner(id) if ( propertieOwner ~= getPlayerName(player) ) then if (getPlayerMoney(player) >= tonumber(propertiesLocs[id].value)) then takePlayerMoney(player, tonumber(propertiesLocs[id].value)) exports.GWsql:db_exec ( "UPDATE propriedades SET owner=? WHERE id=?", getPlayerName(player), id ) outputChatBox("Você comprou a propriedade "..propertiesLocs[id].name.." !.", player, 0, 255, 0, false) setBlipIcon ( propertiesLocs[id].blip, 32 ) setElementData(propertiesLocs[id].pickup, "propertieOwner", getPlayerName(player)) else outputChatBox("Dinheiro insuficiente para comprar está propriedade!", player, 255, 255, 0, false) end else return outputChatBox("Você já é dono desta propriedade!", player, 255, 255, 0, false) end end end end end addCommandHandler("comprar", buyPropertie) function sellPropertie ( player ) if ( player and isElement ( player ) and getElementType ( player ) == "player" ) then for id, data in pairs ( propertiesLocs ) do if (isElementWithinPickup(player, propertiesLocs[id].pickup)) then local propertieOwner = getPropertieOwner(id) if ( propertieOwner == getPlayerName(player) ) then givePlayerMoney(player, tonumber(propertiesLocs[id].value)) exports.GWsql:db_exec ( "UPDATE propriedades SET owner=? WHERE id=?", "offline", id ) outputChatBox("Você vendeu a propriedade "..propertiesLocs[id].name.." !.", player, 0, 255, 0, false) setBlipIcon ( propertiesLocs[id].blip, 31 ) setElementData(propertiesLocs[id].pickup, "propertieOwner", "offline") else outputChatBox("Esta propriedade não é sua!", player, 255, 255, 0, false) end end end end end addCommandHandler("vender", sellPropertie) function getPropertieOwner(id) if (id) then local result = exports.GWsql:db_query("SELECT owner FROM propriedades WHERE id = '".. id .."' "); return result[1]["owner"] end return nil end function isElementWithinPickup(theElement, thePickup) if (isElement(theElement) and getElementType(thePickup) == "pickup") then local x, y, z = getElementPosition(theElement) local x2, y2, z2 = getElementPosition(thePickup) if (getDistanceBetweenPoints3D(x2, y2, z2, x, y, z) <= 1) then return true end end return false end function table.len ( tb ) local c = 0 for i, v in pairs ( tb ) do c = c + 1 end return c end addEventHandler( "onResourceStart", resourceRoot, function ( ) exports.GWsql:db_exec ( "CREATE TABLE IF NOT EXISTS propriedades ( id INT, name VARCHAR(50), value INT, earnings INT, owner VARCHAR(50), x FLOAT, y FLOAT, z FLOAT )" ) local query = exports.GWsql:db_query ( "SELECT * FROM propriedades" ) if ( #query == 0 ) then local data = { -- PROPRIEDADES {"Four Dragons", 135000, 13500, 2022.261352, 1000.560607, 10.820312}, {"Sex Shop", 30000, 3000, 2088.078125, 2078.019042, 11.057899}, {"Snooker Bar", 20000, 2000, 2306.662353, -1643.453735, 14.421875}, {"Caligula's", 150000, 15000, 2195.359619, 1681.807739, 12.367187}, {"Lojas Zip", 25000, 2500, 1461.488281, -1137.913330, 24.068649}, {"Lojas Binco", 20000, 2000, 2248.006591, -1663.412475, 15.469003}, {"Tatoo Shop", 10000, 1000, 2071.049072, -1776.437011, 13.558420}, {"Angel Pine Motel", 15000, 1500, -2194.968017, -2257.319091, 30.677650}, {"Strip Club", 35000, 3500, 2416.866455, -1225.032592, 24.891101}, {"Verdant Meadows Air Strip", 25000, 2500, 418.121002, 2536.876220, 10.000000}, {"Emerald Isle", 100000, 10000, 2127.593994, 2370.425537, 10.820300}, {"The Visage", 125000, 12500, 2022.517944, 1916.684814, 12.339699}, {"Sprunk Factory", 25000, 2500, 1343.197265, 281.531036, 19.561452}, {"The Well Stacked Pizza", 20000, 2000, 212.153274, -204.281005, 1.578125}, {"Lojas Victim", 20000, 2000, 457.403350, -1504.311157, 31.018157}, {"Camel's Toe", 100000, 10000, 2210.599121, 1285.864501, 10.820300}, {"Come-a-Lot", 200000, 20000, 2181.033447, 1116.374877, 12.648400}, {"Autobahn Imports", 40000, 4000, 2201.160888, 1391.220092, 10.820300}, {"The Royal Casino", 80000, 8000, 2088.149902, 1449.090576, 10.820300}, {"The Motel", 50000, 5000, 2087.002197, 2175.820800, 10.820300}, {"Pirates in Mans Pants Hotel", 50000, 5000, 1971.739990, 1623.162963, 12.862400}, {"Las Venturas Bandits Stadion", 135000, 13500, 1477.944702, 2248.830078, 11.023400}, {"Xoomer Corporation", 350000, 35000, 270.562896, 1369.568725, 10.585900}, {"Big Ear Radioteleskop", 15000, 1500, -360.792907, 1593.684448, 76.816497}, {"The King Ring", 20000, 2000, -143.919296, 1224.510009, 19.899200}, {"Jays Diner", 20000, 2000, -1941.351074, 2379.801025, 49.694301}, {"Tee Pee Motel", 25000, 2500, -844.719177, 2746.094726, 46.140899}, {"The Snakefarm", 20000, 2000, -36.079299, 2349.664306, 24.302600}, {"Lojas Pro Laps", 20000, 2000, 503.761077, -1361.570556, 16.125158}, {"Lojas Dider Sachs", 20000, 2000, 451.216705, -1475.865112, 30.720579}, {"Teatro Cathay", 60000, 6000, 1022.766906, -1124.102783, 23.870800}, {"Shopping Verona", 115000, 11500, 1129.056884, -1489.081176, 22.768999}, {"Zero RC Shop", 25000, 2500, -2233.709716, 133.708694, 1035.421020}, {"Jizzy's Club", 50000, 5000, -2244.912597, 132.652008, 35.320312}, {"Country Club", 200000, 20000, -2724.392089, -314.795684, 7.186100}, {"Wang Cars", 90000, 9000, -1957.312377, 302.89239, 35.468799}, {"Hotel", 110000, 11000, -1754.213867, 960.234680, 24.882799}, {"Otto's Autos", 90000, 9000, -1660.478149, 1218.463623, 7.250000}, {"Pink Flamingo Hotel", 50000, 5000, 2010.500610, 1167.573730, 10.820300}, {"The High Roller Casino", 100000, 10000, 1933.024047, 1345.544677, 9.968799}, {"Casa de Carnes Las Venturas", 25000, 2500, 2367.984619, 1983.124267, 10.820300}, {"Las Venturas Casino", 90000, 9000, 2318.662841, 2117.777343, 10.828100}, {"Starfish Casino", 75000, 7500, 2205.292724, 1900.587646, 10.820300}, {"Clowns Pocket Casino", 90000, 9000, 2221.172119, 1839.124267, 10.820300}, {"Tikki Motel", 30000, 3000, 2483.155517, 1527.300048, 11.250399}, {"Estacionamento Central", 50000, 5000, 2310.416015, 1389.879394, 10.820300}, {"Supa Save Supermercado", 50000, 5000, -2442.810058, 753.777587, 35.171901}, {"Tuff Nut Donuts", 20000, 2000, -2766.106201, 788.763916, 52.781299} } outputDebugString ( "SAGWproperties: 0 propriedades -- Generating ".. tostring ( #data ) ) for i, v in pairs ( data ) do x = { ['name'] = v[1], ['value'] = v[2], ['earnings'] = v[3], ['x'] = v[4], ['y'] = v[5], ['z'] = v[6], ['owner'] = "offline" } query[i] = x; exports.GWsql:db_exec ( "INSERT INTO propriedades ( id, name, value, earnings, owner, x, y, z ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )", tostring ( i ), x['name'], tostring ( x['value'] ), tostring ( x['earnings'] ), "offline", tostring ( x['x'] ), tostring ( x['y'] ), tostring ( x['z'] )); end end for i, v in pairs ( query ) do local id, name, value, earnings, owner, x, y, z = tonumber ( v['id'] ), v['name'], v['value'], v['earnings'], v['owner'], tonumber ( v['x'] ), tonumber ( v['y'] ), tonumber ( v['z'] ) createProperties ( x, y, z, value, earnings, owner, id, name ) end end ) function sendPropertieEarning ( ) local playerProperties = { } for i, v in pairs ( propertiesLocs ) do if (not playerProperties[v.lucre]) then playerProperties [ v.lucre ] = 0 else playerProperties [ v.lucre ] = playerProperties [ v.lucre ] + playerProperties [ v.lucre ] end end for i, v in pairs ( getElementsByType ( 'player' ) ) do for n, k in pairs (playerProperties) do local g = getPlayerName ( v ) local owner = k.owner local lucre = tonumber(k.lucre) if ( g == owner ) then givePlayerMoney ( getPlayerFromName(g), tonumber(lucre) ) outputChatBox ( "[PROPRIEDADES]: Você recebeu $"..tostring(lucre).."$ de suas propriedades", getPlayerFromName(v), 0, 255, 0 ) end end end end setTimer ( sendPropertieEarning, (60*tonumber(get("*PAYOUT_TIME")))*1000, 0 )
-
Is working, thank you to all who helped, had not noticed the comma
