Jump to content

#DeltaSCR

Members
  • Posts

    395
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by #DeltaSCR

  1. Você deverá configurar a Data da Hud de Acordo com a Data do Sistema Bancário, fiquei a vontade para postar seu código (fica melhor para te ajudarmos) ??
  2. @C0DEJá tentou desabilitar a Freeroam?
  3. Use corretamente o fórum brother!
  4. Realmente, na verdade eu nunca tinha usado fixVehicle, então quando o Lord falou, eu nem me atentei muito.
  5. Olá @+Fury, em nosso fórum, temos as seções "Tutoriais em Geral", lá tem vários tutoriais que garanto que vão te ajudar muito ? Recomendo também que você dê uma olhada nas regras de nosso fórum, link a seguir:
  6. Olá @Luccas, por favor, utilize corretamente o nosso fórum ?
  7. Agora surgiu uma especie de Bug Grafico: O HP do Veiculo consta como 1000, mas a lataria permanece danificada - Código a Seguir... (Server-Side) function DeltaSCRFix (thePlayer) local playerInCar = getPedOccupiedVehicle(thePlayer) if playerInCar then local vehicleHealth = getElementHealth (playerInCar) / 10 if vehicleHealth < 85 then setElementHealth (playerInCar, 1000) end end end addCommandHandler ("fix", DeltaSCRFix)
  8. @Lord Henry As variáveis só são usadas ai: function verifyKits () local Kits = tonumber(getElementData(localPlayer, "Kit")) or 0 if Kits < 3 then setElementData(localPlayer, "Kit", Kits +1) else setElementData(localPlayer, "Kit", 3) end end -- @Reparar Veh function DeltaSCRFix () if getPedOccupiedVehicle(localPlayer) then Kits = tonumber(getElementData(localPlayer, "Kit")) or 0 if Kits > 0 then setElementData(localPlayer, "Kit", Kits -1) outputChatBox ("╔═════════════════════════════════════════════════╗", 200, 50, 0) outputChatBox ("INFO: #FFFFFFVocê usou seu Kit de Reparo com Sucesso.", 200, 50, 0, true) outputChatBox ("INFO: #FFFFFFVocê agora tem mais "..Kits.." usos.", 200, 50, 0, true) outputChatBox ("╚═════════════════════════════════════════════════╝", 200, 50, 0) end end end addCommandHandler ("seguro", DeltaSCRFix)
  9. Pser... O que era pra acontecer: Se o número de Kits do Jogador for maior que 0, então ele consegue executar o resto do código...
  10. Agora o Debug Acusa: function DeltaSCRFix () if getPedOccupiedVehicle(localPlayer) then Kits = tonumber(getElementData(localPlayer, "Kit")) or 0 if Kits > 0 then setElementData(localPlayer, "Kit", Kits -1) outputChatBox ("╔═════════════════════════════════════════════════╗", 200, 50, 0) outputChatBox ("INFO: #FFFFFFVocê usou seu Kit de Reparo com Sucesso.", 200, 50, 0, true) outputChatBox ("INFO: #FFFFFFVocê agora tem mais "..Kits.." usos.", 200, 50, 0, true) outputChatBox ("╚═════════════════════════════════════════════════╝", 200, 50, 0) end end end addCommandHandler ("seguro", DeltaSCRFix)
  11. Só que tipo, como eu faria pra toda vez que o Jogador entrasse e saísse do Servidor, essa data fosse salva?
  12. Ok, tirei o localPlayer dos parametros, só que agora, mesmo eu estando eu um veículo, está executando o else, no caso a mensagem que eu preciso estar em um veiculo...
  13. Agora em outra parte do código o debug está acusando o seguinte erro: Bad argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1, got none] function DeltaSCRFix (localPlayer) if getPedOccupiedVehicle(localPlayer) == true then outputChatBox ("#C83200╔═════════════════════════════════════════════════╗", 255, 255, 255, true) outputChatBox ("#C83200ERRO: #FFFFFFVocê usou seu Kit de Reparo com Sucesso", 255, 255, 255, true) outputChatBox ("#C83200╚═════════════════════════════════════════════════╝", 255, 255, 255, true) else outputChatBox ("#C83200╔═════════════════════════════════════════════════╗", 255, 255, 255, true) outputChatBox ("#C83200ERRO: #FFFFFFVocê precisa estar em um veículo para usar o Seguro", 255, 255, 255, true) outputChatBox ("#C83200╚═════════════════════════════════════════════════╝", 255, 255, 255, true) end end addCommandHandler ("seguro", DeltaSCRFix)
  14. Na real não deu sucesso, tentei aqui e estou obtendo o restante do código sem ter dinheiro... function DeltaComprarPrata (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if DeltaSCRPainel == true then if state == "down" then if isCursorOnElement (screenW * 0.3203, screenH * 0.2667, screenW * 0.3594, screenH * 0.4667) then if getPlayerMoney (localPlayer) <= 750 then verifyKits () DeltaSCRAbrir () outputChatBox ("Sucess") else outputChatBox ("notMoney") end end end end end addEventHandler ("onClientClick", getRootElement(), DeltaComprarPrata) function verifyKits () local Kits = tonumber(getElementData(localPlayer, "Kit")) or 0 if Kits < 3 then setElementData(localPlayer, "Kit", Kits +1) else setElementData(localPlayer, "Kit", 3) end end
  15. Estou obtendo pelo lado do Client, então sem argumentos né?
  16. Mas source nao seria apenas para server-side?
  17. Uma dúvida, o debug acusa que na linha 145, é esperado '=' para o ')', eis a linha a seguir: local money = getPlayerMoney (localPlayer) if money =< 750 then
  18. Olá, olha eu aqui novamente rsrs... Então, estou desenvolvendo um Script de uma espécie de Seguradora, só que chegou á um ponto que me deparei que vou ter que usar setElementData e TriggerEvent, porém estou com muita dúvida. A parte de Abrir e Fechar o Painel está funcionando normalmente, porém onde eu quero chegar: Quando o jogador clicar no botão de Compra (Especificado no Código), seja setado nele uma data, que seria a String e mais um Número, no caso esse número seria um Kit a mais para esse jogador, e também que possa ter no máximo 3 kits... Sinceramente, estou bem perdido nessa parte, se puderem me ajudar agradeço... client-side: local screenW, screenH = guiGetScreenSize() DeltaSCRPainel = false function DeltaSCRDirectX () -- @Comprar-Prata dxDrawRectangle(screenW * 0.3969, screenH * 0.5833, screenW * 0.0977, screenH * 0.0417, tocolor(50, 200, 50, 255), false) end function DeltaSCRAbrir () if DeltaSCRPainel == false then DeltaSCRPainel = true showCursor (true) showChat (false) addEventHandler ("onClientRender", getRootElement(), DeltaSCRDirectX) else DeltaSCRPainel = false showCursor (false) showChat (true) removeEventHandler ("onClientRender", getRootElement(), DeltaSCRDirectX) end end addEvent ("DeltaSCR:OC", true) addEventHandler ("DeltaSCR:OC", getRootElement(), DeltaSCRAbrir) -- @Comprar-Prata function DeltaComprarPrata (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if DeltaSCRPainel == true then if state == "down" then if isCursorOnElement (screenW * 0.3203, screenH * 0.2667, screenW * 0.3594, screenH * 0.4667) then -- //Aqui eu acho que começaria a funcionalidade em si... end end end end addEventHandler ("onClientClick", getRootElement(), DeltaComprarPrata) -- @Cursor 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 function isCursorOnElement (x, y, w, h) 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
  19. @Sr Black Não seria mais fácil você utilizar um Chat Local na Letra "T"?
  20. Ah sim, vlw Ai então ... Vou dar Thanks em todos, pois ambos me ajudaram muito ? Qualquer dúvida eu passo aqui.
×
×
  • Create New...