Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 661 results

  1. Bom dia Pessoal nao consegui resolver o seguinte erro: #1011 External HTTP file mismatch (Retrying this file with internal HTTP) [admin\client\admin_gui.Lua] ja procurei de tudo e ainda continua o erro o que pode ser isso
  2. Boa Tarde, Precisava saber como que eu faço para criar uma função a onde o jogador coloca o nome do Item ou nome do jogador que aparace na grilist, tipo ele digita as inicias do nome do Item / Nome do jogador e ja procura apenas aquele Item, ele colocando guiCreateEdit
  3. Olá, esse script está crashando o mta de quem entra no servidor podem me ajudar ? local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local vzrx, vzry = (screenW/resW), (screenH/resH) local super = Class("Grid", LuaObject, function() static.font1 = dxCreateFont("utils/font.ttf", vzrx*10) static.font_10 = dxCreateFont("utils/font.ttf", vzrx*10) static.sx, static.sy = guiGetScreenSize() static.constructors = {} end).getSuperclass() local cursorOn; function Grid:init(x, y, w, h, postGUI) self.x = x self.y = y self.w = w self.h = h self.originalH = h self.columHeight = 30 self.itemHeight = 25 self.maxItems = self:getMaxPosition(); -- Max items self.pg = postGUI or false; self.items = {}; self.scrollTop = y + 18 + 2 self.listPos = 0; -- Scroll Level self.mo = nil; -- Mouse-on item self.visible = true -- Visible table.insert(Grid.constructors,self) return self end function Grid:destroy() for k, v in pairs(Grid) do if (v == self) then Grid[k] = nil end end return true end function Grid:setItemText(id, column, text) if self.items[column] and self.items[column][id] then self.items[column][id].text = text end end function Grid:setItemColor(id, column, r, g, b) if self.items[column] and self.items[column][id] then local color = tonumber(b) and tocolor(r, g, b) or tocolor(255, 255, 255) self.items[column][id].color = color end end function Grid:setVisible(visible) self.visible = visible end function Grid:isVisible() return self.visible end function Grid:addColumn(title, width) local data = { info = {title = title, width = width} }; table.insert (self.items, data); return #self.items; end function Grid:RemoveColumn(colum) self.items[colum] = nil; -- Recalculate the highest item count local highest = 0; for _, v in ipairs(self.items) do if #v > highest then highest =(#v - 1); end end return true end function Grid:getColumnCount() return #self.items end function Grid:addItem(colum, text, data, r, g, b) if self.items[colum] then local color = tonumber(b) and tocolor(r, g, b) or tocolor(255, 255, 255) table.insert(self.items[colum], {id = #self.items[colum] + 1, text = tostring(text), data = data, color = color}); self.h = self.columHeight + (self.maxItems*self.itemHeight) return #self.items[colum]; end end function Grid:removeItem( column, id) if self.items[column] and self.items[column][id] then -- Reset the selected item if necessary² if id == self.selected then local newItem = self.selected - 1 if newItem <= #self.items[colum] then self.selected = math.max(0, newItem); else self.selected = 0 end end table.remove(self.items[column], id); return true; end end function Grid:getItemCount(colum) if self.items[colum] then return #self.items[colum] end end function Grid:clear() for k, v in ipairs (self.items) do self.items[k] = {info = v.info} end self.selected = nil end function Grid:getSelectedItem() return self.selected; end function Grid:setSelectedItem (id) if id <= #self.items[1] then self.selected = id; end end function Grid:getItemDetails(column, id) if self.items[column] then if self.items[column][id] then return self.items[column][id].text, self.items[column][id].data end end end function paint() -- Is there any gridlist to render? if (#Grid.constructors > 0) then -- Loop through all grid lists for index, self in ipairs (Grid.constructors) do -- Is the gridlist visible? if self.visible then -- Draw the 'gridlist' itself dxDrawRectangle (self.x, self.y, self.w, self.h, tocolor(0, 0, 0, 0), self.pg); dxDrawRectangle(self.x, self.y + self.columHeight, self.w, self.h - self.columHeight, tocolor(0, 0, 0, 0), self.pg) -- Draw the column bar dxDrawRectangle(self.x, self.y, self.w, self.columHeight, tocolor(0, 0, 0, 0), self.pg) -- ScrollBar local uX, uY, uW = (self.x + self.w) + 1, self.y, 18 local b = 4 --UP Arow --[[ dxDrawRectangle(uX + 1, uY + 1, uW - 1, uW - 1, tocolor(0, 0, 0, 50), self.pg) dxDrawLine(uX + b , uY + uW - b, uX + uW/2, uY + b, tocolor(0, 0, 0, 70), 1, self.pg) dxDrawLine(uX - b + uW, uY + uW - b, uX + uW/2 , uY + b , tocolor(0, 0, 0, 70), 1, self.pg) --dxDrawLine(uX + b , uY + uW - b, uX + uW - b, uY + uW - b, tocolor(0, 0, 0, 70), 1, self.pg) ]] --DOWN Arow local dX, dY, dW, dH = (self.x + self.w) + 1, self.y + (self.h-18) + 1, 18 - 1, 18 - 1 --[[dxDrawRectangle(dX + 1, dY + 1, dW - 1, dW - 1, tocolor(0, 0, 0, 50), self.pg) dxDrawLine(dX + b , dH + dY - dW + b, dX + dW/2, dH + dY - b, tocolor(0, 0, 0, 70), 1, self.pg) dxDrawLine(dX + dW - b , dH + dY - dW + b, dX + dW/2, dH + dY - b, tocolor(0, 0, 0, 70), 1, self.pg) --dxDrawLine(dX + b , dH + dY - dW + b , dX + dW - b , dH + dY - dW + b, tocolor(0, 0, 0, 70), 1, self.pg) ]] --Thumb local x, y, w, h = (self.x + self.w) + 2, self.y + 18 + 2, 18 - 2, self.h - (18*2) - 2 --dxDrawRectangle(x, y, w, h, tocolor(0, 0, 0, 90)) local maxHeight = h self.thumbHeight = math.max(math.min(math.floor(maxHeight * self.maxItems / (#self.items[1])),maxHeight),18) local maxY = (y+h)-self.thumbHeight if (getKeyState("mouse1")) then if (isMouseInPosition(uX, uY, uW, uW)) then if (#self.items[1] > self.maxItems) then self.scrollTop = math.max(y,math.min(self.scrollTop - 1*maxHeight/100, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end elseif (isMouseInPosition(dX, dY, dW, dH)) then if (#self.items[1] > self.maxItems) then self.scrollTop = math.max(y,math.min(self.scrollTop + 1*maxHeight/100, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end end end if drag then local _, cy = getCursorPosition() local cy = cy*Grid.sy self.scrollTop = math.max(y,math.min(cy-space, maxY)) self.listPos = math.floor(((self.scrollTop - y) / (maxHeight-self.thumbHeight) * 100) * (#self.items[1]-self.maxItems) / 100) end local aa = 255 if (isMouseInPosition(x,self.scrollTop,w,self.thumbHeight)) then aa = 110 end -- Set cursorOn variable to the current gridlist, if it's selected self.cursorOn = nil if isMouseInPosition(self.x, self.y, self.w + 18, self.h) then cursorOn = index; end -- Is there any column? if #self.items > 0 then local cWidth = 0 -- Loop through all columns for cIndex, cData in ipairs(self.items) do -- we'll go beyond the gridlist width with this column ? if(( cWidth + cData.info.width) <= self.w) then local x = self.x + cWidth; -- Draw the column title dxDrawText(cData.info.title, x + 10, self.y, cData.info.width + x,(self.columHeight) + self.y, tocolor(255, 255, 255, 220), vzrx*1.4, "arial", "left", "center", true, true, self.pg, true, true); -- Is there any item ? if #cData > 0 then -- Loop the items local k = 0 for i=(self.listPos+1), (math.min(#self.items[1],self.maxItems)+self.listPos) do if cData[i] then -- Draw a rectangle to make it looks like selected dxDrawText(cData[i].text,x + 20,(self.columHeight + self.y)+(self.itemHeight*k),cData.info.width + x,(self.columHeight + self.y)+(self.itemHeight*k) + self.itemHeight, tocolor(255, 255, 255, 200), vzrx*1, Grid.font_10, "left", "center", true, true, self.pg, true, true) if (self.selected == i) then dxDrawRectangle(self.x,(self.columHeight + self.y)+(self.itemHeight*k),self.w,self.itemHeight,tocolor(255, 255, 255, 200), self.pg) dxDrawText(cData[i].text:gsub("#%x%x%x%x%x%x", ""),x + 20,(self.columHeight + self.y)+(self.itemHeight*k),cData.info.width + x,(self.columHeight + self.y)+(self.itemHeight*k) + self.itemHeight, tocolor(0, 0, 0, 220), vzrx*1, Grid.font_10, "left", "center", true, true, self.pg, true, true) end end k = k+1 end end -- Increase cWidth variable (to draw the columns correctly) cWidth = cWidth + cData.info.width; end end end end end end end addEventHandler("onClientRender", root, paint, true, "low-5") function onClientKey(key, press) if isCursorShowing() then if #Grid.constructors > 0 then if cursorOn then local self = Grid.constructors[cursorOn] if press and #key > 6 then if #self.items[1] > self.maxItems then local y = self.y + 18 + 2 local maxHeight = self.h - (18*2) - 2 if (isMouseInPosition(self.x,self.y,self.w+18,self.h)) then if (key == "mouse_wheel_down") then if (#self.items[1] > self.maxItems) then self.listPos = math.ceil(math.max(0,math.min(self.listPos + 1*#self.items[1]/100, #self.items[1]-self.maxItems))) self.scrollTop = y + ((self.listPos / (#self.items[1]-self.maxItems) * 100) * ((maxHeight)-self.thumbHeight) / 100) end elseif (key == "mouse_wheel_up") then if (#self.items[1] > self.maxItems) then self.listPos = math.floor(math.max(0,math.min(self.listPos - 1*#self.items[1]/100, #self.items[1]-self.maxItems))) self.scrollTop = y + ((self.listPos / (#self.items[1]-self.maxItems) * 100) * ((maxHeight)-self.thumbHeight) / 100) end end end end end end end end end addEventHandler("onClientKey", root, onClientKey) function onClientClick(button,state,absoluteX,absoluteY) if (button == "left" and state == "up") then drag = nil else if #Grid.constructors > 0 then if cursorOn then local self = Grid.constructors[cursorOn] local k = 0 for i=(self.listPos+1), (math.min(#self.items[1],self.maxItems)+self.listPos) do if isMouseInPosition(self.x,(self.columHeight + self.y)+(self.itemHeight*k),self.w,self.itemHeight) then self.selected = i end k = k+1 end if (#self.items[1] > self.maxItems) then local x, y, w, h = (self.x + self.w) + 2, self.y + 18 + 2, 18 - 2, self.h - (18*2) - 2 if (isMouseInPosition(x,self.scrollTop,w,self.thumbHeight)) then space = absoluteY-self.scrollTop drag = true elseif(isMouseInPosition((self.x + self.w) + 2,self.y + 18 + 2,18, self.h - (18*2) - 2)) then space = self.thumbHeight/2 drag = true end end end end end end addEventHandler("onClientClick",root,onClientClick) function Grid:getMaxPosition() local pos = 1 while true do if(pos*(24)+(24) <= self.originalH) then pos = pos + 1 else pos = pos - 2 break end end return pos end function isMouseInPosition(x, y, w, h) if (not isCursorShowing()) then return end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ((cx >= x and cx <= x + w) and (cy >= y and cy <= y + h)) end --[[ local grid = Grid(400,150,500,500) local colum = grid:addColumn("Colum",200) for k=1, 80 do grid:addItem(colum,(tostring(k))) end showCursor(true)]]
  4. Olá, o problema que estou enfrentado é que mesmo clicando na window, nas partes que não possuem botão, os dois botões estão sendo executado simultaneamente, mas não quero que isso aconteça, alguém consegue me ajudar? pedestre = createPed(46, 1504.4595947266,-1709.5983886719,14.046875, 270) setElementFrozen(pedestre, true) markerEmprego = createMarker(1504.5090332031,-1709.5562744141,14.046875, "cylinder", 1.5, 255,255,255, 0) janela = guiCreateWindow(0.37, 0.35, 0.25 , 0.2, "PEGAR EMPREGO", true) botao1 = guiCreateButton(0, 0.7, 1.2, 0.28, "FECHAR CONVERSA", true, janela) botao2 = guiCreateButton(0, 0.3, 1.2 , 0.28, "PEGAR O EMPREGO", true, janela) guiWindowSetMovable(janela, false) guiWindowSetSizable(janela, false) guiSetVisible(janela, false) guiSetVisible(botao1, false) guiSetVisible(botao2, false) function cancelarAtaqueEmPed(attacker) cancelEvent() end addEventHandler("onClientPedDamage", getRootElement(), cancelarAtaqueEmPed) function pegarEmprego(hitPlayer) guiSetVisible(janela, true) guiSetVisible(botao1, true) guiSetVisible(botao2, true) showCursor(true) outputChatBox("Olá mundo.") end addEventHandler("onClientMarkerHit", markerEmprego, pegarEmprego) Quem puder me ajudar receberá Thanks! O que está acontecendo: https://prnt.sc/ptvwl3
  5. Preciso de um script de quando você coloca a senha da base ganha TAG automaticamente igual no cidade moderna.
  6. function spawnDayZPlayer(player) if player then local x,y,z = unpack(spawnPositions[math.random(#spawnPositions)]); spawnPlayer(player, x, y, (z+0.5), math.random(360), 73, 0, 0); setCameraTarget(player, player); fadeCamera(player, true); local playerCol = createColSphere(x, y, z, 1.5); setElementData(player, "playerCol", playerCol); attachElements(playerCol, player, 0, 0, 0); setElementData(playerCol, "parent", player); setElementData(playerCol, "player", true); setAccountData(getPlayerAccount(player), "isDead", false); setElementData(player, "isDead", false); setElementData(player, "logedin", true); for _,v in ipairs(playerDataTable) do if (v[1] ~= "radiochannel" and v[1] ~= "gpschannel") then setElementData(player, v[1], v[2]); end end setElementData(player, "logedin", true); setTimer(checkBuggedAccont, (25*1000), 1, player); setElementData(player, "spawnedzombies", 0); end end addEventHandler("kilLDayZPlayer", root, function(killer, headshot, weapon) local account = getPlayerAccount(source); if not account then return; end triggerClientEvent(source, "onClientPlayerDeathInfo", source); killPed(source); triggerClientEvent(source, "hideInventoryManual", source); if not isElementInWater(source) then if (getElementData(source, "alivetime") > 5) then -- If alivetime is bigger than 5 mins, to avoid haveing too much corpses at spawn. local x,y,z = getElementPosition(source); if (getDistanceBetweenPoints3D(x, y, z, 6000, 6000, 0) > 200) then local x,y,z = getElementPosition(source); local _,_,rotz = getElementRotation(source); local skin = getElementModel(source); local ped = createPed(skin, x, y, z, rotz); local pedCol = createColSphere(x, y, z, 1.5); killPed(ped); setTimer(function(ped, pedCol) if ped then destroyElement(ped); end if pedCol then destroyElement(pedCol); end end, (10*60000), 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(); setElementData(pedCol, "deadreason", getPlayerName(source).." is dead. Cause of death: "..(weapon or "Unknown")..". Time of death: "..time.hour..":"..time.minute.." o'clock."); if pedCol then for _,v in ipairs(playerDataTable) do local itemPlus = getElementData(source, v[1]); if (v[1] == "M1911 Mag") then itemPlus = math.floor(getElementData(source, v[1])/10); elseif (v[1] == "M9 SD Mag") then itemPlus = math.floor(getElementData(source, v[1])/15); elseif (v[1] == "Desert Eagle Mag") then itemPlus = math.floor(getElementData(source, v[1])/7); elseif (v[1] == "PDW Mag") then itemPlus = math.floor(getElementData(source, v[1])/30); elseif (v[1] == "MP5A5 Mag") then itemPlus = math.floor(getElementData(source, v[1])/20); elseif (v[1] == "AS50 Mag") then itemPlus = math.floor(getElementData(source, v[1])/40); elseif (v[1] == "CZ550 Mag") then itemPlus = math.floor(getElementData(source, v[1])/10); elseif (v[1] == "Mosin 9130 Mag") then itemPlus = math.floor(getElementData(source, v[1])/35); elseif (v[1] == "M24 Mag") then itemPlus = math.floor(getElementData(source, v[1])/10); elseif (v[1] == "KVSK Mag") then itemPlus = math.floor(getElementData(source, v[1])/15); elseif (v[1] == "M107 Mag") then itemPlus = math.floor(getElementData(source, v[1])/5); elseif (v[1] == "SVD Dragunov Camo Mag") then itemPlus = math.floor(getElementData(source, v[1])/25); elseif (v[1] == "MK 48 Mod 0 Mag") then itemPlus = math.floor(getElementData(source, v[1])/100); elseif (v[1] == "MG36 Mag") then itemPlus = math.floor(getElementData(source, v[1])/100); elseif (v[1] == "PKP Mag") then itemPlus = math.floor(getElementData(source, v[1])/100); elseif (v[1] == "AK-107 Mag") then itemPlus = math.floor(getElementData(source, v[1])/30); elseif (v[1] == "AKS Gold Mag") then itemPlus = math.floor(getElementData(source, v[1])/30); elseif (v[1] == "SA-58V ACOG Mag") then itemPlus = math.floor(getElementData(source, v[1])/30); elseif (v[1] == "AKS-74U Mag") then itemPlus = math.floor(getElementData(source, v[1])/30); elseif (v[1] == "M4A1 Holo Mag") then itemPlus = math.floor(getElementData(source, v[1])/20); elseif (v[1] == "1866 Slug") then itemPlus = math.floor(getElementData(source, v[1])/7); elseif (v[1] == "2Rnd. Slug") then itemPlus = math.floor(getElementData(source, v[1])/2); elseif (v[1] == "SPAZ-12 Pellet") then itemPlus = math.floor(getElementData(source, v[1])/7); elseif (v[1] == "DMR Mag") then itemPlus = math.floor(getElementData(source, v[1])/5); elseif (v[1] == "SKS-45 Mag") then itemPlus = math.floor(getElementData(source, v[1])/10); end if not string.find(v[1], "(Equipped)") then setElementData(pedCol, v[1], itemPlus); end for i = 1, 3 do local item = getElementData(source, "currentweapon_"..tostring(i)); if (item ~= "") then setElementData(pedCol, item, 1); end end end local skin = getSkinNameFromID(getElementData(source, "skin")); setElementData(pedCol, skin, getElementData(pedCol, skin) + 1); local backpack = getBackpackNameFromSlots(getElementData(source, "MAX_Slots")); setElementData(pedCol, backpack, (getElementData(pedCol, backpack) or 0) + 1); end end end end if (killer and killer ~= source and getElementType(killer) == "player") then if (getElementData(source, "htype") ~= "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 (getElementData(source, "htype") == "Bandit") then setElementData(killer, "banditskilled", getElementData(killer, "banditskilled") + 1); end if headshot then setElementData(killer, "headshots", getElementData(killer, "headshots") + 1); end triggerClientEvent("displayClientInfo", root, "#FFFFFF"..getPlayerName(source).." #FFFFFFwas killed by "..getPlayerName(killer), 0, 22, 255); else triggerClientEvent("displayClientInfo", root, "#FFFFFF"..getPlayerName(source).." #FFFFFFwas killed", 0, 22, 255); end setTimer(setElementPosition, 500, 1, source, 6000, 6000, 0); setAccountData(account, "isDead", true); setElementData(source, "isDead", true); setTimer(spawnDayZPlayer, 10000, 1, source); end); addEventHandler("onPlayerQuit", root, function() savePlayerData(source); end); addEventHandler("onResourceStop", root, function() for _,v in pairs(getElementsByType("player")) do savePlayerData(v); end end); [2019-10-30 18:32:05] ERROR: [DayZ-MTA]/DayZ/accounts.Lua:344: attempt to perform arithmetic on a boolean value [2019-10-30 18:32:06] WARNING: [DayZ-MTA]/DayZ/accounts.Lua:344: Bad argument @ 'getElementData' [Expected string at argument 2, got nil] [2019-10-30 18:32:06] ERROR: [DayZ-MTA]/DayZ/accounts.Lua:344: attempt to perform arithmetic on a boolean value [2019-10-30 18:31:02] ERROR: [DayZ-MTA]/DayZ/accounts.Lua:307: attempt to perform arithmetic on a boolean value [2019-10-30 18:31:08] WARNING: [DayZ-MTA]/DayZ/accounts.Lua:307: Bad argument @ 'getElementData' [Expected string at argument 2, got nil] [2019-10-30 18:31:08] ERROR: [DayZ-MTA]/DayZ/accounts.Lua:307: attempt to perform arithmetic on a boolean value https://imgur.com/a/rRBCOHf when I give /kill it kills me and my screen floats and does not respawn me
  7. Quando utilizo: function aoSair(player) outputChatBox("| AVISO | você tem 30 segundos para voltar ao veículo.", player, 255,255,255, true) setTimer (function ( ) destroyElement(source) end, 30000, 1) end addEventHandler("onVehicleExit", getRootElement(), aoSair) o veículo não se destrói. Erro: Expected element at argument 1, got nil. Imagino que o erro aconteça porquê depois do jogador sair, source não é mais veículo, mas não sei como resolver. Outra coisa, estou usando esse método de destruir porque não consigo achar outra opção (sou novato em script). Queria que o veículo retornasse ao seu lugar padrão depois de 30 segundos: pegarEmprego = createMarker(1847.2760009766,-1873.8081054688,12.878125, "cylinder", 2, 255,255,255, 100) ped = createPed(20, 1847.7249755859,-1873.9541015625,13.578125, 90, false) setElementFrozen(ped, true) function mule(BVOMule) car1 = createVehicle(414, 1780.3957519531,-1889.2502441406,13.38960647583,-0, 0, 268.3544921875) car2 = createVehicle(414, 1780.3957519531,-1889.2502441406-5,13.38960647583,-0, 0, 268.3544921875) car3 = createVehicle(414, 1780.3957519531,-1889.2502441406-10,13.38960647583,-0, 0, 268.3544921875) end addEventHandler("onResourceStart", resourceRoot, mule) function aoEntrar(player) skin = getElementModel(player) gEM = getElementModel(source) if ( gEM == 414 ) then if skin == 20 then if getElementData(player, "Entregador") then else outputChatBox("| SERVIÇO | você precisa estar com a skin.", player) cancelEvent() end else end end end addEventHandler( "onVehicleStartEnter", getRootElement(), aoEntrar ) function msgEmprego(hitElement) if getElementType(hitElement) == "player" then if getElementData(hitElement, "Entregador") == false then outputChatBox("#ffffff| EMPREGO | digite #ff0000/conversar #ffffffpara conversar com o entregador.", hitElement, 255,255,25, true) end end end addEventHandler("onMarkerHit", pegarEmprego, msgEmprego) function aoSair(player) outputChatBox("| AVISO | você tem 30 segundos para voltar ao veículo.", player, 255,255,255, true) setTimer (function ( ) destroyElement(source) end, 1000, 1) end addEventHandler("onVehicleExit", getRootElement(), aoSair) function conversarComEntregador(playerSource) if isElementWithinMarker(playerSource, pegarEmprego) then if getElementModel(playerSource) == 20 then outputChatBox("#ffffffENTREGADOR: você já está com a roupa de entregador, pode trabalhar.", playerSource, 255,255,255, true) else outputChatBox("#ffffffENTREGADOR: lhe dei a roupa de entregador, pode ir trabalhar.", playerSource, 255,255,255, true) setPlayerSkin(playerSource, 20) setElementData(playerSource, "Entregador", true) end end end addCommandHandler("conversar", conversarComEntregador)
  8. 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...
  9. Привет всем! Помогите, пожалуйста! Вопрос к тем, кто разбирается в PHP. Собственно вопрос в следующем: На сайте luac.mtasa.com в разделе API имеется руководство по обфускации Lua скриптов через сам Lua скрипт: local FROM="example.Lua" local TO="compiled.Lua" fetchRemote( "http://luac.mtasa.com/?compile=1&debug=0&obfuscate=3", function(data) fileSave(TO,data) end, fileLoad(FROM), true ) Предположим, на моём сайте лежит скрипт: $file_name = "my_script.Lua"; Как можно "скомпилировать" данный скрипт на PHP? Возможно, что через curl, но как его использовать в PHP я не знаю. Прошу помощи! Спасибо.
  10. I'm creating a blitz script, I already created the object, but I would like to delete this object and I don't know how. Could someone help? Script >< function Criarobjeto() local px, py, pz = getElementPosition ( getLocalPlayer ()) createObject(id, px, py, pz) end addCommandHandler("ob", Criarobjeto)
  11. I would like someone to help me with this script. I wanted to make a cmd that would give gas to the player without having to be in the stocking marker. I created the script but I do not know why it does not work. I'm new to scirpt and forum. >>>> script >>>>> https://www.mediafire.com/file/fzrbkj6zmba80x3/abasteceradm.Lua/file
  12. Boa Tarde, eu fiz um sistema de packet Loos e coloquei com timer no clado CLIENT, funcionou normal so que ai da network no servidor e quando volta ele nao manda o kik para o lado SERVER. Existe alguma função que derrube o jogador sem kikar ele? Um exemplo dar perda de pacote e ele ser expulso com aquela mensagem (tempo do servidor foi interrompida) OBRIGADO
  13. tô procurando um mod de Punir com Painel simples ou tanto faz, alguem né ajudar?
  14. Preciso de ajuda estou mexendo em um mod de armas que transfere de um jogador para outro mas n consegui colocar preço pra vender alguém me ajuda ===Client=== -- Script Criado by Torugo -- -- www.Modsbr-MTA.blogspot.com.br -- -- Obrigado por Baixar ;D -- local KEY = "F6" -- Hot Key outputChatBox("#0ffff0 Sistema de Armas criado por Torugo",255,0,0,true) -- My Right's ( Don't Change it ) -- ## Important Functions function centerWindow(center_window) -- local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end function getPedWeapons(ped) -- local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=2,9 do local wep = getPedWeapon(ped,i) if wep and wep ~= 0 then table.insert(playerWeapons,wep) end end else return false end return playerWeapons end -- ## Main Window ## wnd = guiCreateWindow(202,74,427,458,"Sistema de Transferir Armas",false) players_grid = guiCreateGridList(0.0211,0.0546,0.4707,0.9258,true,wnd) guiGridListSetSelectionMode(players_grid,1) guiGridListAddColumn(players_grid,"Pessoas...",0.9) weapons_grid = guiCreateGridList(0.5035,0.0546,0.4707,0.5415,true,wnd) guiGridListSetSelectionMode(weapons_grid,1) guiGridListAddColumn(weapons_grid,"Armas",0.6) guiGridListAddColumn(weapons_grid,"Municao",0.3) info = guiCreateLabel(0.5012,0.6092,0.4707,0.0699,"Digite o valor da municao",true,wnd) guiLabelSetColor(info,0,255,0) guiLabelSetVerticalAlign(info,"center") guiLabelSetHorizontalAlign(info,"center",false) guiSetFont(info,"default-bold-small") ammo = guiCreateEdit(0.5035,0.679,0.4731,0.0852,"",true,wnd) send = guiCreateButton(0.5035,0.7838,0.4731,0.0895,"Enviar Armas",true,wnd) guiSetFont(send,"default-bold-small") close = guiCreateButton(0.5035,0.8843,0.4731,0.0895,"Fechar",true,wnd) guiSetFont(close,"default-bold-small") guiSetVisible(wnd,false) centerWindow(wnd) bindKey(KEY,"down", function () if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(wnd,true) showCursor(true) guiSetInputEnabled(true) putPlayers() putWeapons() end end ) function putPlayers() guiGridListClear(players_grid) for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(players_grid) guiGridListSetItemText(players_grid,row,1,getPlayerName(player),false,false) end end function putWeapons() guiGridListClear(weapons_grid) for _,weapon in ipairs(getPedWeapons(localPlayer)) do if getPedTotalAmmo(localPlayer,getSlotFromWeapon(weapon)) > 0 then local row = guiGridListAddRow(weapons_grid) guiGridListSetItemText(weapons_grid,row,1,getWeaponNameFromID(weapon),false,false) guiGridListSetItemText(weapons_grid,row,2,getPedTotalAmmo(localPlayer,getSlotFromWeapon(weapon)),false,false) end end end function RefreshLists() putPlayers() putWeapons() end addEventHandler("onClientGUIClick",close, function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ,false) addEventHandler("onClientGUIClick",send, function () local sel_1 = guiGridListGetSelectedItem(players_grid) local sel_2 = guiGridListGetSelectedItem(weapons_grid) if sel_1 ~= -1 and sel_2 ~= -1 then local PlayerName = guiGridListGetItemText(players_grid,sel_1,1) local player = getPlayerFromName(PlayerName) if isElement(player) then if player ~= localPlayer then local WeaponName = guiGridListGetItemText(weapons_grid,sel_2,1) local WeaponAmmo = guiGridListGetItemText(weapons_grid,sel_2,2) local WeaponID = getWeaponIDFromName(WeaponName) local Ammo = guiGetText(ammo) if tonumber(Ammo) and tonumber(Ammo) >= 10 then if tonumber(WeaponAmmo) >= tonumber(Ammo) then setTimer(RefreshLists,500,1) triggerServerEvent("SendWeapon",localPlayer,player,WeaponID,Ammo) else outputChatBox("Erro: Você não tem munição suficiente para esta arma",255,0,0) end else outputChatBox("Error: Escreva um número na Editar",255,0,0) end else outputChatBox("Erro: Não é possível enviar Arma Para Seu Auto",255,0,0) end else RefreshLists() outputChatBox("Error: Jogador não encontrado, Lists refrescado",255,0,0) end end end ) fileDelete("Client.Lua") ===Server=== -- Script Criado por Torugo -- -- www.Modsbr-MTA.blogspot.com.br -- -- Obrigado por Baixar ;D -- addEvent("SendWeapon",true) addEventHandler("SendWeapon",root, function (player,id,ammo) local id = tonumber(id) local ammo = tonumber(ammo) giveWeapon(player,id,ammo) takeWeapon(source,id,ammo) outputChatBox("#ffffff Enviou #ff0000" .. getWeaponNameFromID(id) .. "#ffffffPara #ff0000" .. getPlayerName(player),source,255,0,0,true) outputChatBox("# " .. getPlayerName(source) .. " #ffffffEnviou #ff0000" .. getWeaponNameFromID(id) .. " #ffffffPara você com #ff0000" .. ammo .. " #FFFFFFMunição",player,255,0,0,true) end ) ===Meta=== <meta> <info author="Torugo" name="Sistema de Transferir armas" version="1.0.0" type="script" /> <script src="Client.Lua" type="client" /> <script src="Server.Lua" type="server" /> </meta> se alguém puder me ajudar
  15. Boa noite meus querido, alguns dias atrás, me cadastrei no fórum a procura de conhecimento.. estava com muita dificuldade para modificar um script simples e vim procurar ajuda no forum. Assim, várias pessoas me ajudaram, até o moderador do fórum português ❤️. Muito obrigado pela ajuda para solucionar este script.. vou mostrar o script antes e depois da modificação que me ajudaram a solucionar. Primeiro código antes da modificação! function DAR_XP_AIRNEWSCR ( source, cmd, pname, Quantidade ) if pname and tonumber(Quantidade) then local cliente = getPlayerFromPartialName(pname) if isElement(cliente) then if getElementData ( source, "Console_AirNewSCR" ) == "Sim" then setElementData ( cliente, "Level", Quantidade ) exports.Scripts_Dxmessages:outputDx(source, "Você Setou o Level do(a) Jogador(a) "..getPlayerName(cliente).."#ffffff para "..Quantidade.." com Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "O(A) Admin "..getPlayerName(source).."#ffffff Setou seu Level para "..Quantidade.." com Sucesso!", "success") end else exports.Scripts_Dxmessages:outputDx(source, "O Jogador Não Foi Encontrado", "error") end end end addCommandHandler ( "level", DAR_XP_AIRNEWSCR ) Código modificado ficou assim usando o comando /level "nomeDoPlayer" "level" function DAR_XP_AIRNEWSCR ( source, cmd, pname, Quantidade ) if pname and tonumber(Quantidade) and (isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Console"))) then local cliente = getPlayerFromPartialName(pname) if isElement(cliente) then setElementData ( cliente, "Level", tonumber(Quantidade) ) exports.Scripts_Dxmessages:outputDx(source, "Você Setou o Level do(a) Jogador(a) "..getPlayerName(cliente).."#ffffff para "..Quantidade.." com Sucesso!", "success") exports.Scripts_Dxmessages:outputDx(cliente, "O(A) Admin "..getPlayerName(source).."#ffffff Setou seu Level para "..Quantidade.." com Sucesso!", "success") else exports.Scripts_Dxmessages:outputDx(source, "O Jogador Não Foi Encontrado", "error") end end end addCommandHandler ( "level", DAR_XP_AIRNEWSCR ) Agora estou com com um novo Script usando o mesmo data "Console_AirNewSCR" e quero saber se tem como eu modificar ele para dar vip usando o comando /ativar "nomeDoPlayer" "tipodovip""dinheiro" e quantos dias irá durar o vip. estou contando com a ajuda desse fórum que tem ótimos scripts que tem um conhecimento um mais avançado que eu . Meu muito obrigado dês de já! 🔝 Comando_VIP = "ativar" Grupo = "Console" -- Grupo no Painel P ( Manage ACL ) 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 Dar_VIP_AirNewSCR ( source, cmd, player, VIP, Dinheiro ) if getElementData ( source, "Console_AirNewSCR" ) == "Sim" then if player and VIP then local Jogador = getPlayerFromPartialName ( player ) if Jogador then if not isGuestAccount ( getPlayerAccount ( Jogador ) ) then local Conta = getAccountName ( getPlayerAccount ( Jogador ) ) if VIP == "Alpha" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Alpha" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Alpha", source, 255, 255, 255, true ) end elseif VIP == "Epsylon" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Epsylon" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Epsylon", source, 255, 255, 255, true ) end elseif VIP == "Sigma" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Sigma" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Sigma", source, 255, 255, 255, true ) end elseif VIP == "Omega" then if isObjectInACLGroup ("user."..Conta, aclGetGroup ( "Omega" ) ) then return outputChatBox ( "* Erro: Esse Jogador já é VIP Omega", source, 255, 255, 255, true ) end end if VIP == "Alpha" or VIP == "Epsylon" or VIP == "Sigma" or VIP == "Omega" then --return outputChatBox ( "* Erro: Esse VIP não existe!", source, 255, 255, 255, true ) --end aclGroupAddObject ( aclGetGroup( VIP ), "user."..Conta ) Musica_Selecionada = math.random ( 1, 3 ) triggerClientEvent ( root, "AirNewSCR_Ativar_VIP", root, Musica_Selecionada, VIP ) if Musica_Selecionada == 1 then --outputChatBox ( "Arquivos/Rae_Sremmurd_Black_Beatles_ft_Gucci_Mane.mp3", source ) Musica_Tocando = "Rae Sremmurd - Black Beatles ft. Gucci Mane" Bonus = 0 elseif Musica_Selecionada == 2 then --outputChatBox ( "Arquivos/Post_Malone_Congratulations_ft_Quavo.mp3", source ) Musica_Tocando = "Post Malone - Congratulations ft. Quavo" Bonus = 50 elseif Musica_Selecionada == 3 then --outputChatBox ( "XXXTENTACION_Look_At_Me.mp3", source ) Musica_Tocando = "XXXTENTACION - Look At Me!" Bonus = 100 end setElementData ( root, "Ultimo_Ativador", getPlayerName(Jogador) ) setElementData ( root, "VIP_do_Ultimo_Ativador", VIP ) outputChatBox ( " ", root ) outputChatBox ( " ", root ) outputChatBox ( "=======================================================", root, 255, 255, 255, true ) outputChatBox ( "* O(A) Jogador(a) "..getPlayerName(Jogador).." #ffffffAtivou um Plano VIP "..VIP, root, 255, 255, 255, true ) if Bonus == 0 then outputChatBox ( "* Seu Bonus de Ativação foi de "..Bonus.."%, Não foi dessa vez!", root, 255, 255, 255, true ) outputChatBox ( "* O(A) Jogador(a) Recebeu 1kk pela Ativação do VIP", root, 255, 255, 255, true ) if Dinheiro ~= false then givePlayerMoney ( Jogador, 1000000 ) givePlayerMoney ( Jogador, 0 ) end elseif Bonus == 50 then outputChatBox ( "* Seu Bonus de Ativação foi de "..Bonus.."%, +50% de 1kk (1kk500k)", root, 255, 255, 255, true ) outputChatBox ( "* O(A) Jogador(a) Recebeu 1kk pela Ativação do VIP (+500k Bonus)", root, 255, 255, 255, true ) if Dinheiro ~= false then givePlayerMoney ( Jogador, 1000000 ) givePlayerMoney ( Jogador, 500000 ) end elseif Bonus == 100 then outputChatBox ( "* Seu Bonus de Ativação foi de "..Bonus.."%, +100% de 1kk (2kk)", root, 255, 255, 255, true ) outputChatBox ( "* O(A) Jogador(a) Recebeu 1kk pela Ativação do VIP (+1kk Bonus)", root, 255, 255, 255, true ) if Dinheiro ~= false then givePlayerMoney ( Jogador, 1000000 ) givePlayerMoney ( Jogador, 1000000 ) end end outputChatBox ( "* Musica Tocando: "..Musica_Tocando, root, 255, 255, 255, true ) outputChatBox ( "=======================================================", root, 255, 255, 255, true ) outputChatBox ( " ", root ) outputChatBox ( " ", root ) outputDebugString ( "[ Ativação ] - O(A) Admin "..getPlayerName(source).." Ativou um VIP para o(a) Jogador(a) "..getPlayerName(Jogador).."!" ) outputDebugString ( "[ Ativação ] - Bonus do VIP Gerado: "..Bonus.."%" ) setTimer ( function() restartResource ( getThisResource ( ) ) -- Reinicia o Mod Automaticamente! outputDebugString ( "[ AirNewSCR ] - Resource 'Scripts_AtivarVIP' Reiniciado Automaticamente! " ) end, 15000, 1 ) end end else outputChatBox ( "* Erro: Jogador não encontrado!", source, 255, 255, 255, true ) end end end end addCommandHandler ( Comando_VIP, Dar_VIP_AirNewSCR ) function Verificar_Emprego_Atual ( ) for i, player in ipairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementData ( player, "Console_AirNewSCR", "Sim" ) else setElementData ( player, "Console_AirNewSCR", "Não" ) end end end end setTimer ( Verificar_Emprego_Atual, 1500, 0 ) -- By AirNewSCR
  16. Quero por outro marcador e outro spawn de carro, pra ficar 2 spawns, mais sempre buga e fica somente 1 ou buga e fica 2 marcadores e 1 veiculo, aqui esta o script com 1 spawn de carro, eu quero colocar outro spawn iniMarker = createMarker( 163.7912902832, 1808.8654785156, 16.640625, "cylinder", 3.5, 200,225,1,50) destroyM = createMarker( 127.0807723999, 1809.0919189453, 16.640625, "cylinder", 3.9, 255,255,255,100) function msg(player) outputChatBox("#FFD700»Você Pegou Um Carro Do #00FF00Exécito Brasileiro«", player, 255,255,255,true) end addEventHandler("onMarkerHit", iniMarker, msg) veh = {} function spawnVehicle(player) if isElementWithinMarker(player, iniMarker) then if veh[player] and isElement( veh[player] ) then destroyElement(veh[player]) veh[player] = nil end veh[player] = createVehicle(490, 157.12101745605, 1822.6125488281, 17.640625) warpPedIntoVehicle(player, veh[player]) end end addEventHandler("onMarkerHit", iniMarker, spawnVehicle) function msgDestroy(player) outputChatBox("Voce Destroiu o Carro Do #00FF00Exécito Brasileiro", player, 255,255,255,true) end addEventHandler("onMarkerHit", destroyM, msgDestroy) function destroy(player) if isElementWithinMarker(player, destroyM) then if isPedInVehicle(player) == true then destroyElement(veh[player]) outputChatBox("", player, 255,255,255,true) else outputChatBox("", player, 255,255,255,true) end end end addEventHandler("onMarkerHit", destroyM, destroy)
  17. Hello everyone! Can you help me, please? Question to those who understand PHP. Actually the question is as follows: On the site luac.mtasa.com in the API section there is a guide to compile Lua scripts by the Lua script itself: local FROM= "example.Lua" local TO= "compiled.Lua" fetchRemote("http://luac.mtasa.com/?compile=1&debug=0&obfuscate=3", function(data) fileSave(TO, date) end, fileLoad(FROM), true) Suppose there is a script on my website: $file_name = "my_script.Lua"; How can I compile this script in PHP? Maybe it is possible by using curl, but how to use it in PHP I don't know. Please help! Thanks.
  18. Boa Tarde, preciso de ajuda num script que salva kill e HS total so que nao ta salavando, quando player desloga do servidor zera tudo, salva a conta por serial ----- Login Playerd2 = db_query( "SELECT * FROM players WHERE account=? LIMIT 1", getPlayerSerial(player)) if Playerd2 and #Playerd2 > 0 then setPlayerMoney(player, Playerd2[1]["mwcTotal"] or 0) setElementData( player, "zombieskilled_total", Playerd2[1]["ZombiesTotal"]) setElementData( player, "murders_total", Playerd2[1]["MurdesTotal"]) setElementData( player, "alivetime_total", Playerd2[1]["AliveTime"]) setElementData( player, "headshotsz_total", Playerd2[1]["hsTotal"] ) setElementData( player, "headshotsp_total", Playerd2[1]["HsSPTotal"]) setElementData( player, "banditskilled_total", Playerd2[1]["BanditTotal"]) end setElementData(player, "logedin", true) --- Salvamento por serial addEventHandler("onElementDataChange",getRootElement(),function() if getElementType(source) == "player" then if getElementData ( source, "logedin" ) then local mwcTotal = getPlayerMoney(source) local zombiet = getElementData( source, "zombieskilled_total" ) local murdest = getElementData( source, "murders_total" ) local alivet = getElementData( source, "alivetime_total" ) local heatt = getElementData( source, "headshotsz_total" ) local heatst = getElementData( source, "headshotsp_total" ) local banditt = getElementData( source, "banditskilled_total" ) local d = db_query( "SELECT * FROM players WHERE account=? LIMIT 1", getPlayerSerial(source) ) -- if d and zombiet and murdest and alivet and heatt and heatst and banditt then -- if d and #d > 0 then -- dbExec( dbLevel, "DELETE FROM players WHERE account=?", getPlayerSerial(source)) -- end if not SQLite_Check(getPlayerSerial(source)) == true then outputChatBox("#FF0000[MW DAYZ ] - #ffffffPress #ff0000'enter' #ffffffto set up a Tent.",getRootElement(),255,255,255,true) dbExec(dbLevel, "INSERT INTO players (account, mwcTotal, ZombiesTotal, MurdesTotal, AliveTime, hsTotal, HsSPTotal, BanditTotal) VALUES(?,?,?,?,?,?,?,?)",getPlayerSerial(source), mwcTotal or 0, zombiet or 0,murdest or 0,alivet or 0,heatt or 0, heatst or 0, banditt or 0) else dbExec(dbLevel, "UPDATE players SET mwcTotal=?, ZombiesTotal=?, MurdesTotal=?, AliveTime=?, hsTotal=?, HsSPTotal=?, BanditTotal=? WHERE account=?",mwcTotal ,zombiet, murdest,alivet,heatt,heatst,heatst,banditt, getPlayerSerial(source)) end -- end end end end)
  19. estou querendo colocar uns 10 lugares diferentes para spawnar o carro addEvent("WarpMyVehicle", true) addEventHandler("WarpMyVehicle", root, function(id) if not isPedInVehicle (source) then if getElementInterior(source) == 0 then if getPlayerMoney(source) >= tonumber(3500) then local vehicle = getVehicleByID(id) if isElement(vehicle) then takePlayerMoney ( source, 3500 ) local x, y, z = getElementPosition(source) setElementPosition(vehicle, 1649.334, -1079.972, 23.898) outputMessage ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[getElementModel(vehicle)] or getVehicleNameFromModel(getElementModel(vehicle))).." #c1c1c1foi entregue a você.", source, 38, 122, 216, true) else outputMessage("#c1c1c1O seu veiculo não está spawnado.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Você não tem os meios de se teletransportar para o veiculo.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Você só poderá mudar de veiculo se sair do atual.", source, 38, 122, 216, true) end else outputMessage("#c1c1c1Nós não podemos dirigir seu veiculo. Por favor, sair do outro veiculo.", source, 38, 122, 216, true) end end)
  20. Boa Tarde, Gostaria de saber qual função devo usar para querer colocar uma mensagem no chat exemplo: Jogado X saiu do Servidor (Ping Alto) usando essa função aqui "Kicked" addEventHandler('onPlayerQuit', g_Root, function(reason) if (reason == "Quit") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Saiu#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Timed out") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Net caiu#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Banned") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Banido#FFFFFF]', getRootElement(), 126, 192, 238, true) elseif (reason == "Kicked") then outputChatBox('['..getPlayerCount()..'#FFFFFF / #7EC0EE'..getMaxPlayers()..'] '..getPlayerName(source)..' #FFFFFFSaiu do Servidor! Motivo [#FF0000Chutado#FFFFFF]', getRootElement(), 126, 192, 238, true) end end )
  21. Olá, quero colocar um dxDrawRectangle que vai carregando pro conforme o tempo do "setTimer" vai passando poderia me ajudar?
  22. I created a script to set texture when player joins the car, (EngineApplyShaderToWorldTexture), but work only client-side, i wanna other players see the texture from the car, not only the local player see self texture. How i can create a script like this?
  23. Gostaria de Saber,Como Usar o ToggleControl para Desativar O Tiro de uma Arma.
  24. Ai rapaziada não sei porque mas esse sistema de trampo por level não quer funcionar. Tipo eu consigo pegar um emprego de level 20 com o Level 0. se alguém saber o porque pfv me ajuda. function Petroleiro () local Level = getElementData ( source, "Level" ) or 20 if Level >= 20 then TudoInvisivel () setElementVisibleTo ( Petroleiro, source, true ) setElementData ( source, "Encaminhamento", "Petroleiro" ) outputChatBox ( "Você foi aceito no Emprego de Petroleiro", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) end end addEvent( "Encaminhar>Petroleiro", true ) addEventHandler( "Encaminhar>Petroleiro", getRootElement(), Petroleiro )
  25. When I quit from server my ElementData gived isn't saved. I tried to do this code to save, follow: function SalvarDadosLogout (source) local ObterGalao = getElementData(source, "galao") local conta = getPlayerAccount (source) setAccountData(conta, "galao", ObterGalao) end addEventHandler("onPlayerQuit", root, SalvarDadosLogout) function DarDadosLogin (source) local conta = getPlayerAccount (source) local TemGalao = getAccountData(conta, "galao") setElementData(source, TemGalao) end addEventHandler("onPlayerLogin", root, DarDadosLogin)