Jump to content

Stronger

Members
  • Posts

    115
  • Joined

  • Last visited

Everything posted by Stronger

  1. Alguém poderia mim ajudar a arrumar 1 bug e acrescentar 1 settime no trabalho. O Bug que quero arrumar é que quando o jogador passa por cima do marker com um veiculo é entrar no trabalho e spawna varios veículos. e queria acrescentar um tempo para levar o caminhão do x até o y. ( Não precisa concertar o mod é só das as funções que possa trabalhar nisso ) local MarkTrab = createMarker(2849.9343261719, -1055.3076171875, 22, "cylinder", 2, 255, 0, 0, 255) local MarkChego = createMarker(2569.125, 1034.0930175781, 8, "cylinder", 4, 255, 0, 0, 255) cam = {} blipxxx = {} function TrabBus (source) local account = getAccountName (getPlayerAccount(source)) local x,y,z = getElementPosition(source) if (getElementData(source, "Trab", true)) then outputChatBox ("#FF0000Você já está Trabalhando.", source, 255, 255, 255, true) return end cam[source] = createVehicle (403, 2858, -1049, 23) setElementRotation(cam[source], 0,0,-90) warpPedIntoVehicle (source, cam[source]) aclGroupAddObject (aclGetGroup("Truck"), "user."..account) blipxxx[source] = createBlip (2569.125, 1034.0930175781, 10, 19) setElementData(source, "Trab", true) setPedSkin(source,309) outputChatBox(" ") outputChatBox(" ") outputChatBox("#ff00ff===========================Caminhao===========================", source, 255, 255, 255, true) outputChatBox("#00FF9E--Leve o Caminhão até a Bandeira Vermelha.", source, 255, 255, 255, true) outputChatBox("#00FF9E--Você Ganhará R$ 12.000 pra fazer esta Viagem.", source, 255, 255, 255, true) outputChatBox("#00FF9E--para sair do Trabalho digite /sairtrab1.",source, 255, 255, 255, true) outputChatBox("#FF0000--Trabalho de Caminhoneiro feito por : StG^.",source, 255, 255, 255, true) outputChatBox("#ff00ff============================Caminhao===========================",source, 255, 255, 255, true) end addEventHandler ("onMarkerHit", MarkTrab, TrabBus) function rreem (source) local accounat = getAccountName (getPlayerAccount(source)) aclGroupRemoveObject (aclGetGroup("Truck"), "user."..accounat) outputChatBox ('#ffff00* Caminhoneiro: #ffffffVocê desistiu de Trabalhar.',source,255,255,255,true) setPedSkin (source,0) destroyElement(cam[source]) setElementData(source, "Trab", false) end addCommandHandler("sairtrab1",rreem) function TrabBusChego (source) if cam[source] and isElement(cam[source]) and getElementData (source, "Trab", true) then destroyElement (blipxxx[source]) destroyElement (cam[source]) local accounat = getAccountName (getPlayerAccount(source)) aclGroupRemoveObject (aclGetGroup("Truck"), "user."..accounat) setElementData(source, "Trab", false) givePlayerMoney (source, 12000) setPedSkin (source,0) setElementData(source, "Trab", false) end end addEventHandler ("onMarkerHit", MarkChego, TrabBusChego) function NSPode (source) if (cam[source]) and isElement(cam[source]) then outputChatBox ('#FF5100* #ffffffVocê tem #FF510010 #ffffffSegundos parar voltar para o Caminhão.', source, 255, 255, 255, true) T11 = setTimer (destroyElement, 10000,1, blipxxx[source]) T22 = setTimer (destroyElement, 10000,1, cam[source]) T33 = setTimer (setElementData, 10000,1, source, "Trab", false) T44 = setTimer (function() Trabalho = false setPedSkin (source,0) outputChatBox ('#FF5100* #ffffffVocê ficou muito tempo fora do Veículo e perdeu o Trabalho!.', source, 255, 255, 255, true) setElementData(source, "Trab", false) end, 10000, 1) end end addEventHandler ("onVehicleExit", root, NSPode) function SNPode (source) if (cam[source]) and isElement(cam[source]) then killTimer (T11) killTimer (T22) killTimer (T33) killTimer (T44) end end addEventHandler ("onVehicleEnter", root, SNPode)
  2. Como bloquear o freeroam so para spawnar com 1 skin quando morre , Ex : morri 3 vezes e as 3 vezes nasci o a skin 1.
  3. Gostaria saber que função utilizar para que todos os jogadores virem espectadores de um unico jogador ?
  4. Era isso mesmo muito obrigado pela explicação .
  5. Queria que o portão abrir-se com uma determinada conta e conta desta mesma conta que função devo utilizar neste script ! -- Configurações : ---------------------------------------------------------------------------------------------------------------------------------------- comandoabrir = "X" -- Comando para abrir o portao. comandofechar = "X" -- Comando para fechar o portao. nomedojogador = "X" -- Nome do Dono do Portao! (Se tiver codigos tem que botar) ----------------------------------------------------------------------------------------------------------------------------------------- PortaoBase = createObject ( 980, X, Y, Z, 0, 0, 90 ) -- Coordenadas do Portão! function abrirPortao1 ( thePlayer ) local Nome = getPlayerName( thePlayer ) if Nome == nomedojogador then moveObject ( PortaoBase, 1, X, Y, Z) -- Coordenadas do Portão quando aberto! else outputChatBox('#FFFF00[ERRO]#00ff00Você nao tem acesso a este portao!', thePlayer, 255, 0, 0, true ) end end addCommandHandler(comandoabrir,abrirPortao1) function fecharPortao1 ( thePlayer) local Nome = getPlayerName(thePlayer) if Nome == nomedojogador then moveObject ( PortaoBase, 1, X, Y, Z ) -- Coordenadas do Portão quando fechado! (Á mesma coordenada do Portão) else outputChatBox('#FFFF00[ERRO]#00ff00Você nao tem acesso a este portao!', thePlayer, 255, 0, 0, true ) end end addCommandHandler(comandofechar,fecharPortao1)
  6. Na minha opinião acho melhor eu recriar este script , por que utilizá-lo em servidor PLAY .
  7. Ele da alguma mensagem de confirmação da atualização ?
  8. Como assim utilizar o comando "upgrade" ?
  9. Alguém sabe dizer se o mod legalsystem:https://community.multitheftauto.com/index.php?p=resources&s=details&id=292 funciona na versão 1.5 do mta , se não funciona vocês poderia dizer quais funções devo utilizar para criar este mod !
  10. Como você sabe se é confiável ? host barata é meio duvidoso ser confiável
  11. Só definir uma dimensão para a prisão. No arquivo fr_client.lua, substitua a funçao toggleFRWindow por esta local forbiddenDimensions = {1,2,3} -- dimensões proibidas function toggleFRWindow() if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else for k, v in ipairs(forbiddenDimensions) do if v == getElementDimension(localPlayer) then return end end showCursor(true) showAllWindows() end end Feito por Banex so colei oque ele tinha feito em outro post
  12. Como desativa o nome do veículo e da localidade do mta ?
  13. Agora Entendi , Muito Obrigado Pela Explicação nota 10
  14. 1 Bug Quando qualquer jogador cria um veículo esse some mesmo n sendo o veículo da policia ! addEventHandler("onVehicleEnter",root, function(Player,seat) if(getElementModel(source)==596 or 598) then local skin = getElementModel(Player) if(skin~=287 or 286 or 285) then cancelEvent() destroyElement(source) outputChatBox("Você Não é da Força Nacional de Segurança para Criar este Veículo",thePlayer) end end end)
  15. Assim ? function removerEstrelas(jailed) for v, k in ipairs(getElementsByType("jailed")) do if getPlayerWantedLevel(k) > 0 then setPlayerWantedLevel ( k, getPlayerWantedLevel(k)-1) end end end setTimer(removerEstrelas, 1000, 0)
  16. Galera gostaria de só que ta com uma skin poder criar ou entrar em um determinado veículo , que funções devo utilizar ?
  17. Galera Gostaria de Criar Comandos Baseados na Session ID do Jogador 1° Gostaria de Criar um Sistema de Gang que possa Convidar Jogadores para Gang Através da Session ID. 2° Gostaria que Apareçe-se a Session ID do jogador encima da cabeça dele Ex : NickX(ID : X). 3° Sistema de Procurado Baseado no SAMP , Este sistema funciona da seguinte forma o Policial Digita "/procurado" irá apareçer um tabela em Gui informando O nivel de Procurado e a Session ID do jogador, o Policial se quiser procurar um jogador vai digitar "/procurar (ID JOGADOR)" ai apareçerá um blip no jogador que está sendo procurado. Estes são os mods que quero fazer mais não sei que Comandos Utilizar (Como sempre) procurei na Wiki sobre Session ID mais não achei
  18. Adianta nada os cara quer saber que tem o mod não importa se está compilado ou não
  19. Galera quando eu inicio o painel em dx nas resources , e clico aonde o "isMouseInPosition" indica sem digitar o comando necessário para abrir-lo , ele pega o veículo , alguem mim ajuda sou novo em DX'S function pm() dxDrawRectangle(541, 215, 258, 352, tocolor(0, 0, 0, 179), false) dxDrawRectangle(540, 213, 259, 29, tocolor(129, 0, 0, 254), false) dxDrawText("Painel da Policia", 539, 212, 799, 242, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawRectangle(538, 562, 159, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(540, 524, 259, 28, tocolor(129, 0, 0, 254), false) dxDrawText("Script Criado Por : +Stronger", 538, 521, 799, 552, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false) dxDrawRectangle(553, 284, 98, 79, tocolor(129, 0, 0, 254), false) -- Viatura dxDrawRectangle(691, 284, 98, 79, tocolor(129, 0, 0, 254), false) -- Skin dxDrawRectangle(691, 403, 98, 79, tocolor(129, 0, 0, 254), false) -- Vida/Colete dxDrawRectangle(551, 403, 98, 79, tocolor(129, 0, 0, 254), false) -- Armas dxDrawText("Viatura", 552, 281, 651, 363, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Skin", 690, 281, 789, 363, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Vida\n Colete", 690, 400, 789, 482, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Armas", 551, 400, 650, 482, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("X", 755, 244, 789, 274, tocolor(209, 0, 0, 254), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end function iniciarRenderizacao ( ) addEventHandler("onClientRender", root, pm) showCursor(true) end addCommandHandler("tut1", iniciarRenderizacao) ------------------------------------------------------------------- function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end addEventHandler ( "onClientClick", root, function ( _, state ) if state == "down" then -- Viatura if isMouseInPosition ( 553, 284, 98, 79 ) then triggerServerEvent ( "darAuto", getLocalPlayer() ) -- Skin elseif isMouseInPosition ( 691, 284, 98, 79 ) then triggerServerEvent ( "onGreetinC", getLocalPlayer() ) -- Vida / Colete elseif isMouseInPosition ( 691, 403, 98, 79 ) then triggerServerEvent ( "VidaColete", getLocalPlayer() ) -- Armas elseif isMouseInPosition ( 551, 403, 98, 79 ) then triggerServerEvent ( "onGreeting", getLocalPlayer() ) -- Fechar elseif isMouseInPosition ( 755, 244, 34, 30 ) then removeEventHandler ( "onClientRender", root, pm ) showCursor ( false ) end end end )
  20. Muito Obrigado pela ajuda, e desculpas por alguns erros estou aprendendo aos poucos lua, Vlw pelas dicas !
  21. Client function pm() dxDrawRectangle(541, 215, 258, 352, tocolor(0, 0, 0, 179), false) dxDrawRectangle(540, 213, 259, 29, tocolor(129, 0, 0, 254), false) dxDrawText("Painel da Policia", 539, 212, 799, 242, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "center", false, false, false, false, false) dxDrawRectangle(538, 562, 159, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(540, 524, 259, 28, tocolor(129, 0, 0, 254), false) dxDrawText("Script Criado Por : +Stronger", 538, 521, 799, 552, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false) dxDrawRectangle(553, 284, 98, 79, tocolor(129, 0, 0, 254), false) dxDrawRectangle(691, 284, 98, 79, tocolor(129, 0, 0, 254), false) dxDrawRectangle(691, 403, 98, 79, tocolor(129, 0, 0, 254), false) dxDrawRectangle(551, 403, 98, 79, tocolor(129, 0, 0, 254), false) viatura = dxDrawText("Viatura", 552, 281, 651, 363, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) skin = dxDrawText("Skin", 690, 281, 789, 363, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) vidacolete = dxDrawText("Vida\n Colete", 690, 400, 789, 482, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) armas = dxDrawText("Armas", 551, 400, 650, 482, tocolor(255, 255, 255, 255), 0.75, "bankgothic", "center", "center", false, false, false, false, false) fechar = dxDrawText("X", 755, 244, 789, 274, tocolor(209, 0, 0, 254), 1.00, "bankgothic", "center", "center", false, false, false, false, false) showCursor(true) addEventHandler("onClientRender", root, pm) addEventHandler ("onClientGUIClick", viatura, viatura1, false) addEventHandler ("onClientGUIClick", skin, skin1, false) addEventHandler ("onClientGUIClick", vidacolete, vc1, false) addEventHandler ("onClientGUIClick", armas, armas1, false) addEventHandler ("onClientGUIClick", fechar, closea, false) end addCommandHandler("tut1", pm) ------------------------------------------------------------------- -- Incluir codigo fonte da função isMouseInPosition function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end addEventHandler ( "onClientClick", root, function ( ) --[[ Checar a posição do mouse com a função isMouseInPosition os parametros da função isMouseInPosition são as posições do retangulo no caso 100, 100, 200, 200 --]] if isMouseInPosition ( 552, 281, 651, 363 ) then outputChatBox ( "você clicou dentro do retangulo" ) else outputChatBox ( "você clicou fora do retangulo" ) end end ------------------------------------------------------------------- function armas1 () showCursor (true) triggerServerEvent ( "onGreeting", getLocalPlayer() ) end function skin1 () showCursor (true) triggerServerEvent ( "onGreetinC", getLocalPlayer() ) end function closea () showCursor (false) guiSetVisible (PanelPolice, not guiGetVisible ( PanelPolice ) ) end function viatura1 () showCursor (true) triggerServerEvent ( "darAuto", getLocalPlayer() ) end function vc1 () showCursor (true) triggerServerEvent ( "VidaColete", getLocalPlayer() ) end Server function greetingHandler () giveWeapon(source, 23, 10000, true) giveWeapon(source, 27, 10000, true) giveWeapon(source, 28, 10000, true) giveWeapon(source, 31, 10000, true) giveWeapon(source, 34, 10000, true) giveWeapon(source, 17, 10000, true) giveWeapon(source, 3, 10000, true) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), greetingHandler ) ------------------------------------------------------------------------------ function ccss1 () setElementModel ( source, 287 ) end addEvent( "onGreetinC", true ) addEventHandler( "onGreetinC", getRootElement(), ccss1 ) ------------------------------------------------------------------------------ function ccss2 () local luckyBugger = getRandomPlayer () -- get a random player local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position createVehicle ( 596, x + 3, y, z ) end addEvent( "darAuto", true ) addEventHandler( "darAuto", getRootElement(), ccss2 ) ------------------------------------------------------------------------------ function ccss3 () setElementHealth(source, 200) setPedArmor(source, 100) end addEvent( "VidaColete", true ) addEventHandler( "VidaColete", getRootElement(), ccss3 ) ------------------------------------------------------------------------------
  22. Mais eu fiz um teste com o meu código utilizando a função mais não consigo quando click pegue o objeto
  23. Só que quando a resource é ativa e eu clico fora das cordernadas sem abrir o painel apareçe o chat box
×
×
  • Create New...