Jump to content

ZaaKScripter

Members
  • Posts

    19
  • Joined

  • Last visited

Details

  • Gang
    Groove Street
  • Location
    Vinewood
  • Occupation
    Cluckin bell's CEO
  • Interests
    Development

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ZaaKScripter's Achievements

Square

Square (6/54)

0

Reputation

  1. Ja dei uma olhada nela recentemente sobre isso, foi la onde peguei os exemplos pra poder colocar no código, teste com o isObjectInACLGroup e com o isPlayerInACL, todas as duas retornam o erro do (a nil value), não sei no que to errando, vou mandar abaixo o script client completo. A função de revistar está na linha 819
  2. é client-side @Lord Henry outra maneira que tambem tentei refazer o script foi a seguinte: function getPlayerFromAccountID (ID) local acc = getAccountByID(ID) if not acc or isGuestAccount(acc) then return false end return getAccountPlayer(acc) end addCommandHandler("revistar", function(source, command, id) if isObjectInACLGroup ("user." .. getPlayerAccount (getPlayerName), ("Policial")) then local targetPlayer, targetPlayerName = getPlayerByID(id) outputChatBox("#4169E1[Use]#FFFFFF /revistar [ID]", 255, 255, 255, true) if (targetPlayer) then openInventory(targetPlayer) else outputChatBox ("Você não é policial", localPlayer) end end end) e deu o mesmo erro anterior @Lord Henry
  3. Pessoal, consegui um inventario um pouco parecido com o do BGO, entao queria editar uma função de revistar nele para que os policiais podessem ver o inventario dos outros jogadores, editei a função certinha para que só quem pudesse ter acesso seria quem estivesse na ACL policial, segue o codigo abaixo: addCommandHandler("revistar", function(c, target, localPlayer) local accountname = getAccountName (getPlayerAccount(localPlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Policial" ) ) then --if getElementData(localPlayer, "conta:staff") == "Sim" then -- ESSE ERA A ANTIGA LINHA QUE TINHA ANTES DE EU ALTERAR PARA A ACL local targetPlayer, targetPlayerName = exports.faithCharacter:findPlayer(localPlayer, target) outputChatBox("#4169E1[Use]#FFFFFF /revistar [ID]", 255, 255, 255, true) if (targetPlayer) then openInventory(targetPlayer) end end end) fiz ela dessa maneira, porem sempre que utilizo o "/revistar" aparece o seguinte erro no debugscript: attempt to call global 'getPlayerAccount' (a nil value). Ja tentei diversas formas, utilizando o isPlayerInACL, o accname juntamento com o isObjectInACLGroup que tem na wiki e etc, e todos eles retornaram o mesmo erro no debugscript, não tenho mais a minima ideia do que possa ser. Caso queiram eu posso postar os codigos do script client e server completo aqui.
  4. Como ficaria esse código +-? Sou novo em script ainda...
  5. Galera, queria saber criar uma parede invisível pra um sistema de assalto, pra que assim que o player assaltar a loja, criar uma parede na entrada que só sumiria após 2 minutos, como eu poderia fazer isso?
  6. Galera, to tentando editar um script de enviar dinheiro para que ao invés de enviar dinheiro normal, ele envie dinheiro sujo, porem quando eu tento enviar algo ele da erro no debug e não envia nada. Abaixo está os scripts. Client Side local screenW,screenH = guiGetScreenSize() local px,py = 1366,768 local x,y = (screenW/px), (screenH/py) local Jogador = getPlayerFromName(name) local sujo = getElementData(source, "EmentDinheiroSujo") function centerWindow ( center_window ) local sx, sy = guiGetScreenSize ( ) local windowW, windowH = guiGetSize ( center_window, false ) local z, t = ( sx - windowW ) /2, ( sy - windowH ) /2 guiSetPosition ( center_window, z, t, false ) end give = false take = false perevod = false pricedit = false priceedit = 0 spicok = false name = "" player = nil fontname = dxCreateFont("dl/robotor.ttf", 17 ) local localPlayer = getLocalPlayer() local function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition() -- relative local cursorx,cursory = mx*screenW,my*screenH if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true end end return false end local open = false function openWindow() if open == false then open = true showCursor(true) centerWindow(window) guiSetVisible(window, true) name = "" addEventHandler("onClientRender", getRootElement(),spicok ,pricedit) elseif open == true then progress = 0 removeEventHandler("onClientRender", getRootElement(), spicok) guiSetVisible(window, false) showCursor(false) open = false end end bindKey('f5', 'down', openWindow ) local iGridX, iGridY, iGridW, iGridH = 450*x,355*y,150*x,35*y local iCurrentCell = 0 --function Draw() local iCellHeight = 25*y iVisibleRows = 6 window = guiCreateStaticImage(0*x,0*y,500*x,280*y,"dl/window.png", false) guiSetVisible(window, false) function spicok () --dxDrawText("Saldo: "..getPlayerMoney(localPlayer).." руб.", 1200*x, 650*y, 414*x, 38*y, tocolor(163,163,163), 5*x, "default", "center", "center",false,false,true,false) dxDrawText('Transferência de dinheiro: '..name, 630*x, 600*y, 414*x, 38*y, tocolor(0,0,0), 0.8*x, fontname, "left", "center",false,false,true,false) dxDrawText('Antes de transferir', 650*x, 785*y, 414*x, 38*y, tocolor(76,76,82), 0.8*x, fontname, "left", "center",false,false,true,false) dxDrawText('verifique se você digitou', 630*x, 815*y, 414*x, 38*y, tocolor(76,76,82), 0.8*x, fontname, "left", "center",false,false,true,false) dxDrawText('a quantidade certa! ', 670*x, 845*y, 414*x, 38*y, tocolor(76,76,82), 0.8*x, fontname, "left", "center",false,false,true,false) dxDrawText('Transferência de dinheiro', 590*x, 500*y, 414*x, 38*y, tocolor(255,255,225), 1.2*x, fontname, "left", "center",false,false,true,false) dxDrawText('Quantidade de dinheiro', 630*x, 660*y, 414*x, 38*y, tocolor(192,192,192), 0.55*x, fontname, "left", "center",false,false,true,false) dxDrawText('Lista de jogadores', 455*x, 600*y, 414*x, 38*y, tocolor(112,112,118), 0.7*x, fontname, "left", "center",false,false,true,false) dxDrawImage( 630*x,360*y,290*x,33*y,"dl/edit2.png", 0, 0, 0, tocolor(255, 255, 255, 255) ,true) dxDrawImage( 645*x,465*y,250*x,38*y,"dl/btn4.png", 0, 0, 0, tocolor(255, 255, 255, 255),true) dxDrawText("Transferir", 710*x, 930*y, 414*x, 38*y, tocolor(255,255,255), 1*x, fontname, "left", "center",false,false,true,false) for i = iCurrentCell, iVisibleRows+iCurrentCell-1 do visibleI = i - iCurrentCell if drawIn then if i == drawIn then dxDrawImage(iGridX, iGridY+iCellHeight*visibleI, iGridW, iCellHeight, "dl/btn_name.png", 0, 0, 0, tocolor(255, 255, 255, 255) ,true) end end if isCursorOverRectangle(645*x,465*y,250*x,38*y) then if getKeyState("mouse1") then if bClicked == false then bClicked = true local input_money = tonumber(priceedit) if input_money then if not player then return false end if not isElement(player) then outputChatBox("#ff0000Оerro:#ffffffEste jogador está offline!",255,255,255,true) return true end if sujo > 0 then triggerServerEvent("moneytake", getRootElement(), localPlayer, input_money ) triggerServerEvent("moneygive", getRootElement(), name, input_money ) outputChatBox("Você enviou: #FFFF00"..input_money.." R$",0,255,0,true) else outputChatBox("Dinheiro insuficiente!",255,0,0,true) bClicked = false --triggerServerEvent( "moneygive1", getRootElement(), minmon ) player = nil name = "" pricedit = false priceedit = "0" return true end else bClicked = false end end end end if isCursorOverRectangle(iGridX, iGridY+iCellHeight*visibleI, iGridW, iCellHeight) then dxDrawImage(iGridX, iGridY+iCellHeight*visibleI, iGridW, iCellHeight, "dl/btn_name.png", 0, 0, 0, tocolor(255, 255, 255, 255) ,true) --dxDrawText(name, iGridX + 10, iGridY+iCellHeight*visibleI + 2, iGridX+iGridW + 1, iGridY+iCellHeight*(visibleI+1) + 1, tocolor(2,25,255,255), 1.1*x, "default-bold", "left", "center",false,false,true,false) if getKeyState("mouse1") then if bClicked == false then for s, data in ipairs(getElementsByType( 'player' )) do if i == s - 1 then drawIn = i name = string.gsub(getPlayerName(data),"#%x%x%x%x%x%x","") player = data end end end else bClicked = false end end for s, data in ipairs(getElementsByType( 'player' )) do if i == s - 1 then --dxDrawImage(iGridX, iGridY+iCellHeight*visibleI, 300*x,35*y, "dl/edit1.png") -- Ректангл имени --dxDrawText(string.gsub(getPlayerName(data),"#%x%x%x%x%x%x",""), iGridX + 10, iGridY+iCellHeight*visibleI + 2, iGridX+iGridW + 1, iGridY+iCellHeight*(visibleI+1) + 1, tocolor(255,255,255,255), 1.1*x, "default-bold", "left", "center",false,false,true,false) --label_groupsite = guiCreateLabel(10*x,390*y,200*x,25*y,string.gsub(getPlayerName(data),"#%x%x%x%x%x%x",""), false) dxDrawText(string.gsub(getPlayerName(data),"#%x%x%x%x%x%x",""), iGridX + 10, iGridY+iCellHeight*visibleI - 1, iGridX+iGridW + 1, iGridY+iCellHeight*(visibleI+1) + 1, tocolor(36,36,41,255), 0.65*x, fontname, "left", "center",false,false,true,false) end end end bindKey("mouse_wheel_up", "down", function() if spicok then if isCursorOverRectangle(iGridX, iGridY, iGridW, 335) then iCurrentCell = iCurrentCell - 1 if iCurrentCell < 0 then iCurrentCell = 0 end end end end) bindKey("mouse_wheel_down", "down", function() if spicok then if isCursorOverRectangle(iGridX, iGridY, iGridW, 335) then iCurrentCell = iCurrentCell + 1 end end end) --if pricedit then --dxDrawImage( 600*x,445*y,400*x,48*y,"dl/edit2.png", 0, 0, 0, tocolor(255, 255, 255, 255) ,false,false,true,false) --dxDrawText(priceedit, 610*x, 905*y, 414*x, 38*y, tocolor(163,163,163), 3*x, "default-bold", "left", "center",false,false,true,false) dxDrawText(priceedit, 640*x,725*y,290*x,33*y, tocolor(38,37,47), 1*x, fontname, "left", "center",false,false,true,false) if cursorPosition(630*x,360*y,290*x,33*y) then dxDrawImage( 630*x,360*y,290*x,33*y,"dl/edit2.png") --dxDrawText(priceedit, 610*x, 905*y, 414*x, 38*y, tocolor(163,163,163), 3*x, "default-bold", "left", "center",false,false,true,false) if getKeyState("mouse1") then if click then if pricedit == false then pricedit = true else pricedit = false end click = false else click = true end end end end addEventHandler("onClientKey",root, function(button,press) if pricedit then if button == "backspace" and press then if string.len(priceedit) > 0 then priceedit = string.sub(priceedit,1,string.len(priceedit) - 1) end if string.len(priceedit) == 0 then priceedit = "0" end return true end for i = 0, 9 do if button == tostring(i) and press then if string.len(priceedit) < 18 and string.len(priceedit) > 0 then if string.len(priceedit) == 1 and priceedit == "0" and button ~= 0 then priceedit = tostring(i) return false end priceedit = priceedit..tostring(i) break end end end if button == "." and press then priceedit = priceedit.."." end end end) function cursorPosition(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end Server Side --local DinheiroBanco = getElementData(source, "EmentDinheiroSujo") --local DinheiroBanco2 = getElementData(Jogador, "EmentDinheiroSujo") -------------- function moneys (player, input_money) --local take = takePlayerMoney(player, input_money) local take = setElementData(source, "EmentDinheiroSujo", getElementData(source, "EmentDinheiroSujo") - input_money) end addEvent( "moneytake", true ) addEventHandler( "moneytake", getRootElement(), moneys ) function moneysdive (name, input_money) local Jogador = getPlayerFromName(name) --local give = givePlayerMoney( getPlayerFromName(name), input_money) local give = setElementData(Jogador, "EmentDinheiroSujo", getElementData(Jogador, "EmentDinheiroSujo") + input_money) end addEvent( "moneygive", true ) addEventHandler( "moneygive", getRootElement(), moneysdive ) --[[function playerPerevods41eta(input_money,player,name) if not tonumber(priceedit) or tonumber(priceedit) < 0 then if (tonumber(priceedit) or 0 ) > getPlayerMoney(source) then outputChatBox('Message[35][31]22',source,255,255,255,true) givePlayerMoney( getPlayerFromName(name), priceedit) takePlayerMoney(player, priceedit) return true end end end addEvent("playerPerevods41eta",true) addEventHandler("playerPerevods41eta",getRootElement(),playerPerevods41eta)]] --[[function minmon() local getmoney = getPlayerMoney(localPlayer) --if tonumber(priceedit) <= getmoney and tonumber(priceedit) >= 1 then local give = givePlayerMoney( getPlayerFromName(name), input_money) local take = takePlayerMoney(player, input_money) if not tonumber(priceedit) or tonumber(priceedit) > 0 then if (getElementData(source,tonumber(priceedit)) or 0) < getPlayerMoney(localPlayer) then outputChatBox('Message[5][1]',source,255,255,255,true) return true end end end addEvent( "moneygive1", true ) addEventHandler( "moneygive1", getRootElement(), minmon )]]
  7. Opa galera, tava querendo criar um mod em que permitisse o player trocar de nome apenas uma vez, como no BGO por exemplo, em que o nome que a pessoa escolheu so pudesse ser alterado uma única vez. Agradeço quem puder me ajudar.
  8. @BoechatComo eu faria para que esse objeto fosse destruido apos o reparo do poste?
  9. Segue o codigo do trabalho abaixo @DNL291: Client Side local entradaB = createMarker(-2663.881, 239.237, 4.336, "cylinder", 1, 255, 255, 255, 0) addEventHandler( "onClientRender", root, function ( ) local x, y, z = getElementPosition( entradaB ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 20 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z +1, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawText("Eletricista", WorldPositionX - 1, WorldPositionY + 1, WorldPositionX - 1, WorldPositionY + 1, tocolor(0, 0, 0, 255), 1.52, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Eletricista", WorldPositionX - 1, WorldPositionY + 1, WorldPositionX - 1, WorldPositionY + 1, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) end end end ) local money = math.random(450, 1050); local pacienty = { -- Coordenadas dos postes + Dinheiro {1845.9543457031, 1138.2568359375, 11.62566280365,money}, {2017.7882080078, 1088.1586914063, 10.8203125,money}, {2022.1553955078, 1255.1987304688, 10.8203125,money}, {2224.9050292969, 2016.9425048828, 10.836261749268,money}, {2537.3610839844, 2119.03515625, 10.8203125,money}, {1932.7332763672, 2201.7548828125, 10.812517166138,money}, {1524.2006835938, 2208.3811035156, 11.239343643188,money}, {2143.5793457031, 1675.9582519531, 10.8203125,money}, {2143.1501464844, 1689.9729003906, 10.8203125,money}, {2598.1975097656, 1831.4290771484, 10.9765625,money}, {2598.1733398438, 1785.2888183594, 10.9765625,money}, {2605.8676757813, 1671.9998779297, 10.9765625,money}, } local pickupMed = { -- Local pra começar o trabalho {1706.3438720703, 998.7783203125, 10.8203125}, } electricianMessages = -- Lista de problemas { "Mal funcionamento no gerador.", "Afrouxamento da polia.", "Mal contato com o solo.", "Esgotamento de um filamento.", "Circuito aberto.", "Fio quebrado.", } for a=1,#pickupMed do local x,y,z = pickupMed[a][1],pickupMed[a][2],pickupMed[a][3] local marker = createMarker( x, y, z-0.85, "cylinder", 1, 255, 50, 50, 100) setElementData(marker,"Электрик_маркер_устроиться",a) end local sw,sh = guiGetScreenSize() local window={} local label={} local button={} window[1] = guiCreateWindow((sw-550)/2,(sh-200)/2,500,120,"Trabalho eletricista",false) label[1] = guiCreateLabel(0,25,490,30,"Bem-vindo ao trabalho de eletricista. \nVocê encontra e repara várias falhas em coisas de energia.",false,window[1]) guiSetFont(label[1], "default-bold-small") guiLabelSetHorizontalAlign(label[1], "center", false) button[1] = guiCreateButton(10,70,200,30,"...",false,window[1]) button[2] = guiCreateButton(290,70,200,30,"Fechar",false,window[1]) guiSetVisible(window[1],false) function createMarkerElectrician(player) if player == getLocalPlayer() then local d = math.random(1,#pacienty) local x,y,z = pacienty[d][1],pacienty[d][2],pacienty[d][3] local marker = createMarker( x, y, z-0.85, "cylinder", 1, 255, 0, 0, 20) setElementData(marker,"Электрик_маркер_пациент",true) setElementData(player,"Электрик_маркер_пациент",marker) local blip = createBlip(x,y,z,41,3) setElementData(player,"Электрик_пациент_блип",blip) setElementData(player,"Пациент_Кэш",pacienty[d][4]) end end function deleteMarkerElectrician(player) if player == getLocalPlayer() then local ped = getElementData(player,"Электрик_пациент") local blip = getElementData(player,"Электрик_пациент_блип") local marker = getElementData(player,"Электрик_маркер_пациент") if marker then if isElement(marker) then destroyElement(marker) end end if blip then if isElement(blip) then destroyElement(blip) end end if ped then if isElement(ped) then destroyElement(ped) end end end end addEvent("deleteMarkerElectrician", true) addEventHandler("deleteMarkerElectrician", getRootElement(), deleteMarkerElectrician) function startClick() local player = getLocalPlayer() if (source == button[1]) then guiSetVisible(window[1],false) showCursor(false) local state = getElementData(player,"Электрик_работает") local a1 = getElementData(player,"Электрик_маркер_устроиться") if not state then local level = tonumber(getElementData(player, "Level")) or 0 if level <= 12 then exports._infobox:addNotification(source, "Voce nao tem level suficiente para "..Trab.."", "info") else triggerServerEvent("start_Electrician",player,player) setElementData(player,"Электрик_работает",0) setElementData(player,"Электрик_машина_пациент",0) setElementData(player,"Электрик_работает_номер",a1) createMarkerElectrician(player) exports._infobox:addNotification(source, "Voce Começou a trabalhar "..Trab..", Siga o blip do mapa", "info") end else local hodok = tonumber(state) local profit = getElementData(player,"Электрик_Прибавление") if not profit then profit = 0 end setElementData(player,"Электрик_Прибавление",nil) setElementData(player,"Пациент_Кэш",nil) triggerServerEvent("stop_Electrician",player,player) triggerServerEvent("giveMoneyElectrician",player,player,profit) setElementData(player,"Электрик_работает",nil) setElementData(player,"Электрик_работает_номер",nil) end elseif (source == button[2]) then guiSetVisible(window[1],false) showCursor(false) end end addEventHandler("onClientGUIClick", getRootElement(), startClick) function onClientMarkerHit(player, mdim ) if player == getLocalPlayer() then if mdim then local marker = source local veh = getPedOccupiedVehicle(player) local state = getElementData(player,"Электрик_работает") local a1 = getElementData(marker,"Электрик_маркер_устроиться") if a1 then if not veh then guiSetVisible(window[1],true) showCursor(true) setElementData(player,"Электрик_маркер_устроиться",a1) if not state then guiSetText(button[1],"Começar") else guiSetText(button[1],"Receber") end end elseif getElementData(marker,"Электрик_маркер_пациент") then if not veh then setElementFrozen(player,true) setPedAnimation(player,"BOMBER","BOM_Plant",15000,false,true,true,false) setElementData(player,"Электрик_машина_пациент",tonumber(getElementData(player,"Электрик_машина_пациент")) + 1) exports._infobox:addNotification(source, "Aguarde voce esta arrumando a energia do poste", "info") setTimer(function() if isElement(player) and getElementData(player,"Электрик_работает") then local pacienty = tonumber(getElementData(player,"Электрик_машина_пациент")) if pacienty > 0 then setElementData(player,"Электрик_работает",tonumber(state) + pacienty) setElementData(player,"Электрик_машина_пациент",0) if not getElementData(player,"Электрик_Прибавление") then setElementData(player,"Электрик_Прибавление",0) end if not getElementData(player,"Пациент_Кэш") then setElementData(player,"Пациент_Кэш",0) end setElementData(player,"Электрик_Прибавление",getElementData(player,"Электрик_Прибавление") + getElementData(player,"Пациент_Кэш")) deleteMarkerElectrician(player) setElementFrozen(player,false) setPedAnimation(player,false) createMarkerElectrician(player) exports._infobox:addNotification(source, "A rede elétrica está configurada", "info") end end end,15000,1) end end end end end addEventHandler("onClientMarkerHit", getRootElement(), onClientMarkerHit ) function job_quit_Medik() local player = source if player == getLocalPlayer() then local state = getElementData(player,"Электрик_работает") if state then local profit = getElementData(player,"Электрик_Прибавление") if not profit then profit = 0 end setElementData(player,"Электрик_Прибавление",nil) setElementData(player,"Пациент_Кэш",nil) triggerServerEvent("stop_Electrician",player,player) triggerServerEvent("giveMoneyElectrician",player,player,profit) exports._infobox:addNotification(source, "Trabalho concluído com sucesso. Esse e seu salário: R$"..profit..".", "info") end end end addEventHandler("onClientPlayerWasted", root, job_quit_Medik)
  10. Pessoal, estou editando um script de agência de emprego onde tem um trabalho de eletricista, porém ele só cria um marker em baixo do poste e eu queria deixar mais RP, queria que criasse uma escada subindo no poste e o marker fosse criado lá em cima e logo em seguida após terminar o conserto e o trabalhador descer da escada ele pisar novamente no marker para destruir a escada. Desde já agradeço quem puder me ajudar.
  11. Salve galera, alguem pode me ajudar a descobrir o porque que a hud que eu criei não funciona quando dou start nela? Deve ser algo besta que não fiz porem ainda sou novo em lua script e não consegui descobrir ainda... Codigo abaixo: function ZaaKHUD( ... ) local Vida = math.floor ( getElementHealth ( localPlayer ) ) local Colete = math.floor ( getPedArmor ( localPlayer ) ) local Fome = getElementData(getLocalPlayer(), "AirNewSCR_Fome") or 0 -- Fome local Sede = getElementData(getLocalPlayer(), "AirNewSCR_Sede") or 0 -- Sede local Banco = convertNumber(getElementData(localPlayer, "TS:Bancobb") or 0) -- Dinheiro Banco local Dinheiro = convertNumber(getPlayerMoney(getLocalPlayer())) local Level = getElementData(getLocalPlayer(), "Level") or 1 -- Level do jogador dxDrawLine(1059 - 1, 0 - 1, 1059 - 1, 54, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1280, 0 - 1, 1059 - 1, 0 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1059 - 1, 54, 1280, 54, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1280, 54, 1280, 0 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(1059, 0, 221, 54, tocolor(42, 42, 42, 254), false) dxDrawImage(x*660, y367, x*0, y*0/-100*Vida, "images/fundo1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1063, y4, x*50, y*46/-100*Vida, "images/fundo1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(X*1117, y4, x*50, y*46/-100*Colete, "images/fundo2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1225, y*4, x*50, y*46/-100*Sede, "images/fundo4.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*1171, y*4, x*50, y*46/-100*Fome, "images/fundo5.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1069, 10, 38, 34, "images/vida.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1123, 10, 38, 34, "images/colete.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1177, 10, 38, 34, "images/fome.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1231, 10, 38, 34, "images/sede.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(1059, 53, 221, 1, tocolor(255, 255, 255, 255), false) dxDrawLine(1059 - 1, 55 - 1, 1059 - 1, 126, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1280, 55 - 1, 1059 - 1, 55 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1059 - 1, 126, 1280, 126, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1280, 126, 1280, 55 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(1059, 55, 221, 71, tocolor(0, 0, 0, 109), false) dxDrawImage(1069, 91, 30, 25, "images/carteira.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(1069, 60, 30, 25, "images/banco.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Banco: $"..Banco, 1106, 65, 1270, 82, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Carteira: $"..Dinheiro, 1106, 95, 1270, 112, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawLine(980 - 1, 0 - 1, 980 - 1, 126, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1059, 0 - 1, 980 - 1, 0 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(980 - 1, 126, 1059, 126, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(1059, 126, 1059, 0 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(980, 0, 79, 126, tocolor(0, 0, 0, 109), false) dxDrawImage(987, 55, 66, 63, "images/fundo3.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Nível", 985, 3, 1053, 53, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText(" "..Level, 993, 64, 1049, 113, tocolor(0, 0, 0, 254), 1.50, "bankgothic", "center", "top", false, false, false, false, false) end
  12. Opa, rapaziada, estou tentando criar um painel de login animado em que a camera fica passando pelo mapa de LS enquanto o player esta na tela de login, a função da camera ja consegui desenvolver, porem não sei como fazer pra parar essa animação após o player fazer login, se alguem puder me ajudar agradeço muito. Função da animação abaixo: camera = { [1] = { 1240.27661, -936.21216, 150.21532, 1984.46826, -592.69513, 92.62204, 1465.44849, -807.80768, 87.80418}, [2] = { 2953.32007, -2079.47217, 80.95277, 2902.98071, -2083.04590, 2.02448, 2899.27417, -2082.65625, 2.50801} } local iCamera = 1 local dx = 0.0 function interpolateCam() if iCamera == 1 then dx = dx + 0.0001 local ix, iy, iz = interpolateBetween(camera[iCamera][1], camera[iCamera][2], camera[iCamera][3], camera[iCamera][4], camera[iCamera][5], camera[iCamera][6], dx, "Linear") setCameraMatrix(ix, iy, iz, camera[iCamera][7], camera[iCamera][8], camera[iCamera][9] ) elseif iCamera == 2 then dx = dx + 0.0080 local ix, iy, iz = interpolateBetween(camera[iCamera][1], camera[iCamera][2], camera[iCamera][3], camera[iCamera][4], camera[iCamera][5], camera[iCamera][6], dx, "Linear") setCameraMatrix(ix, iy, iz, camera[iCamera][7], camera[iCamera][8], camera[iCamera][9] ) end end addEventHandler("onClientRender", root, interpolateCam)
  13. Galera, sou bem leigo ainda na criação de scripts para o MTA, estou tentando aprender aos poucos, então decidi tentar criar um script basico de aluguel de bike, porem ele não funciona nada ainda, sei que deve ser algo bem besta porem ainda não tenho tanto conhecimento para identificar o problema. Desde ja agradeço a atenção. Código abaixo: local mrk = createMarker(-2405.083, -598.298, 131.648, "cylinder", 3.0, 255, 0, 0, 50) -- local do marker function msg (thePlayer) outputChatBox ("#0000FF|ALUGUEL DE BIKES CLASSE ALTA RP|", thePlayer, 255,255,255, true) outputChatBox ("----------------------------------------", thePlayer, 255,255,255, true) outputChatBox ("#0000FF 1 -|BMX| - #008000R$ 150", thePlayer, 255,255,255, true) outputChatBox ("#0000FF 2 -|MOUNTAIN| - #008000R$ 150", thePlayer, 255,255,255, true) outputChatBox ("#0000FF 3 -|CLASSIC| - #008000R$ 150", thePlayer, 255,255,255, true) outputChatBox ("----------------------------------------", thePlayer, 255,255,255, true) outputChatBox ("#0000FF3Digite '/alugar' e o numero da Bike que deseja.", thePlayer, 255,255,255, true) end addEventHandler ("onMarkerHit", mrk, msg) function comprarbmx (thePlayer) -- alugar bmx local dinheiro = getPlayerMoney (thePlayer) if isElementWithinMarker (thePlayer, mrk) then if (dinheiro > 149) then takePlayerMoney (thePlayer, 150) local bike1 = createVehicle(481, -2422.081, -609.549, 132.563) else outputChatBox ("#FF0000Você não tem dinheiro suficiente para alugar uma bicicleta.") end end end addCommandHandler ("alugar 1" comprarbmx) function comprarmountain (thePlayer) -- alugar mountain local dinheiro = getPlayerMoney (thePlayer) if isElementWithinMarker (thePlayer, mrk) then if (dinheiro > 149) then takePlayerMoney (thePlayer, 150) local bike2 = createVehicle(510, -2422.081, -609.549, 132.563) else outputChatBox ("#FF0000Você não tem dinheiro suficiente para alugar uma bicicleta.") end end end addCommandHandler ("alugar 2" comprarmountain) function comprarclassic (thePlayer) -- alugar a classic local dinheiro = getPlayerMoney (thePlayer) if isElementWithinMarker (thePlayer, mrkl) then if (dinheiro > 149) then takePlayerMoney (thePlayer, 150) local bike3 = createVehicle(509, -2422.081, -609.549, 132.563) else outputChatBox ("#FF0000Você não tem dinheiro suficiente para alugar uma bicicleta.") end end end addCommandHandler ("alugar 3" comprarclassic)
  14. Vlwzao mano, ajudou demais, obrigadao ae
×
×
  • Create New...