Jump to content

Search the Community

Showing results for tags 'helpme'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 19 results

  1. function giveV(player, car_id) if player and isElement(player) then if car_id and type(car_id) == 'number' then local _,i = hasV(player, car_id) local garagem = getElementData(player, 'conce.garage') or {} if i then outputChatBox('Você já tem este carro!') --infobox return false else table.insert(garagem, {id = car_id}) setElementData(player, 'conce.garagem', garagem) outputChatBox('Você adquiriu um '..vehicle[car_id].name..'.') --infobox return true end else outputDebugString('Aguardando arg #2 válido para a function hasV') return false end else outputDebugString('Aguardando arg #1 válido para a function hasV') return false end end I'm struggling to make a dealership script, but the giveV function doesn't add the car to the garage list even if the checks pass. Can anyone help?
  2. I can't verify if the vehicle's id is the same as the spawned one and if it's going to destroy it! addEvent('onPlayerRequestSpawnV', true) addEventHandler('onPlayerRequestSpawnV', root, function(vid) local x,y,z = getElementPosition(source); local _,_,r = getElementRotation(source); local spawnedV = getElementData(source, 'conce.garagem.spawneds') or {}; for i,v in ipairs(spawnedV) do if i.vidC == vid then if i.vh and isElement(i.vh) then destroyElement(i.vh) return false; end end end vehicleSV = createVehicle(vid, x,y,z,_,_,r) warpPedIntoVehicle(source, vehicleSV) table.insert(spawnedV, {vidC = vid, vh = vehicleSV}) end); This is my current code...
  3. Sziasztok! Régebb óta foglalkozom modellezéssel. Elég nagy dologba vágtam fejszét. Kifejezetten most environmentekkel kezdtem el foglalkozni nagyobb körben. Mikor loadolom (replacelem) az objektet akkor teljesen jó, rátölti a textúrát... Amennyiben ha már a collisiont is be akarom tölteni, egyből kifagy a játék... (Nem a scriptel van a gond, gondoltam leírom még mielőtt felveti bárki is. A segítségért nagyon hálás lennék.) Előfordulhat, hogy túl nagy a collision fájl mérete és emiatt? Crash code: Version = 1.5.9-release-21261.0.000 Time = Mon Aug 22 01:15:36 2022 Module = A:\GTA SA\gta_sa.exe Code = 0xC0000005 Offset = 0x0013E01E EAX=3988B980 EBX=00000000 ECX=000000FF EDX=395CEED0 ESI=00ABCC14 EDI=00ABCC14 EBP=00000010 ESP=0177FD38 EIP=FFFFFFFF FLG=00210212 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B Erről a modellről van szó...
  4. function onPlayerJoin () setPedWalkingStyle( thePlayer, 121) end addEventHandler('onPlayerJoin', root, onPlayerJoin) Ajudem me
  5. Bom dia, preciso de uma ajuda bem simples. Uso: local marker1 = createMarker(-681, 949, 11, "cylinder", 1.5, 255,0,0, 25) function roubarC(source) local roubou = getElementData(source, "roubado") local roubarC = getPlayerName(source, true) local rouboLocal = getLocalPlayer() if isElementWithinMarker(source, marker1) then if (roubou == false) then outputChatBox("#00ff00| SS | Você roubou o cofre e recebeu 10.000,00 coins.", source, 255,255,255, true) outputChatBox("#00ff00| SS |"..roubarC.." roubou um confre em "..rouboLocal..".", root, 255,255,255, true) givePlayerMoney(source, 10000) setElementData(source, "roubado", true) setTimer (function () removeElementData(source, "roubado") end, 5000, 1) else outputChatBox("#ff0000| ERRO | Você roubou esse cofre agora pouco.", source, 255,255,255, true) end end end addCommandHandler("roubarcofre", roubarC) Porém sou iniciante, tanto é que uso o setElementData para limitar um tempo que o jogador pode fazer novamente o comando (improvisação). Então, o que quero é somente enviar no global o local do jogador que está roubando. Consegui user o getPlayerName para divulgar o nome, mas queria divulgar o local e o getLocalPlayer não me proporciona isso. Usei o /debugscript 3 para verificar o que acontece, e o resultado não me ajuda =(. Meu erro: clique aqui. Agradeço desde já =)
  6. HI EVERYBODY system info WIN 10 64-BIT I HAVE THIS PROBLEM THAT I CANT CONNECT TO ANY SERVERS WITHOUT VPN I TRIED EVERYTHING UNINSTALLING GTA AND MTA ALLOWING AND TURNING FIREWALL OFF AND ITS ALWAYS THE SAME THE EROR CODE IS CC23 or gets disconnected or gets timed outWHEN I GO WITH NO VPN . BUT WITH VPN ITS ALL GOOD IM FROM IRAN BTW IVE STARTED THINKING THAT THE PROBLEM IS THE USA AND IRAN`S BEEF OR I COULD BE WRONG IF YOU CAN HELP ME I WOULD BE THANKFUL ""EDIT"" MY FRIEND`S MTA WORK JUST FINE SO ITS NOT THE INTERNET I THINK ""EDIT"" THIS HAPPENED TO ME SCINCE I CHANGED MY LAPTOP IF THERE IS BAD ENGLISH IM SORRY ENGLISH ISNT MY FIRST LANGUAGE
  7. my server is very delayed, can anyone tell me if it is a script? currently my server has 100/120 players
  8. Eu queria separar as funções de um script de bar ( Separar uma função pra cada bebida, Catuaba, Vodca e Cerveja ) pois é muito desorganizado e tambem porque coloquei um painel novo nesse script... ja tentei varias e varias vezes e todas deram errado; c.lua ( A Parte das funções que quero separar Antes ) Esse aqui funciona normalmente, mas o proximo que eu separei não funciona.. function clickEffectDrink(button,state) if button == "left" and state == "up" then if isMouseInPosition(drawDrinksBVS.bgCatuabaX, drawDrinksBVS.bgCatuabaY, drawDrinksBVS.bgCatuabaW, drawDrinksBVS.bgCatuabaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 200) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgVodkaX, drawDrinksBVS.bgVodkaY, drawDrinksBVS.bgVodkaW, drawDrinksBVS.bgVodkaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 150) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCervejaX, drawDrinksBVS.bgCervejaY, drawDrinksBVS.bgCervejaW, drawDrinksBVS.bgCervejaH) then if (not isTimer(timerExpireDrinks)) then triggerServerEvent("server:onPlayerBuyDrinkBVS", resourceRoot, 100) else playSoundFrontEnd(6) outputChatBox("Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end elseif isMouseInPosition(drawDrinksBVS.bgCloseX, drawDrinksBVS.bgCloseY, drawDrinksBVS.bgCloseW, drawDrinksBVS.bgCloseH) then if isEventHandlerAdded("onClientRender", root, drawDrinks) and isEventHandlerAdded("onClientClick", root, clickEffectDrink) then removeEventHandler("onClientRender", root, drawDrinks) removeEventHandler("onClientClick", root, clickEffectDrink) showCursor(false) end end end end c.lua ( Aqui eu refiz separando as funções das bebidas Catuaba, Vodca e Cerveja, adicionei algumas coisas a mais porque como eu disse, mudei o painel. ) function Catuaba(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 200) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Catuaba) function Vodca(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 150) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Vodca) function Cerveja(_,state) if isEventHandlerAdded("onClientRender", root, drawDrinks) then if state == "down" then if isCursorOnElement(screenW * 0.3522, screenH * 0.4714, screenW * 0.4632, screenH * 0.5143) then if (not isTimer(timerExpireDrinks)) then setBlur(false) triggerServerEvent("server:onPlayerBuyDrinkBVS", localPlayer, 100) removeEventHandler("onClientRender", root, drawDrinks) showChat(true) showCursor(false) playSound("sfx/hit.mp3", false) else playSound("sfx/hit.mp3", false) outputChatBox("#1066E7Você ainda está com efeito da bebida, espere mais um pouco para beber de novo.", 255, 0, 0) end end end end end addEventHandler("onClientClick", root, Cerveja) Oque há de errado no script ? se puderem me informar o erro como sempre agradeço irmãos!
  9. perdão galera consegui resolver o motivo desse tópico, quando entro no servidor aparece um painelzinho em baixo do chat, com o icone do rc, do wifi e uns outros. eu sei que é algum mod originario do mta mas qual é ?
  10. Queria algumas sugestões de nomes de servidores de vocês, mais que a rúbrica seja "BvP". Vai me ajudar muito galera, é que tem uns cabeça de freezer do caralho que veem que o nome já está em uso e colocam mesmo assim. Pode ser qualquer tipo de nome, específicamente se puderem mandar vários. Agradeço abraço ae!
  11. 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!
  12. 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
  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. Como faço pra quando alguem manda mensagem pro player, ele digita /r ( nome do player ) ( mensagem ) para responder automaticamente e ai por diante function privateMessage(thePlayer,commandName,sendToName,...) local pvWords = { ... } local pvMessage = table.concat( pvWords, " " ) if sendToName then if (getPlayerFromParticalName (sendToName)) then toPlayer = (getPlayerFromParticalName (sendToName)) if not (toPlayer == thePlayer) then if not (pvMessage == "") then outputChatBox("#00ff00[PV]#FFFFFF Enviada para #FFFFFF" .. getPlayerName(toPlayer) .. "#FFFFFF: " .. pvMessage, thePlayer, 255, 255, 255, true) outputChatBox("#00ff00[PV]#FFFFFF Recebida de #FFFFFF" .. getPlayerName(thePlayer) .. "#FFFFFF: " .. pvMessage, toPlayer, 255, 255, 255, true) else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mansagem]", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Você não pode mandar pv para si mesmo#FFFFFF!", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Jogador não encontrado! #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true) return false end else outputChatBox("#00ff00[PV]#FFFFFF Sintaxe inválida! Use:#FFFFFF /pv [Nome do Jogador] [Mensagem]", thePlayer, 255, 255, 255, true) return false end end addCommandHandler("pv", privateMessage) function infopv() outputChatBox ('',getRootElement(),255,255,255,true) end setTimer(infopv, 350000, 350) function getPlayerFromParticalName(thePlayerName) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end
  15. Já testei várias áreas verdes! E com todas elas consigo atirar do veículo usando o realdriveby ou com qualquer outro script de atirar do veículo! Alguém conhece alguma área verde que bloquear o realdriveby, ou sabe como programar uma para isso ? Também já coloquei o vehicle_fire em todas elas e não consegui.
  16. Quartez

    [help]mysql

    dxDrawImage(sx-offset-45, sy+50, 40/ distance, 20/ distance, getElementData(player, "tag") "tagİmage/" ..tagnumber.. ".png", angle, 0, -20 ) Helpme where did i make mistakes
  17. Hola a todos, el día de hoy paso a preguntar algo y a ver si me pueden ayudar con lo siguiente: La cosa es que quiero en la zona del bosque del juego salgan animales, trate de hacerlo con el scripts de zombies y con sus respectivos spawns pero el problema es qué no funciona bien, hay que estar muy cerquita de los spawns para que aparezcan los zombies y cosas así, pero quisiera que salieran como animales normales osea, qué se spawneen en posiciones aleatorias no solo que en una salgan como 454645 en un mismo lugar, que se spawneen en un rectángulo rojo así tipo los rectángulos de las zonas verdes protegidas, también traté lo del rectángulo rojo pero no funciono, que al entrar a la zona del bosque al tocar el rectángulo salga un mensaje que diga como "Has entrado al bosque", y "Has salido del bosque", también trate eso pero tampoco funciono tampoco x64774 , y trate de usar el script de la comunidad para que los zombies dieran dinero pero tampoco funciono ese script, espero sus respuestas y su ayuda por favor http://prntscr.com/cn7rv2
  18. Me ayudan con esto por favor ? Quiero que al poner por ejemplo el comando "salto" se active, esto lo saque de un resource es decir quiero ponerlo individual (No soy autora del script), quiero que se active con un comando pero no sé como , soy nueva en esto del script, help me plz CLIENT: superjumping = 0 function rocketjump() startrocketjumpingthing = nil if getControlState("jump") == true then local task = getPedSimplestTask(getLocalPlayer()) if task == "TASK_SIMPLE_IN_AIR" and superjumping == 0 then if isTimer(startgroundchecktimer) then resetTimer ( startgroundchecktimer) else startgroundchecktimer = setTimer ( startjumpgroundcheck, 300, 1) end superjumpgroundcheck = 0 addEventHandler("onClientRender",getRootElement(), rocketplayer ) addEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) triggerServerEvent ("onSpeedChange", getLocalPlayer(), "jumping") jumpstart = getTickCount() superjumping = 1 end end end function triggersuperjump(key, keyState) if getElementData( getLocalPlayer(), "transport_power" ) == "superjump" then if keyState == "down" then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-3,true,true, true, true,true,true, false, getLocalPlayer() ) if isTimer(startrocketjumpingthing) == false and isclear == false then startrocketjumpingthing = setTimer ( rocketjump, 650, 1) end elseif keyState == "up" then removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end end bindKey("jump", "both", triggersuperjump) function rocketplayer() local px,py,pz = getElementPosition( getLocalPlayer () ) local currenttask = getPedSimplestTask(getLocalPlayer()) if getTickCount() - jumpstart < 4500 and currenttask ~= "TASK_SIMPLE_NAMED_ANIM" then if getTickCount() - jumpstart > 3000 then theZ = 0 elseif getTickCount() - jumpstart > 2000 then theZ = .1 else theZ = .3 end local playerangle = getPedRotation(getLocalPlayer()) local newradRot = math.rad ( playerangle ) local radius = 3 local ex = px + radius * math.sin(newradRot) local ey = py + -(radius) * math.cos(newradRot) local ez = pz x,y,z = px-ex,py-ey,pz-ez local dist = math.sqrt(x*x+y*y+z*z) x = x*.4/dist y = y*.4/dist setElementVelocity(getLocalPlayer(),x, y, theZ) else removeEventHandler("onClientRender",getRootElement(), rocketplayer ) end end function jumpgroundcheck() if superjumpgroundcheck == 1 then local px,py,pz = getElementPosition( getLocalPlayer () ) local isclear = isLineOfSightClear ( px, py, pz,px, py, pz-2.5,true,true, true, true,true,true, false, getLocalPlayer() ) local currenttask = getPedSimplestTask(getLocalPlayer()) if isclear == false or currenttask == "TASK_SIMPLE_LAND" or isElementInWater(getLocalPlayer()) == true then removeEventHandler("onClientRender",getRootElement(), jumpgroundcheck ) setElementPosition(getLocalPlayer(),px,py,pz ) removeEventHandler("onClientRender",getRootElement(), rocketplayer ) superjumping = 0 triggerServerEvent ("onJumpChange", getLocalPlayer(), "normal") end end end function startjumpgroundcheck() superjumpgroundcheck = 1 startgroundchecktimer = nil triggerServerEvent ("onJumpChange", getLocalPlayer(), "jumping") end SERVER: addEvent( "onJumpChange", true ) function Jumpeffect(mode) if mode == "jumping" then if isElement(getElementData( source, "themeJumpobject" )) == false then local px,py,pz = getElementPosition(source) local Jumpeffect = createThemeObject(source,px,py,pz) attachElements ( Jumpeffect, source, 0, 0, -.7) setElementParent ( Jumpeffect, source) setElementData ( source, "themeJumpobject", Jumpeffect, false ) end elseif mode == "normal" then if isElement(getElementData( source, "themeJumpobject" )) then local oldthemeobject = getElementData( source, "themeJumpobject" ) destroyElement(oldthemeobject) end end end addEventHandler ( "onJumpChange", getRootElement(), Jumpeffect )
×
×
  • Create New...