Jump to content

#Horus

Members
  • Posts

    133
  • Joined

  • Last visited

Everything posted by #Horus

  1. E seu por exemplo quiser criar umas 3-2 coordenadas apenas ? Aí após ele entregar nas 2 primeiras coordenadas dos markers, na última ele entrega e já recebe o dinheiro finalizando o trabalho
  2. Caso eu faça por exemplo, apos ele entregar as rosquinhas no Mfim4, ele partir para outro marker, vc me da +- um exemplo, eu teria de criar uma função para cada local de entrega ? Obs: Desculpe-me por tudo isso! É Porque estou tentando fazer um mini pack de trabalhos para o meu servidor, mas sem baixar da net, fazer eles do meu jeito sabe ?
  3. Obrigado Henry! Mas especificamente vamos dizer, eu fiz um script de trabalho basicamente semelhante a este, mas vamos supor que eu queira adicionar o addCommandHandler apenas, pois agora eu entendi sobre a data que voce criou e ja fiz praticamente o mesmo nesse meu trabalho semelhante, porem com nomes diferentes, ai agora oque eu teria de fazer para adicionar o addCommandHandler? Eu fiz o mesmo ali, pois tinha visto ate em um script que tinha baixado da net. coloquei o addEventHandler junto na function, e no final agora preciso colocar o addCommandHandler certo ?
  4. Foi erro meu perdão, eu ia colocar um DxMsg em baixo dos else, mais decidir que não, e acabei esquecendo de apagar, mesma coisa com o entregafinalizar, esqueci de renomear perdão!
  5. Perdão! Posso repostar lá ? Eu re-fiz o codigo, so que mudei o nome dos markers e da funcoes para facilitar
  6. Quando o player chegar no marker, ao invez de pegar o trabalho de uma vez, ele ter q digitar o comando do addCommandHandler Obs: A Mensagem de quando ele passa em cima do marker mandando o player digitar o tal comando eu ja sei fazer.. mas tentei de varias formas adicionar o addCommandHandler e fracassei! Eu tambem queria saber, como faço pro marker do "Mfim4" sumir após o player completar o trabalho! O Marker do Mfim4 fica no lugar, mesmo sem a pessoa estar no trabalho e ele nao sai server.lua local Minicio4 = createMarker (1038.02332, -1337.93970, 12.8, "cylinder", 1, 16, 102, 231, 100) local Mfim4 = createMarker ( 2801.29663, -1088.36243, 30.72142 -1, "cylinder", 2, 0 ,255 ,0, 255 ) local Bfim4 = createBlipAttachedTo ( Mfim4, 19 ) setElementVisibleTo ( Bfim4, root, false ) veh = {} function incio4 (source) if isElementWithinMarker(source, Minicio4) then if veh[source] and isElement( veh[source] ) then destroyElement ( veh[source] ) veh[source] = nil end x,y,z = getElementPosition(source) Trabalho = true veh[source] = createVehicle(498,1009.50598, -1355.16431, 13.34428) setElementVisibleTo ( Bfim4, source, true ) warpPedIntoVehicle ( source, veh[source] ) dxMsg(source, "Leve as rosquinhas ate a bandeira no radar!", "info") end end addEventHandler( "onMarkerHit", Minicio4, incio4 ) function fim4 (source) if veh[source] and isElement(veh[source]) then destroyElement (veh[source]) givePlayerMoney(source,2500) -------------- Caso queira mudar o dinheiro que o player vai ganhar ao finalizar o trabalho setElementVisibleTo ( Bfim4, source, false ) setElementVisibleTo ( entregafinalizar, source, false ) dxMsg(source, "Você entregou as rosquinhas a fabrica e ganhou R$2500!", "sucess") else end end addEventHandler("onMarkerHit",Mfim4 ,fim4) function sair4 (source) if (veh[source]) and isElement(veh[source]) then setElementVisibleTo ( Bfim4, source, false ) destroyElement (veh[source]) dxMsg(source, "Você saiu do veiculo e perdeu o trabalho!", "error") else end end addEventHandler ( "onVehicleExit", getRootElement(), sair4 ) function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end O Client eu fiz um script text que fica esrito em cima do marker o nome do trabalho mas isso nao tem nada haver ent n colocarei!
  7. local Minicio4 = createMarker (1038.02332, -1337.93970, 12.7, "cylinder", 1, 16 ,102 ,231, 100) eu coloquei assim, mas n funfou é algo a mais ?
  8. local Minicio4 = createMarker (1038.02332, -1337.93970, 13.72656 -1, "cylinder", 1, 16 ,102 ,231, 100) Quando coloco -1 após as coordenadas, junto com o marker de tamanho 1 após o "cylinder" o script nao funciona!!! Todos os markers de trab do meu servidor são do tamanho "1" queria deixar esse tmb oque é glr ? Obs: eu sublinei e grifei o -1 e o tamanho do marker q é "1" após o "cylinder" para facilitar
  9. Obrigado por me ajudarem galerinha do fórum! Me ajudaram bastante em tudo que precisei... além disso eu entendi coisas nos scripts que eu nem sabia que existiam... Vlw ae pessoal tamo junto!
  10. Obrigado! Preciso colocar o nome da pasta como "fortnitedances" certo ?
  11. Eu tinha colocado no server-side do "fortnitedances" mas não deu! Então eu preciso criar um arquivo server.lua e colocar o código nesse server.lua separadamente certo ? Nesse server.lua acompanhando o meta.xml é lógico kk, mais e então e só fazer o que falei ali em cima ?
  12. Eitss não entendi muito bem, me explica ? Eu preciso apenas colocar este código no server.lua certo ?
  13. Eu novamente aqui skkssk, Então meus irmãos, é um script que baixei do site original do mta, muitos devem conhece-l, é o script de danças do fortnite! Mais assim, parece que ele nao esta configurado e eu meio que nao entendo sobre arquivos ifp de dança, o author desse script, colocou um exemplo nele, que quando troca de nick exibe a animação e realmente apaguei os -- e funcionou, eu ate entendi, o script vem com 13 danças, porem nao estou conseguindo configurar! server.lua function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do triggerClientEvent ( root, "setPedFortniteAnimation", root, ped,animation,tiempo,repetir,mover,interrumpible ) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end --[[ EJEMPLO/EXAMPLE CUANDO CAMBIA EL NICK WHEN NICK IS CHANGED function wasNickChangedByUser(oldNick, newNick, changedByUser) setPedFortniteAnimation(source,"baile 8",7000,true,false,false,false) end addEventHandler("onPlayerChangeNick", getRootElement(), wasNickChangedByUser) -- add an event handler --]] function howtouse ( player, command, dance ) if isElement(player) then exports.fortnitedances:setPedFortniteAnimation(player,"baile "..dance.."",-1,true,false,false,false) end end addCommandHandler ( "dance", howtouse ) client.lua local customIfp = nil function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do setPedAnimation(ped, "Fortnite_"..i.."", animation, tiempo, true, false, false) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end addEvent("setPedFortniteAnimation",true) addEventHandler("setPedFortniteAnimation",getRootElement(),setPedFortniteAnimation) addEventHandler("onClientResourceStart", resourceRoot, function ( startedRes ) customIfp = engineLoadIFP ("Fortnite pt1.ifp", "Fortnite_1") customIfp2 = engineLoadIFP ("Fortnite pt2.ifp", "Fortnite_2") customIfp3 = engineLoadIFP ("Fortnite pt3.ifp", "Fortnite_3") if customIfp and customIfp2 and customIfp3 then outputDebugString ("Animaciones de Fortnite cargadas") else outputDebugString ("Las animaciones de Fortnite no fueron cargadas") end end ) Vou colocar o meta.xml tambem pra voces verem o export caso possa ser isso tambem meta.xml <meta> <info author="Drex" version="1.1" name="Bailes de Fortnite" type="script" /> <export function="setPedFortniteAnimation" type="shared" /> <file src="Fortnite pt1.ifp" /> <file src="Fortnite pt2.ifp" /> <file src="Fortnite pt3.ifp" /> <script src="client.lua" type="client" cache="false" /> <script src="server.lua" type="sever" cache="false" /> </meta>
  14. Eu novamente aqui skkssk, Então meus irmãos, é um script que baixei do site original do mta, muitos devem conhece-l, é o script de danças do fortnite! Mais assim, parece que ele nao esta configurado e eu meio que nao entendo sobre arquivos ifp de dança, o author desse script, colocou um exemplo nele, que quando troca de nick exibe a animação e realmente apaguei os -- e funcionou, eu ate entendi, o script vem com 13 danças, porem nao estou conseguindo configurar! server.lua function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do triggerClientEvent ( root, "setPedFortniteAnimation", root, ped,animation,tiempo,repetir,mover,interrumpible ) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end --[[ EJEMPLO/EXAMPLE CUANDO CAMBIA EL NICK WHEN NICK IS CHANGED function wasNickChangedByUser(oldNick, newNick, changedByUser) setPedFortniteAnimation(source,"baile 8",7000,true,false,false,false) end addEventHandler("onPlayerChangeNick", getRootElement(), wasNickChangedByUser) -- add an event handler --]] function howtouse ( player, command, dance ) if isElement(player) then exports.fortnitedances:setPedFortniteAnimation(player,"baile "..dance.."",-1,true,false,false,false) end end addCommandHandler ( "dance", howtouse ) client.lua local customIfp = nil function setPedFortniteAnimation (ped,animation,tiempo,repetir,mover,interrumpible) if (type(animation) ~= "string" or type(tiempo) ~= "number" or type(repetir) ~= "boolean" or type(mover) ~= "boolean" or type(interrumpible) ~= "boolean") then return false end if isElement(ped) then if animation == "baile 1" or animation == "baile 2" or animation == "baile 3" or animation == "baile 4" or animation == "baile 5" or animation == "baile 6" or animation == "baile 7" or animation == "baile 8" or animation == "baile 9" or animation == "baile 10" or animation == "baile 11" or animation == "baile 12" or animation == "baile 13" then for i = 1,3 do setPedAnimation(ped, "Fortnite_"..i.."", animation, tiempo, true, false, false) if tiempo > 1 then setTimer(setPedAnimation,tiempo,1,ped,false) setTimer(setPedAnimation,tiempo+100,1,ped,false) end end end end end addEvent("setPedFortniteAnimation",true) addEventHandler("setPedFortniteAnimation",getRootElement(),setPedFortniteAnimation) addEventHandler("onClientResourceStart", resourceRoot, function ( startedRes ) customIfp = engineLoadIFP ("Fortnite pt1.ifp", "Fortnite_1") customIfp2 = engineLoadIFP ("Fortnite pt2.ifp", "Fortnite_2") customIfp3 = engineLoadIFP ("Fortnite pt3.ifp", "Fortnite_3") if customIfp and customIfp2 and customIfp3 then outputDebugString ("Animaciones de Fortnite cargadas") else outputDebugString ("Las animaciones de Fortnite no fueron cargadas") end end ) Vou colocar o meta.xml tambem pra voces verem o export caso possa ser isso tambem meta.xml <meta> <info author="Drex" version="1.1" name="Bailes de Fortnite" type="script" /> <export function="setPedFortniteAnimation" type="shared" /> <file src="Fortnite pt1.ifp" /> <file src="Fortnite pt2.ifp" /> <file src="Fortnite pt3.ifp" /> <script src="client.lua" type="client" cache="false" /> <script src="server.lua" type="sever" cache="false" /> </meta>
  15. Obrigado pessoal!!!! eu coloquei alguns outputChatBox! function Punha (sourcePlayer) outputChatBox ( "#ffffff*O #1066E7Jogador#ffffff "..getPlayerName(source).." #1066E7Esta batendo punheta! Utilizando #FFFFFF( /punheta )", getRootElement(), 255, 255, 255,true ) if isGuestAccount (getPlayerAccount(sourcePlayer)) then return end -- Impede que o comando funcione para jogadores deslogados. outputChatBox ("É necessário estar logado para bater o punhetao!", 255, 0, 0) triggerClientEvent (sourcePlayer, "verPunheta", sourcePlayer) -- Executa o evento "verPunheta" do client.lua if not isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup ("Punheteiro")) then -- Se o jogador não tem a TAG, então: aclGroupAddObject (aclGetGroup("Punheteiro"), "user."..getAccountName (getPlayerAccount (sourcePlayer))) -- Coloca TAG de punheteiro nele. end end addCommandHandler ("punheta", Punha) -- Comando que executa a função Punha addEvent ("cancelaTag", true) addEventHandler ("cancelaTag", getRootElement(), function () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(client)), aclGetGroup ("Punheteiro")) then -- Se o jogador tem a TAG, então: aclGroupRemoveObject (aclGetGroup("Punheteiro"), "user."..getAccountName (getPlayerAccount (client))) -- Remove a TAG de punheteiro dele. end end) do jeito que coloquei esta correto ? ou pode correr algum risco de bug ? Realmente um mod bem tosco kkkkkkk
  16. Agora eu entendi manooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! eu tinha que ter criado um evento no client-side para o trigger do server-side detectar ele sempre que for um script desse tipo, deve-se criar os eventos no client-side, para fazer ligação no server-side ?
  17. function Punha(sourcePlayer) if not punhetaStarted then triggerClientEvent ( playerSource, "E Aqui pessoal", playerSource, "E Aqui pessoal" ) aclGroupAddObject (aclGetGroup("Punheteiro"), "user."..getAccountName (getPlayerAccount (thePlayer))) end end addCommandHandler("punheta", Punha)
  18. function Punha(sourcePlayer) end addCommandHandler("punheta", Punha)
  19. Ok, obrigado, primeiramente preciso criar o triggerClientEvent certo ? Mas para puxar os recursos oque preciso fazer ?
  20. Pois e kskkss mais achei que ia ficar meio tosco sabe mano ? Aí assim, quando ele executar o /punheta ele iria ser adicionado no grupo para ter a tag, e após passar 1 minuto mais ou menos ele ser removido tlg ?
×
×
  • Create New...