Jump to content

Zakk

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Zakk

  1. Alguem me ajuda eu peguei uma Fabrica de Arma é tentei edita ela mas ta dando um erro na lina 17 é nao sei como resolver, se alguem poder ajuda como eu arrumo agradeço des de ja Edit : Eu sei que nao coloquei a função de da a arma para o jogador vou coloca dps. Erro do Debugscript 3 : Bad argument @ addcommandHandler [Expected boot at argument 3, got marker] local markerfab = createMarker(2068.21582, -1366.30005, 23.8121-1,"cylinder", 1.3, 255,0,0, 50) function fabricarArma( thePlayer,markerfab ) toggleAllControls( thePlayer, false, true, false ) setPedAnimation (thePlayer, "ped", "WOMAN_walknorm") setTimer( function(thePlayer) toggleAllControls( thePlayer, true ) setPedAnimation( thePlayer ) outputChatBox ("[FabricarArmas] Você fabricou AK-47." , thePlayer, 112, 128, 144) end, 30000, 1 ) end addCommandHandler ("fabricar", fabricarArma,markerfab) function fabricarArma2( thePlayer ) outputChatBox ("[FabricarArmas] digite /fabricar para fabricar AK-47." , thePlayer, 112, 128, 144) end addEventHandler("onMarkerHit", markerfab, fabricarArma2)
  2. Eu adicionei o SetelementFrozen a esse codigo so que o player continuar frezado mesmo dps de acaba o tempo do evento alguem sabe oque pode ser? function assaltar(thePlayer) givePlayerMoney(source,1200) setPlayerWantedLevel ( source, 5 ) setPedRotation(source, 270) setPedAnimation(source, "ped", "gang_gunstand", 10500, true, false, false, false) triggerClientEvent(root, alarmebanco, source ) setElementFrozen(source,true) triggerClientEvent(root, avisoroubo, root, thePlayer ) setElementPosition(Assalto, 3099.97, -3281.69, -0.5) setTimer(setElementPosition, 5000000, 1, Assalto, 1756.517578125,-1384.548828125,14.395313262939) end addEvent("assaltarbanco", true) addEventHandler("assaltarbanco", root, assaltar)
  3. é porque eu queria que o jogador fizesse a animação ate certo tempo é parava de fazer a animação para ganha a arma
  4. Galera eu to tentando fazer uma fabrica de arma para quando o jogador de /m4 ele fica um tempo fazendo a anim é dps ganha a arma eu tentei dessa forma mais não deu certo se alguem pode falar ou mostra como faz fico grado des de já marketweapon = createMarker (1550.5791015625,-806.974609375,72.217529296875, "cylinder", 1.5, 255,255,255) function msg (player) outputChatBox (" /m4 para começar a fabricar a M4 ", player, 220,255,255,true) end addEventHandler("onMarkerHit", marketweapon, msg) function pegarm4(player) giveWeapon(player, 31,300, true) tempFreeze(20.2) setPedAnimation( localPlayer, "BOMBER", "BOM_Plant", true, true) end addCommandHandler("m4", pegarm4)
  5. ei quando eu coloco no codigo ele não pedi o comando para entrar ele ja entra direto sabe oque pode ser? o meu codigo ta assim function verify (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (thePlayer)), aclGetGroup ("TesteGANG")) then -- No lugar de Admin, coloque o nome da ACL Group que terá acesso. outputChatBox ("Acesso permitido.", thePlayer) else outputChatBox ("Acesso negado.", thePlayer) end end addCommandHandler ("eae", verify) markenterEntra = createMarker (1726.9658203125,-1636.9375,20.217346191406, "arrow", 1, 0, 17, 254, 255) --> use arrow ou cylinder. function Entrada(thePlayer) setElementInterior(thePlayer, 18) --> interioor onde o player vai entrar setElementDimension(thePlayer, 0) --> dimensão que o player vai entrar setElementPosition(thePlayer, 1726.634765625,-1642.7021484375,20.225318908691) --> cordenadas do local onde ele deve ser jogado. end addEventHandler("onMarkerHit", markenterEntra, Entrada) ----SAIDA DO INTERIOR ------ markenterExit = createMarker (1726.966796875,-1637.927734375,20.222986221313, "arrow", 1, 255, 0, 0, 255) --> use arrow ou cylinder. setElementInterior(markenterExit, 18) ---> interior que a marker deve ficar. setElementDimension(markenterExit, 0) ---> dimensão que a marker deve ficar. function Exit(thePlayer) setElementInterior(thePlayer, 0) --> interior que o player vai. setElementDimension(thePlayer, 0) --> dimensão que o player vai. setElementPosition(thePlayer, 1727.068359375,-1634.9453125,20.216373443604) --> local onde ele deve sair no mapa. end addEventHandler("onMarkerHit", markenterExit, Exit)
  6. Alguem sabe coloca uma permi que so um grupo pode entra no interior, eu tentei de varias formas mais sempre da erro, se alguem pode me falar a funçao pra coloca nesse codigo fico grato des de já markenterEntra = createMarker (1726.9658203125,-1636.9375,20.217346191406, "arrow", 1, 0, 17, 254, 255) --> use arrow ou cylinder. function Entrada(thePlayer) setElementInterior(thePlayer, 18) --> interioor onde o player vai entrar setElementDimension(thePlayer, 0) --> dimensão que o player vai entrar setElementPosition(thePlayer, 1726.634765625,-1642.7021484375,20.225318908691) --> cordenadas do local onde ele deve ser jogado. end addEventHandler("onMarkerHit", markenterEntra, Entrada) ----SAIDA DO INTERIOR ------ markenterExit = createMarker (1726.966796875,-1637.927734375,20.222986221313, "arrow", 1, 255, 0, 0, 255) --> use arrow ou cylinder. setElementInterior(markenterExit, 18) ---> interior que a marker deve ficar. setElementDimension(markenterExit, 0) ---> dimensão que a marker deve ficar. function Exit(thePlayer) setElementInterior(thePlayer, 0) --> interior que o player vai. setElementDimension(thePlayer, 0) --> dimensão que o player vai. setElementPosition(thePlayer, 1727.068359375,-1634.9453125,20.216373443604) --> local onde ele deve sair no mapa. end addEventHandler("onMarkerHit", markenterExit, Exit)
  7. Alguem pode me ajuda pfv eu fiz esse codigo para entrar em um interior so que ele não quer pega se alguem pode me ajuda fala na onde eu errei Entrar = createMarker (910.30902, -1397.46484, 13.19776 -1, "cylinder", 1, 227, 240, 14) Sair = createMarker (418.62479, -84.36529, 1001.80469 -1, "arrow", 2, 227, 240, 14) setElementInterior(Entrar, 0) setElementDimension(Entrar, 0) setElementInterior(Sair, 3) setElementDimension(Sair, 2) function entradafun(source) setElementInterior(source, 3) setElementDimension(source, 3) setElementPosition(source, 418.18564, -81.11912, 1001.80469) end addEventHandler("onMarkerHit", Entrar, entradafun) function saidafun(source) setElementDimension(source, 0) setElementInterior(source, 0) setElementPosition(source, 902.76819, -1398.39978, 13.19219 -1) end addEventHandler("onMarkerHit", Sair, saidafun)
  8. Entao to querendo cria um simples trabalho de entrega com tabela para quando o cara entrega ele ganha um dinheiro alguem pode me ajuda eu tentei usa esse trabalho como fonte (em Baixo) mais ele nao cria os markes é nao cria os blips pra entregar, Se alguem poder me ajuda agradeço des de ja Serve = local StartEmprego02 = createMarker (1314.20227, -1159.26379, 23.82813 -1, "cylinder", 1.2, 0 ,26 ,255, 95) -- Local Onde Pega O Emprego ------------------------------------------------------------------------------------------------------------------------------------------------------------ local LetraTEmprego02 = createBlipAttachedTo ( StartEmprego02, 42 ) -- Letra T setBlipVisibleDistance( LetraTEmprego02 , 700) -- Distancia Letra T "200" = 200 Metros Pra Ficar Visivel ------------------------------------------------------------------------------------------------------------------------------------------------------------ function HitarMarkerJobEmprego02 ( ThePlayer, d ) if getElementType(ThePlayer) == "player" and d and isPedInVehicle(ThePlayer) ~= true then outputChatBox("#ffffff[ #001AFFTrabalho De Traficante #ffffff] - #FFFFFFDigite#001AFF/sorvete #ffffff- Para pegar as drogas!", ThePlayer, 255, 255, 255, true) end end addEventHandler("onMarkerHit", StartEmprego02, HitarMarkerJobEmprego02) ------------------------------------------------------------------------------------------------------------------------------------------------------------ local vehEmprego02 = {} function ComecoDeTudoEmprego02 (source) if isElementWithinMarker(source, StartEmprego02) and isPedInVehicle(source) ~= true and getElementDimension(source) == getElementDimension(StartEmprego02) then if vehEmprego02[source] and isElement( vehEmprego02[source] ) then destroyElement ( vehEmprego02[source] ) end local x,y,z = getElementPosition(source) setElementData( source, "Trabalho", "traficante de drogas" ) vehEmprego02[source] = createVehicle(423, 1325.20374, -1173.83887, 23.65397) setVehicleLocked(vehEmprego02[source],true) warpPedIntoVehicle ( source, vehEmprego02[source] ) setPlayerWantedLevel( source, 1 ) triggerClientEvent( player, "traficante:onRequestDoAction", player, "create" ) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFAgora Você É Um Traficante", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFLeve a Van até o Local Indicado no Mapa", source, 255, 255, 255, true) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFSe você for pego pela policia será preso! Então tome cuidado.", source, 255, 255, 255, true) -- Mensagem Apos Pegar O Emprego local vehOwner = source addEventHandler( "onVehicleExplode", vehEmprego02[source], function() removePlayerFromJob( vehOwner, source, true ) outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - O seu veículo explodiu e você perdeu o emprego!", vehOwner, 230, 0, 0 ) end ) end end addCommandHandler ( "sorvete", ComecoDeTudoEmprego02 ) -- Comando Pra Pegar O Emprego addEvent( "traficante:onPlayerFinishMission", true ) addEventHandler("traficante:onPlayerFinishMission", root, function() givePlayerMoney(client, 500) outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFEntrega Finalizada, Você recebeu R$5000.",client,0,0,0,true) -- Mensagem Apos Finalizar O Emprego removePlayerFromJob( client, vehEmprego02[client] ) end ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoEmprego02 (player) if (vehEmprego02[player]) and isElement(vehEmprego02[player]) then removePlayerFromJob( player, vehEmprego02[player], true ) outputChatBox ("#ffffff[#001AFFTrabalho #ffffff] - #FFFFFFVocê Saiu Da Van E A Droga Foi Presa.", player ,0,0,0,true) -- Perder O Emprego Apos Sair Do Veiculo end end addEventHandler ( "onVehicleExit", resourceRoot, SaiuDoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function MorreuNoEmprego02 ( ammo, attacker, weapon, bodypart ) if isElement(vehEmprego02[source]) then removePlayerFromJob( source, vehEmprego02[source], true ) outputChatBox ("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFVoce Morreu e Perdeu o Emprego", source ,0,0,0,true) -- Perder O Emprego Apos Morrer end end addEventHandler ( "onPlayerWasted", getRootElement(), MorreuNoEmprego02 ) ------------------------------------------------------------------------------------------------------------------------------------------------------------ function SaiuDoServerEmprego02 ( quitType ) if isElement(vehEmprego02[source]) then destroyElement (vehEmprego02[source]) -- Destruir Veiculo Apos Jogador Sair Do Servidor No Emprego end end addEventHandler ( "onPlayerQuit", getRootElement(), SaiuDoServerEmprego02 ) function removePlayerFromJob( player, pVeh, removeFromClient ) if isElement(player) and isElement(pVeh) then setElementData( player, "Trabalho", nil ) destroyElement( pVeh ) if removeFromClient then triggerClientEvent( player, "traficante:onRequestDoAction", player, "destroy" ) end end end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end return false end ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Client = local traficante_locations = { { 1135.3686523438, -2004.0344238281, 69.0078125 }, { 1318.93652, -1137.58923, 23.65625 } --{ x, y, z }, --{ x, y, z }, --{ x, y, z } } local traficante = {} function onRequestDoActionFunc ( actionstr ) if actionstr == "create" then createLocation( 1 ) elseif actionstr == "destroy" then destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil end end addEvent( "traficante:onRequestDoAction", true ) addEventHandler( "traficante:onRequestDoAction", root, onRequestDoActionFunc ) function FimDeTudoEmprego02 () if traficante.StopEmprego02 and isElementWithinMarker(localPlayer, traficante.StopEmprego02) and getElementData( localPlayer, "trabalho" ) == "traficante de drogas" then if indexID == #traficante_locations then indexID = nil destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) traficante.StopEmprego02, traficante.BlipFinalEmprego02 = nil, nil return triggerServerEvent( "traficante:onPlayerFinishMission", localPlayer ) end outputChatBox( "#ffffff[ #001AFFTrabalho #ffffff] - Outra entrega disponível, leve a van até o local", 0,0,0,true ) createLocation( indexID + 1 ) end end addCommandHandler ( "entregar", FimDeTudoEmprego02 ) function AvisoEntregaFimEmprego02 (hitElement, dim) if isPedInVehicle(hitElement) and hitElement == localPlayer and dim and source == traficante.StopEmprego02 then outputChatBox("#ffffff[ #001AFFTrabalho #ffffff] - #FFFFFFDigite #001AFF/entregar #FFFFFFPara Concluir o Trabalho",0,0,0,true) end end addEventHandler( "onClientMarkerHit", resourceRoot, AvisoEntregaFimEmprego02 ) function createLocation( id ) indexID = tonumber(id) or 1 destroyElement( traficante.StopEmprego02 ) destroyElement( traficante.BlipFinalEmprego02 ) local x,y,z = unpack( markerTruck[indexID] ) traficante.StopEmprego02 = createMarker( x, y, z, "cylinder", 7, 0 ,26 ,255, 95 ) traficante.BlipFinalEmprego02 = createBlipAttachedTo( traficante.StopEmprego02, 0 ) return indexID end local _destroyElement = destroyElement function destroyElement(elem) if isElement(elem) then return _destroyElement(elem) end -- return false end
×
×
  • Create New...