Search the Community

Showing results for tags 'script'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 541 results

  1. Client side: function showPlayerFuel() hidePlayerFuel(true); fuelFrame = guiCreateStaticImage( 0.72, 0.79, 0.05, 0.20, "images/Fuel_Gage.png", true) fuelBar1 = guiCreateStaticImage( 0.742, 0.811, 0.021, 0.17, "images/Fuel_Dot.png", true) guiBringToFront ( fuelFrame ) end addEvent("FullTank", true ) addEventHandler("FullTank", resourceRoot, showPlayerFuel) addEvent("fullRefill", true) addEventHandler("fullRefill",resourceRoot, showPlayerFuel) addEvent("fuelGageShow", true) addEventHandler("fuelGageShow", resourceRoot, showPlayerFuel) function CurrentFuelIn ( currentFuel ) local sizex = currentFuel["sizex"] local sizey = currentFuel["sizey"] local posx = currentFuel["posx"] local posy = currentFuel["posy"] hidePlayerFuel(true); fuelBar1 = guiCreateStaticImage( tonumber(posx), tonumber(posy), tonumber(sizex), tonumber(sizey), "images/Fuel_Dot.png", true) fuelFrame = guiCreateStaticImage( 0.72, 0.79, 0.05, 0.20, "images/Fuel_Gage.png", true) if(posy and posy > 0.9) then if not warningdot1 then warningdot1 = guiCreateStaticImage( 0.7288, 0.912, 0.014, 0.016, "images/warning_dot.png", true) end if((Posy or 0) >= 0.981) then setVehicleEngineState(getPedOccupiedVehicle(localPlayer),false) else outputChatBox("-- You Are Quite Low On Fuel | Refuel at Area 69", 255, 50, 50, true) playSoundFrontEnd(4) end end end addEvent("CurrentFuel", true) addEventHandler("CurrentFuel", resourceRoot, CurrentFuelIn) function startExit ( vehicle,seat ) if seat == 0 and fuelBar1 then local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local fTbl = {} fTbl.sizex = x fTbl.sizey = y fTbl.posx = Posx fTbl.posy = Posy triggerServerEvent('onGetFuel',vehicle,fTbl) hidePlayerFuel() if(fuelTimer) then killTimer(fuelTimer) fuelTimer = false; end end end addEventHandler("onClientPlayerVehicleExit", localPlayer, startExit ) function vehEntered ( veh,seat ) if seat == 0 and isElement(fuelBar1) then local Posx, Posy = guiGetPosition ( fuelBar1, true ) if(Posy and Posy >= 0.981) then setVehicleEngineState(veh,false) end end if(isTimer(fuelTimer)) then killTimer(fuelTimer); fuelTimer = nil; end fuelTimer = setTimer ( decFuel1, 2000, 0) end addEventHandler("onClientPlayerVehicleEnter", localPlayer, vehEntered ) function decFuel1() local PlayerInCar = getPedOccupiedVehicle( getLocalPlayer() ) if (PlayerInCar and getVehicleController(PlayerInCar) == localPlayer and not isPedDead(localPlayer) ) then if(not fuelBar1) then showPlayerFuel(); return; end local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local NewY,NewPosY if not Posy then return end if((isElementWithinColShape(localPlayer,safeZone) or isElementWithinSafeArea(localPlayer)) and Posy > 0.812) then NewY = y + 0.009 NewPosY = Posy - 0.009 if(warningdot1) then destroyElement(warningdot1) warningdot1 = nil playSoundFrontEnd(1) end elseif(Posy < 0.981) then local velo = getActualVelocity( PlayerInCar ) local val = (velo < 5 and 0) or (velo < 100 and 0.0007) or 0.0010 -- 6 / 9 NewY = y - val NewPosY = Posy + val if(Posy and (Posy > 0.885 and Posy < 0.95) and not warningdot1) then warningdot1 = guiCreateStaticImage( 0.7288, 0.912, 0.014, 0.016, "images/warning_dot.png", true) playSoundFrontEnd(4) outputChatBox("Your vehicle tank is about to run out.", 255, 100, 100); end elseif (Posy >= 0.981 and getVehicleEngineState(PlayerInCar)) then setVehicleEngineState(PlayerInCar,false) callServerFunction('setVehicleEngineState',PlayerInCar,false) end if(NewY) then guiSetSize(fuelBar1, x, NewY, true) end if(NewPosY) then guiSetPosition(fuelBar1, Posx, NewPosY, true ) end elseif(fuelTimer) then hidePlayerFuel() end end function hidePlayerFuel(bDontDestroyTimer) if(fuelFrame) then destroyElement(fuelFrame) fuelFrame = nil; end if(fuelBar1) then destroyElement(fuelBar1) fuelBar1 = nil; end if(warningdot1) then destroyElement(warningdot1); warningdot1 = nil; end if(not bDontDestroyTimer and isTimer(fuelTimer)) then killTimer(fuelTimer); fuelTimer = nil; end end addEvent("jacked", true ) addEventHandler("jacked", resourceRoot, hidePlayerFuel ) function getActualVelocity( element ) if(element) then x,y,z = getElementVelocity(element) end return math.sqrt(x^2 + y^2 + z^2) * 161 end Server side: function startExit ( vehicle,seat ) if seat == 0 and fuelBar1 then local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local fTbl = {} fTbl.sizex = x fTbl.sizey = y fTbl.posx = Posx fTbl.posy = Posy triggerServerEvent('onGetFuel',vehicle,fTbl) hidePlayerFuel() if(fuelTimer) then killTimer(fuelTimer) fuelTimer = false; end end end function vehEntered ( veh,seat ) if seat == 0 and isElement(fuelBar1) then local Posx, Posy = guiGetPosition ( fuelBar1, true ) if(Posy and Posy >= 0.981) then setVehicleEngineState(veh,false) end end if(isTimer(fuelTimer)) then killTimer(fuelTimer); fuelTimer = nil; end fuelTimer = setTimer ( decFuel1, 2000, 0) end function decFuel1() local PlayerInCar = getPedOccupiedVehicle( getLocalPlayer() ) if (PlayerInCar and getVehicleController(PlayerInCar) == localPlayer and not isPedDead(localPlayer) ) then if(not fuelBar1) then showPlayerFuel(); return; end local x, y = guiGetSize( fuelBar1, true ) local Posx, Posy = guiGetPosition ( fuelBar1, true ) local NewY,NewPosY if not Posy then return end if((isElementWithinColShape(localPlayer,safeZone) or isElementWithinSafeArea(localPlayer)) and Posy > 0.812) then NewY = y + 0.009 NewPosY = Posy - 0.009 if(warningdot1) then destroyElement(warningdot1) warningdot1 = nil playSoundFrontEnd(1) end elseif(Posy < 0.981) then local velo = getActualVelocity( PlayerInCar ) local val = (velo < 5 and 0) or (velo < 100 and 0.0007) or 0.0010 -- 6 / 9 NewY = y - val NewPosY = Posy + val if(Posy and (Posy > 0.885 and Posy < 0.95) and not warningdot1) then warningdot1 = guiCreateStaticImage( 0.7288, 0.912, 0.014, 0.016, "images/warning_dot.png", true) playSoundFrontEnd(4) outputChatBox("Your vehicle tank is about to run out.", 255, 100, 100); end elseif (Posy >= 0.981 and getVehicleEngineState(PlayerInCar)) then setVehicleEngineState(PlayerInCar,false) callServerFunction('setVehicleEngineState',PlayerInCar,false) end if(NewY) then guiSetSize(fuelBar1, x, NewY, true) end if(NewPosY) then guiSetPosition(fuelBar1, Posx, NewPosY, true ) end elseif(fuelTimer) then hidePlayerFuel() end end function hidePlayerFuel(bDontDestroyTimer) if(fuelFrame) then destroyElement(fuelFrame) fuelFrame = nil; end if(fuelBar1) then destroyElement(fuelBar1) fuelBar1 = nil; end if(warningdot1) then destroyElement(warningdot1); warningdot1 = nil; end if(not bDontDestroyTimer and isTimer(fuelTimer)) then killTimer(fuelTimer); fuelTimer = nil; end end addEvent("jacked", true ) addEventHandler("jacked", resourceRoot, hidePlayerFuel ) function getActualVelocity( element ) if(element) then x,y,z = getElementVelocity(element) end return math.sqrt(x^2 + y^2 + z^2) * 161 end
  2. Boa Tarde , precisava de uma ajuda no meu gui to fazendo um guiCreateScrollBar para colocar a renderização do mapa e queria colocar para aparecer o guisetText seguir de acordo so que nao vai ele fica nisso queria que o guisetText coloca-se como queria que quando puxa a barra fica no minimo 200 ai vai subindo de 100 a 100 ate chegar 700. so que nao to conseguindo no chat 350 350 350 700 690 660 640 620 addEventHandler("onClientGUIScroll",getRootElement(),function (Scrolled) if source == Distance then textdistances = guiScrollBarGetScrollPosition (source) / 100*1000 -- setFarClipDistance( textdistances*1000 ) if textdistances < 200 or textdistances > 700 then textdistances2 = 200 else textdistances2 = textdistances end -- setFarClipDistance(1000) outputChatBox(textdistances2) guiSetText(textDistance,textdistances2.."%") end end)
  3. inimarker = createMarker(2825.11694, 1295.62183, 9.76514, "cylinder", 1.5, 255, 0, 0, 100) finmarker = createMarker(2826.12085, 1355.72925, 9.75000, "cylinder", 1.5, 255, 255, 0, 100) iniblip = createBlipAttachedTo(inimarker, 42) finblip = createBlipAttachedTo(finmarker, 0) setElementVisibleTo(finmarker, root, false) setElementVisibleTo(finblip, root, false) vehserver = {} addEventHandler("onMarkerHit", inimarker, function(player) local lvls = tonumber(getElementData(player, "Level")) if lvls and lvls >= 35 then if not (vehserver[player]) then if (getElementDimension(player) == 0) then if vehserver[player] and isElement(vehserver[player]) then destroyElement(vehserver[player]) vehserver[player] = createVehicle(609,2830.94849, 1294.29333, 10.77368) warpPedIntoVehicle(player, vehserver[player]) setElementVisibleTo(finblip, player, true) setElementVisibleTo(finmarker, player, true) outputChatBox("#483D8B[X] #FFFFFFPara Parar de Trabalhar Digite /Cancelar", player, 255, 255, 255, true); end else outputChatBox("#483D8B[X] #FF3232ERRO. #FFFFFFVoçe Já Está Trabalhando].", player, 255, 255, 255, true); end else outputChatBox("#483D8B[X] #FF3232ERRO. #FFFFFFNecessita Estar Nivel 35 Para Continuar", player, 255, 255, 255, true); end end function fim(player) if vehserver[player] and isElement(vehserver[player]) then givePlayerMoney(player, 1000) destroyElement(vehserver[player]) setElementVisibleTo(finblip, player, false) setElementVisibleTo(finmarker, player, false) outputChatBox("#00ff00Você GANHOU R$1000", player, 255,255,255,true) end end addEventHandler("onMarkerHit", finmarker, fim) function cancelarserver(player) destroyElement(vehserver[player]) setElementVisibleTo (finblip, player, false) setElementVisibleTo (finmarker, player, false) outputChatBox("#00ff00Você Cancelou", player, 255,255,255,true) end addCommandHandler("cancelar", cancelarserver) Fiz um Script bem simples mas quero que apenas pessoas com mais de level "35" possam usar esse trabalho, estou desde ontem tentando fazer isso mas não estou achando meu erro, se alguém puder me ajudar desde já agradeço.
  4. So I wanted to use a zm server's resources to play it on local server. After downloading the resources, I copied them to the resources library. I'm talking about appr. 60 different resources belonging to this one zm server, however I only added meta to the 'zombies' resources to see whether it is working or not. After started the local, I noticed the server does not spawn any zombies. ' ERROR: Couldn't parse meta file for resource 'zombies' [Line 9: Error reading Attributes.] ' This was the error message I got. What should I fix? Or is it possible that its problem is I only loaded this one resource (not all the 60) and it can't work individually? My own-made meta: <meta> <script src='client_anim.Lua' type='client' /> <script src='help_client.Lua' type='client' /> <script src='hide_client.Lua' type='client' /> <script src='lagreduce_client.Lua' type='client' /> <script src='Moneylogs.Lua' type='server' /> <script src='ped.ifp' type='client' /> <script src='petrol_c.Lua' type='client' /> <config src='skins.xml' type='' </config> <script src='textlib.Lua' type='server' /> <script src='textlib_anim.Lua' type='server' /> <file src='zombiewood.png' /> <file src='edf/zombiespawn.png' /> <file src='fonts/BIRTH_OF_A_HERO.ttf' /> <file src='fonts/bloody.ttf' /> <file src='fonts/esquisito.ttf' /> <file src='fonts/Quarmic.ttf' /> <file src='fonts/QuartzMS.ttf' /> <file src='fx/greyscale.fx' /> <file src='fx/rt_blend.fx' /> <file src='fx/shader_null.fx' /> <file src='fx/texreplace.fx' /> <file src='images/blips/0.png' /> <file src='images/blips/2.png' /> <file src='images/blips/6.png' /> <file src='images/blips/23.png' /> <file src='images/blips/41.png' /> <file src='images/blips/48.png' /> <file src='images/blood/blood_1.png' /> <file src='images/blood/blood_2.png' /> <file src='images/blood/blood_3.png' /> <file src='images/blood/blood_4.png' /> <file src='images/blood/blood_5.png' /> <file src='images/blood/blood_6.png' /> <file src='images/hud/0.png' /> <file src='images/hud/1.png' /> <file src='images/hud/2.png' /> <file src='images/hud/3.png' /> <file src='images/hud/4.png' /> <file src='images/hud/5.png' /> <file src='images/hud/6.png' /> <file src='images/hud/7.png' /> <file src='images/hud/8.png' /> <file src='images/hud/9.png' /> <file src='images/hud/10.png' /> <file src='images/hud/11.png' /> <file src='images/hud/12.png' /> <file src='images/hud/13.png' /> <file src='images/hud/14.png' /> <file src='images/hud/15.png' /> <file src='images/hud/16.png' /> <file src='images/hud/17.png' /> <file src='images/hud/18.png' /> <file src='images/hud/22.png' /> <file src='images/hud/23.png' /> <file src='images/hud/24.png' /> <file src='images/hud/25.png' /> <file src='images/hud/26.png' /> <file src='images/hud/27.png' /> <file src='images/hud/28.png' /> <file src='images/hud/29.png' /> <file src='images/hud/30.png' /> <file src='images/hud/31.png' /> <file src='images/hud/32.png' /> <file src='images/hud/33.png' /> <file src='images/hud/34.png' /> <file src='images/hud/35.png' /> <file src='images/hud/36.png' /> <file src='images/hud/37.png' /> <file src='images/hud/38.png' /> <file src='images/hud/39.png' /> <file src='images/hud/40.png' /> <file src='images/hud/41.png' /> <file src='images/hud/42.png' /> <file src='images/hud/43.png' /> <file src='images/hud/44.png' /> <file src='images/hud/45.png' /> <file src='images/hud/46.png' /> <file src='images/ranks/admin.png' /> <file src='images/ranks/admin1.png' /> <file src='images/ranks/admin2.png' /> <file src='images/ranks/admin3.png' /> <file src='images/ranks/headadmin.png' /> <file src='images/ranks/langmod.png' /> <file src='images/ranks/leadadmin.png' /> <file src='images/ranks/mod.png' /> <file src='images/ranks/mod1.png' /> <file src='images/ranks/mod2.png' /> <file src='images/ranks/mod3.png' /> <file src='images/ranks/mod4.png' /> <file src='images/ranks/owner.png' /> <file src='images/ranks/rank1.png' /> <file src='images/ranks/rank2.png' /> <file src='images/ranks/rank3.png' /> <file src='images/ranks/rank4.png' /> <file src='images/ranks/rank5.png' /> <file src='images/ranks/rank6.png' /> <file src='images/ranks/rank7.png' /> <file src='images/ranks/rank8.png' /> <file src='images/ranks/rank9.png' /> <file src='images/ranks/rank10.png' /> <file src='images/ranks/rank11.png' /> <file src='images/ranks/rank12.png' /> <file src='images/ranks/rank13.png' /> <file src='images/ranks/rank14.png' /> <file src='images/ranks/rank15.png' /> <file src='images/ranks/rank16.png' /> <file src='images/ranks/rank17.png' /> <file src='images/ranks/rank18.png' /> <file src='images/ranks/rank19.png' /> <file src='images/ranks/rank20.png' /> <file src='images/ranks/rank21.png' /> <file src='images/ranks/rank22.png' /> <file src='images/ranks/rank23.png' /> <file src='images/ranks/trialadmin.png' /> <file src='images/ranks/trialmod.png' /> <file src='images/ranks/vip.png' /> <file src='images/textures/radardisc.png' /> <file src='images/textures/radardisca.png' /> <file src='images/angrymode.png' /> <file src='images/blank.png' /> <file src='images/cautious.png' /> <file src='images/chromium.png' /> <file src='images/clickable.png' /> <file src='images/continue_.png' /> <file src='images/easy.png' /> <file src='images/egg.png' /> <file src='images/egg_sel.png' /> <file src='images/Fuel_Dot.png' /> <file src='images/Fuel_Gage.png' /> <file src='images/GAN.png' /> <file src='images/gtamplogo.png' /> <file src='images/hazardious.png' /> <file src='images/help.png' /> <file src='images/impossible.png' /> <file src='images/info.png' /> <file src='images/loading.png' /> <file src='images/logo.png' /> <file src='images/map.png' /> <file src='images/newsbg.png' /> <file src='images/panelbg.png' /> <file src='images/party.png' /> <file src='images/phone.png' /> <file src='images/radioactive.png' /> <file src='images/skills.png' /> <file src='images/satellite_.png' /> <file src='images/title.png' /> <file src='images/vip.png' /> <file src='images/warning_dot.png' /> <file src='images/wired.png' /> <file src='images/wrench.png' /> <file src='images/youtube.png' /> <file src='images/zmbg_.png' /> <file src='images/zombieHead.png' /> <file src='mods/a51_ext.txd' /> <file src='mods/flashlight.txd' /> <file src='mods/flashlight.dff' /> <script src='radio/radiogui.Lua' type='server' /> <config src='radio/radios.xml' type='' </config> <file src='skins/13.txd' /> <file src='skins/22.txd' /> <file src='skins/56.txd' /> <file src='skins/67.txd' /> <file src='skins/68.txd' /> <file src='skins/69.txd' /> <file src='skins/70.txd' /> <file src='skins/84.txd' /> <file src='skins/92.txd' /> <file src='skins/97.txd' /> <file src='skins/105.txd' /> <file src='skins/107.txd' /> <file src='skins/108.txd' /> <file src='skins/111.txd' /> <file src='skins/126.txd' /> <file src='skins/127.txd' /> <file src='skins/128.txd' /> <file src='skins/152.txd' /> <file src='skins/162.txd' /> <file src='skins/167.txd' /> <file src='skins/188.txd' /> <file src='skins/192.txd' /> <file src='skins/195.txd' /> <file src='skins/206.txd' /> <file src='skins/209.txd' /> <file src='skins/212.txd' /> <file src='skins/229.txd' /> <file src='skins/230.txd' /> <file src='skins/258.txd' /> <file src='skins/264.txd' /> <file src='skins/274.txd' /> <file src='skins/277.txd' /> <file src='skins/280.txd' /> <file src='skins/287.txd' /> <file src='skins/bfori.txd' /> <file src='skins/bfost.txd' /> <file src='skins/bikera.txd' /> <file src='skins/bmost.txd' /> <file src='skins/bmycon.txd' /> <file src='skins/bmyri.txd' /> <file src='skins/bmyst.txd' /> <file src='skins/cwmyhb1.txd' /> <file src='skins/cwmyhb2.txd' /> <file src='skins/dwmolc2.txd' /> <file src='skins/fam1.txd' /> <file src='skins/fam2.txd' /> <file src='skins/fam3.txd' /> <file src='skins/hfybe.txd' /> <file src='skins/hmyri.txd' /> <file src='skins/lvemt1.txd' /> <file src='skins/omyri.txd' /> <file src='skins/sbfyst.txd' /> <file src='skins/sbmyri.txd' /> <file src='skins/sofyst.txd' /> <file src='skins/somyst.txd' /> <file src='skins/swmotr4.txd' /> <file src='skins/swmyst.txd' /> <file src='skins/vhfyst.txd' /> <file src='skins/vwfyst1.txd' /> <file src='skins/wfyri.txd' /> <file src='skins/wfyro.txd' /> <file src='skins/wfyst.txd' /> <file src='skins/wmoice.txd' /> <file src='skins/wmori.txd' /> <file src='skins/wmybar.txd' /> <file src='skins/wmybe.txd' /> <file src='skins/wmybp.txd' /> <file src='skins/wmycr.txd' /> <file src='skins/wmymech.txd' /> <file src='skins/wmyst.txd' /> <file src='sounds/aced.mp3' /> <file src='sounds/beat.mp3' /> <file src='sounds/bodyExplode.ogg' /> <file src='sounds/boss_1.ogg' /> <file src='sounds/boss_2.ogg' /> <file src='sounds/boss_3.ogg' /> <file src='sounds/car_close.ogg' /> <file src='sounds/car_open.ogg' /> <file src='sounds/chopper.ogg' /> <file src='sounds/explosion1.mp3' /> <file src='sounds/explosion2.mp3' /> <file src='sounds/explosion3.mp3' /> <file src='sounds/fireworks.ogg' /> <file src='sounds/gates.ogg' /> <file src='sounds/lvlup_1.mp3' /> <file src='sounds/lvlup_2.mp3' /> <file src='sounds/mgroan1.ogg' /> <file src='sounds/mgroan2.ogg' /> <file src='sounds/mgroan3.ogg' /> <file src='sounds/mgroan4.ogg' /> <file src='sounds/mgroan5.ogg' /> <file src='sounds/mgroan6.ogg' /> <file src='sounds/mgroan7.ogg' /> <file src='sounds/mgroan8.ogg' /> <file src='sounds/mgroan9.ogg' /> <file src='sounds/mgroan10.ogg' /> <file src='sounds/phonepop.ogg' /> <file src='sounds/plasma.wav' /> <file src='sounds/pm_.wav' /> <file src='sounds/rocket.ogg' /> <file src='sounds/switch.wav' /> <file src='sounds/tick.wav' /> <file src='sounds/unjamm.mp3' /> <file src='sounds/wrenching.ogg' /> <file src='zskins/zomb1.dff' /> <file src='zskins/zomb1.txd' /> <file src='zskins/zomb2.dff' /> <file src='zskins/zomb2.txd' /> <file src='zskins/zomb3.dff' /> <file src='zskins/zomb3.txd' /> <file src='zskins/zomb4.dff' /> <file src='zskins/zomb4.txd' /> <file src='zskins/zomb5.dff' /> <file src='zskins/zomb5.txd' /> <file src='zskins/zomb6.dff' /> <file src='zskins/zomb6.txd' /> <file src='zskins/zomb7.dff' /> <file src='zskins/zomb7.txd' /> <file src='zskins/zomb8.dff' /> <file src='zskins/zomb8.txd' /> <file src='zskins/zomb9.dff' /> <file src='zskins/zomb9.txd' /> <file src='zskins/zomb10.dff' /> <file src='zskins/zomb10.txd' /> <file src='zskins/zomb11.dff' /> <file src='zskins/zomb11.txd' /> <file src='zskins/zomb12.dff' /> <file src='zskins/zomb12.txd' /> <file src='zskins/zomb13.dff' /> <file src='zskins/zomb13.txd' /> <file src='zskins/zomb14.dff' /> <file src='zskins/zomb14.txd' /> <file src='zskins/zomb15.dff' /> <file src='zskins/zomb15.txd' /> <file src='zskins/zomb16.dff' /> <file src='zskins/zomb16.txd' /> <file src='zskins/zomb17.dff' /> <file src='zskins/zomb17.txd' /> <file src='zskins/zomb18.dff' /> <file src='zskins/zomb18.txd' /> <file src='zskins/zomb19.dff' /> <file src='zskins/zomb19.txd' /> <file src='zskins/zomb20.dff' /> <file src='zskins/zomb20.txd' /> <file src='zskins/zomb21.dff' /> <file src='zskins/zomb21.txd' /> <file src='zskins/zomb22.dff' /> <file src='zskins/zomb22.txd' /> <file src='zskins/zomb23.dff' /> <file src='zskins/zomb23.txd' /> <file src='zskins/zomb24.dff' /> <file src='zskins/zomb24.txd' /> <file src='zskins/zomb25.dff' /> <file src='zskins/zomb25.txd' /> <file src='zskins/zomb26.dff' /> <file src='zskins/zomb26.txd' /> <file src='zskins/zomb27.dff' /> <file src='zskins/zomb27.txd' /> <file src='zskins/zomb28.dff' /> <file src='zskins/zomb28.txd' /> <file src='zskins/zomb29.dff' /> <file src='zskins/zomb29.txd' /> <export function="createZombie" type="server"/> <export function="isPedZombie" type="server"/> </meta>
  5. Ola gente, então eu to tentando criar um script e me deparei com um problema pra resolver eu iria precisar fazer com que uma certa arma n atirasse ou conseguisse ficar com ela na mão munição. Alguem sabe me dizer se isso é possivel?
  6. This is the code: local normalScoreGorget = 0 local maxMegjelenit = 1 -------------------- for i, row in pairs(scoreboard_rows) do if (i > normalScoreGorget and elem < maxMegjelenit) then elem = elem + 1 if getElementType(row) == "player" then ---DX things here........ elseif getElementType(row) == "team" then ---DX things here........ end end end end bindKey("mouse_wheel_down", "down", function() if normalScoreGorget < #scoreboard_rows - maxMegjelenit then normalScoreGorget = normalScoreGorget + 1 end end ) bindKey("mouse_wheel_up", "down", function() if normalScoreGorget > 0 then normalScoreGorget = normalScoreGorget - 1 end end ) This is the bug: how can i fix this?.. :s
  7. Receive a cordial greeting, I am a player in the race (DM) game mode, I usually attend a large majority of servers with fame like FFS for example. I am writing to you because I am currently with some old players close to reopening a server on the platform (Team-NeO), but for that we need a very good scripter, you have a contact or friend who knows the subject and who wants to join our team to launch the server? Any concerns or interested write me. Again I appreciate your attention. Discord: Keselowski#4824
  8. Boa Noite, Queria saber qual função devo usar para criar 1 ped apenas para o player? sem os outros ver ele. Quero colocar no meu Login um ped na rua so que aparece para os outros.
  9. Boa Noite, Queria saber como faz para fazer um download http para melhorar a velocidade de download do servidor. Se tiver algum tutorial. Estava vendo aqui e fiquei curioso iria me ajudar muito isso. Obrigado
  10. Tem como por placa de licença fixa? Depois de comprar um carro, a licença não será alterada após o seu logout ???
  11. [ajuda]tem algum erro no meu script? objetivo do meu script:aparecer uma mensagem de 5 em 5 minutos,e quando um player entra,uma mensagem de bem vindo. function MChat setTimer(function() outputChatBox("Seja bem vindo,nosso discord:mtasa://54.39.46.146:22043,leia as nossas regras!! " .. math.random(1,4), root, 255, 255, 255) end, 300000, 0) function MChat2() local joinedPlayerName = getPlayerName ( source ) local serverName = getServerName( ) outputChatBox("Seja bem vindo"..joinedPlayerName.."ao servidor"..serverName.."!", source, 255, 255, 255) end addEventHandler("onPlayerJoin",getRootElement(),greetPlayer)
  12. oq acham do meu script? function MChat setTimer(function() outputChatBox("Seja bem vindo,nosso discord:mtasa://54.39.46.146:22043,leia as nossas regras!! " .. math.random(1,4), root, 255, 255, 255) end, 300000, 0) function MChat2() local joinedPlayerName = getPlayerName ( source ) local serverName = getServerName( ) outputChatBox("Seja bem vindo"..joinedPlayerName.."ao servidor"..serverName.."!", source, 255, 255, 255) end addEventHandler("onPlayerJoin",getRootElement(),greetPlayer)
  13. Bom Dia, Pessoal queria saber qual a função que devo usar para fazer uma dx mostrando a respiração de baixo da água. Exemplo: quando mergulha de baixo da agua aparece uma Hud mostrando a respiração do Player
  14. Yes, I saw the wiki and it'd be awesome if I could make it real.. So I just copied it and replaced "float x float y float z" with my custom location but the server did not even find the resource itself. I had meta.xml next to it but nothing. I want as many guarding enemy slothbots as I want. Slothbot is also running but nothing.. please help! element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] )
  15. function bot1() bot1 = exports.slothbot:spawnBot (4845.0258789063, -1713.5711669922, 59.668750762939, 0, 108, 0, 0, teamLV, 31, "guarding", true ) end addEventHandler ( "onResourceStart", getResourceRootElement(), bot1 ) addEventHandler( "onBotWasted", getRootElement( ), function() setTimer( spawnBot, 5000, 1, source , 4845.0258789063, -1713.5711669922, 59.668750762939, 0, 108, 0, 0, teamLV, 31, "guarding", true ) end )
  16. Boa noite, Eu estou com uma HUD da Internet, porém o DINHEIRO QUE ESTÁ NO BANCO NAO fica na HUD alguem poderia me ajudar ja tentei pesquisar mas nao achei nada..... CODIGO HUD function dxDrawHud () local avatarSelec = getElementData(getLocalPlayer(), "avatar") if not avatarSelec then avatarSelec = 2 end local SaldoBank = getElementData(localPlayer, "banco:Saldo") or 0 local vida = getElementHealth ( getLocalPlayer() ) + 0.40000152596 local armor = math.floor (getPedArmor ( getLocalPlayer())) local stat = getPedStat ( getLocalPlayer(), 24 ) local oxgen = math.floor(getPedOxygenLevel(getLocalPlayer())) oxigenio = getPedOxygenLevel ( getLocalPlayer() ) --local money = string.format("%010d", getPlayerMoney(getLocalPlayer())) local money1 = string.format("%011d", getPlayerMoney(getLocalPlayer())) local money2 = getPlayerMoney(getLocalPlayer()) local procurado = getPlayerWantedLevel(getLocalPlayer()) local ammo = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local ammo1 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local money = convertNumber(getPlayerMoney(getLocalPlayer())) [CODIGO BANK] --[[ ################################################ # # # SCRIPT PRODUZIDO POR: # # FACEBOOK.COM/VAZERNMTA # # # # # ################################################ ]] local dxfont0_fonte = dxCreateFont("font/fonte.ttf", 11) local dxfont1_fonte = dxCreateFont("font/fonte.ttf", 13) atmTxd = engineLoadTXD("models/atm/kmb_atmx.txd") engineImportTXD(atmTxd, 2942) bankTxd = engineLoadTXD("models/bank/lanblokd.txd") engineImportTXD(bankTxd, 4005) local bankBot = createPed(150, 359.71246, 173.56975, 1008.38281, -90) local atm1 = createObject(2942, 359.86437, 188.99635, 1008.04281) local atm2 = createObject(2942, 360.86437, 188.99635, 1008.04281) local atm3 = createObject(2942, 361.86437, 188.99635, 1008.04281) local atm4 = createObject(2942, 1928.58215, -1768.56689, 13.14688, 0, 0, 90) local atm5 = createObject(2942, 1815.18152, -1557.53162, 13.08579, 0, 0, 70) local atm6 = createObject(2942, 1682.24341, -1272.46252, 14.41477, 0, 0, 0) local atm7 = createObject(2942, 1051.96143, -1131.20642, 23.42813, 0, 0, 0) local atm8 = createObject(2942, 537.36407, -1740.75659, 11.87771, 0, 0, 180) setElementInterior(atm1, 3) setElementDimension(atm1, 2) setElementInterior(atm2, 3) setElementDimension(atm2, 2) setElementInterior(atm3, 3) setElementDimension(atm3, 2) setElementInterior(bankBot, 3) setElementDimension(bankBot, 2) setElementFrozen(bankBot, true) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end function dxDrawLinedRectangle( x, y, width, height, color, _width, postGUI ) _width = _width or 1 dxDrawLine ( x, y, x+width, y, color, _width, postGUI ) -- Top dxDrawLine ( x, y, x, y+height, color, _width, postGUI ) -- Left dxDrawLine ( x, y+height, x+width, y+height, color, _width, postGUI ) -- Bottom return dxDrawLine ( x+width, y, x+width, y+height, color, _width, postGUI ) -- Right end local szx,szy = guiGetScreenSize() local tx, ty, tz = 1411.80339, -1699.87390, 13.53949 local sz = tz-2.5 local marker = createMarker (tx, ty, sz, "cylinder", 1, 241, 155, 0, 0) local screenW, screenH = guiGetScreenSize() local resW, resH = 1360,768 local x, y = (screenW/resW), (screenH/resH) local l_0_1 = false local l_0_2, l_0_3 = guiGetScreenSize() local l_0_4 = dxCreateScreenSource(l_0_2, l_0_3) grid = Grid(x*497, y*400, x*325, y*162) colum = grid:addColumn("Jogadores", x*200) grid:setVisible(false) function playersGrid() grid:clear() for i, player in pairs(getElementsByType("player")) do if (player ~= localPlayer) then grid:addItem(colum, getPlayerName(player):gsub("#%x%x%x%x%x%x", "")) end end end addEventHandler("onClientPlayerQuit", root, playersGrid) addEventHandler("onClientPlayerJoin", root, playersGrid) addEventHandler("onClientResourceStart", resourceRoot, playersGrid) addEventHandler("onClientPlayerChangeNick", root, playersGrid) addEventHandler("onClientRender", root, function() if l_0_1 then dxUpdateScreenSource(l_0_4) dxDrawImage(0, 0, l_0_2, l_0_3, l_0_4) end end ) addEventHandler ( "onClientRender", root, function ( ) vx, vy, vz = getElementPosition(marker) scX, scY = getScreenFromWorldPosition(vx, vy, vz+3.5) cx,cy,cz,clx,cly,clz,crz,cfov = getCameraMatrix() dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz+3.5) if scX then largura, altura = 626, 350 Tx = scX-(5000/dist)*szx/626/largura*cfov Ty = scY-(100/dist)*szy/350/altura*cfov Tw = (5000/dist)*szx/400/largura*cfov Th = (5000/dist)*szy/400/altura*cfov if dist < 80.0 then if (isLineOfSightClear(cx, cy, cz, vx, vy, vz+1.5, true, false, false)) then if not isElementWithinMarker(localPlayer, marker) then --dxDrawText("$", Tx, Ty, Tw, Th + 40, tocolor(255, 255, 255, math.abs(math.sin(getTickCount()/700))*200), 1.00, dxfont1_fonte, "left", "top", false, false, true, true, false) --dxDrawText("Loja de #f19b00vida #ffffffe #f19b00colete", Tx, Ty + 120, Tw, Th + 40, tocolor(255, 255, 255, math.abs(math.sin(getTickCount()/700))*200), 1.00, dxfont2_fonte, "left", "top", false, false, true, true, false) dxDrawImage ( Tx, Ty, Tw, Th, "gfx/joinIcon.png",0,0,0,tocolor(255,255,255,255)) end end end end end) function cancelPedDamage(attacker) cancelEvent() end addEventHandler("onClientPedDamage", bankBot, cancelPedDamage) function caixaUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg2.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*464, y*366, x*93, y*95) and "gfx/ui/t_button2.png" or "gfx/ui/t_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*625, y*366, x*93, y*95) and "gfx/ui/d_button2.png" or "gfx/ui/d_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768, isCursorOnElement(x*778, y*366, x*93, y*95) and "gfx/ui/r_button2.png" or "gfx/ui/r_button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function acessingUI() exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg1.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function depositUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgd.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("2", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText(" Cancelar", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*480, x*540, y*56, isCursorOnElement(x*502, y*480, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) dxDrawText(" Depositar", x*619, y*497, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function sacUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgr.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("3", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText(" Cancelar", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*480, x*540, y*56, isCursorOnElement(x*502, y*480, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) dxDrawText(" Retirar", x*619, y*497, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function transUI() local money = convertNumber(getPlayerMoney(localPlayer)) local bankMoney = convertNumber(getElementData(localPlayer, "Bank:Royal")) exports["fx_blur"]:dxDrawBluredRectangle(0, 0, screenW, screenH, tocolor(255, 255, 255, 255)) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1360, y*768,"gfx/ui/bgt.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", ""), x*310, y*158, x*406, y*182, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) dxDrawText("R$ "..money, x*339, y*189, x*426, y*213, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("R$ "..bankMoney, x*340, y*216, x*427, y*240, tocolor(0, 0, 0, 127), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawRectangle(x*402, y*564, x*540, y*56, isCursorOnElement(x*502, y*564, x*320, y*56) and tocolor(0, 84, 131, 255) or tocolor(0, 112, 175, 255), false) createEditBox("1", 0.379, 0.443, 0.22, 0.06, true, "", false, 7, "arial", false, 1, {0, 0, 0, 127 }, true, { 0, 0, 0, 55 }, 1, true, 60, true, "Digite o valor", { 0, 0, 0, 127 }, true, 1, "arial", true, true, {0, 0, 0}, false) dxDrawText("Transferir", x*619, y*580, x*706, y*441, --[[isCursorOnElement(x*502, y*401, x*320, y*56) and]] tocolor(255, 255, 255, 255)--[[ or tocolor(0, 0, 0, 127)]], 1.00, dxfont1_fonte, "left", "top", false, false, false, false, false) if getElementData(localPlayer, "Notification") then dxDrawText("[Erro] "..getElementData(localPlayer, "Notification"), x*240, y*680, x*706, y*441, tocolor(255, 0, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end if getElementData(localPlayer, "Notification:S") then dxDrawText("[Sucesso] "..getElementData(localPlayer, "Notification:S"), x*240, y*680, x*706, y*441, tocolor(0, 255, 0, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) end end function render() local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, worldx, worldy, worldz ) local tx, ty, tz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(atm1) local rx2, ry2, rz2 = getElementPosition(atm2) local rx3, ry3, rz3 = getElementPosition(atm3) local rx4, ry4, rz4 = getElementPosition(atm4) local rx5, ry5, rz5 = getElementPosition(atm5) local rx6, ry6, rz6 = getElementPosition(atm6) local rx7, ry7, rz7 = getElementPosition(atm7) local rx8, ry8, rz8 = getElementPosition(atm8) local distancia = getDistanceBetweenPoints3D(tx, ty, tz, rx, ry, rz) local distancia2 = getDistanceBetweenPoints3D(tx, ty, tz, rx2, ry2, rz2) local distancia3 = getDistanceBetweenPoints3D(tx, ty, tz, rx3, ry3, rz3) local distancia4 = getDistanceBetweenPoints3D(tx, ty, tz, rx4, ry4, rz4) local distancia5 = getDistanceBetweenPoints3D(tx, ty, tz, rx5, ry5, rz5) local distancia6 = getDistanceBetweenPoints3D(tx, ty, tz, rx6, ry6, rz6) local distancia7 = getDistanceBetweenPoints3D(tx, ty, tz, rx7, ry7, rz7) local distancia8 = getDistanceBetweenPoints3D(tx, ty, tz, rx8, ry8, rz8) if not isEventHandlerAdded("onClientRender", root, caixaUI) then if (distancia <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm1 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia2 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if hit then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if elementHit == atm2 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia3 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm3 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia4 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm4 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia5 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm5 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia6 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if hit then if elementHit == atm6 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia7 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm7 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end if (distancia8 <= 1.5) then if not isEventHandlerAdded("onClientRender", root, caixaUI) then if not isEventHandlerAdded("onClientRender", root, depositUI) then if not isEventHandlerAdded("onClientRender", root, transUI) then if not isEventHandlerAdded("onClientRender", root, sacUI) then if not isEventHandlerAdded("onClientRender", root, acessingUI) then if hit then if elementHit == atm8 then addEventHandler("onClientRender", root, acessingUI) setElementFrozen(localPlayer, true) setTimer(function() if not isEventHandlerAdded("onClientRender", root, caixaUI) then addEventHandler("onClientRender", root, caixaUI) end removeEventHandler("onClientRender", root, acessingUI) showCursor(true) setElementFrozen(localPlayer, false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(false) end, 2500, 1) end end end end end end end end end end addEventHandler("onClientClick", root, render) local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local maxrange = 20 function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font, ...) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getCameraMatrix() local distance = distance or 20 local height = height or 1 local value1 = 2 local value2 = 2 if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+value1, sy+value2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center", false, false, false, true, false) end end end end function wolrdTexts() dxDrawTextOnElement(bankBot,"Atendente #1066e7(BOT)",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm1,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm2,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm3,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm4,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm5,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm6,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm7,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") dxDrawTextOnElement(atm8,"Clique para utilizar ",1,20,255,255,255,255,1.5,"default") end addEventHandler("onClientRender",rootElement, wolrdTexts) function closePanel(_,state) if isEventHandlerAdded("onClientRender", root, caixaUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) showChat(true) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) end end end if isEventHandlerAdded("onClientRender", root, transUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(true) playSound("sfx/hit.mp3", false) grid:setVisible(false) removeEventHandler("onClientRender", root, transUI) changeVisibility("1", false) end end end if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) showChat(true) playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) changeVisibility("2", false) removeEventHandler("onClientRender", root, depositUI) end end end if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*1068, y*94, x*36, y*38) then showCursor(false) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", false) showChat(true) playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, sacUI) changeVisibility("3", false) end end end if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, sacUI) addEventHandler("onClientRender", root, caixaUI) changeVisibility("3", false) end end end if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, depositUI) addEventHandler("onClientRender", root, caixaUI) changeVisibility("2", false) end end end end addEventHandler("onClientClick", root, closePanel) function uiButtons(_,state) if isEventHandlerAdded("onClientRender", root, caixaUI) then if state == "down" then if not isEventHandlerAdded("onClientRender", root, transUI) or isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, sacUI) then if isCursorOnElement(x*464, y*366, x*93, y*95) then -- trans playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, transUI) grid:setVisible(true) changeVisibility("1", true) end end if not isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, sacUI) or isEventHandlerAdded("onClientRender", root, transUI) then if isCursorOnElement(x*625, y*366, x*93, y*95) then -- deposit playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, depositUI) changeVisibility("2", true) end end if not isEventHandlerAdded("onClientRender", root, sacUI) or isEventHandlerAdded("onClientRender", root, depositUI) or isEventHandlerAdded("onClientRender", root, transUI) then if isCursorOnElement(x*778, y*366, x*93, y*95) then -- sac playSound("sfx/hit.mp3", false) removeEventHandler("onClientRender", root, caixaUI) addEventHandler("onClientRender", root, sacUI) changeVisibility("3", true) end end end end end addEventHandler("onClientClick", root, uiButtons) function depositButton(_,state) if isEventHandlerAdded("onClientRender", root, depositUI) then if state == "down" then if isCursorOnElement(x*502, y*480, x*320, y*56) then if getText("2") then if tonumber(getText("2")) < getPlayerMoney(localPlayer) or tonumber(getText("2")) == getPlayerMoney(localPlayer) then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) changeVisibility("2", false) removeEventHandler("onClientRender", root, depositUI) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") + tonumber(getText("2"))) setElementData(localPlayer, "Notification", false) triggerServerEvent("onDepositMoney", localPlayer, localPlayer, tonumber(getText("2"))) setElementData(localPlayer, "Notification:S", "Depósito de R$ "..tonumber(getText("2")).." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end end end end end addEventHandler("onClientClick", root, depositButton) function saqueButton(_,state) if isEventHandlerAdded("onClientRender", root, sacUI) then if state == "down" then if isCursorOnElement(x*502, y*480, x*320, y*56) then if getText("3") then if tonumber(getText("3")) == getElementData(localPlayer, "Bank:Royal") or tonumber(getText("3")) < getElementData(localPlayer, "Bank:Royal") then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) removeEventHandler("onClientRender", root, sacUI) changeVisibility("3", false) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") - tonumber(getText("3"))) setElementData(localPlayer, "Notification", false) triggerServerEvent("saqueBankMoney", localPlayer, localPlayer, tonumber(getText("3"))) setElementData(localPlayer, "Notification:S", "Retirada de R$ "..tonumber(getText("3")).." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end end end end end addEventHandler("onClientClick", root, saqueButton) function transButton(_,state) local gridItem = grid:getSelectedItem() local item = grid:getItemDetails(colum, gridItem) if isEventHandlerAdded("onClientRender", root, transUI) then if state == "down" then if isCursorOnElement(x*502, y*564, x*320, y*56) then -- if getPlayerFromName(item) then if getText("1") then if tonumber(getText("1")) == getElementData(localPlayer, "Bank:Royal") or tonumber(getText("1")) < getElementData(localPlayer, "Bank:Royal") then playSound("sfx/hit.mp3", false) addEventHandler("onClientRender", root, caixaUI) grid:setVisible(false) changeVisibility("1", false) removeEventHandler("onClientRender", root, transUI) setElementData(localPlayer, "Bank:Royal", getElementData(localPlayer, "Bank:Royal") - tonumber(getText("1"))) setElementData(localPlayer, "Notification", false) setElementData(localPlayer, "Notification:S", "Transferência de R$ "..tonumber(getText("1"))..", para "..item.." feito!") setTimer(setElementData, 7000, 1, localPlayer, "Notification:S", false) triggerServerEvent("transMoney", localPlayer, tonumber(getText("1")), item) else playSound("sfx/hit.mp3", false) setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Você não possui este valor!") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end end --[[else setElementData(localPlayer, "Notification:S", false) setElementData(localPlayer, "Notification", "Jogador não encontrado! Verifique se ocorreu mudança no nome.") setTimer(setElementData, 7000, 1, localPlayer, "Notification", false) end]] end end end end addEventHandler("onClientClick", root, transButton) function isCursorOnElement( posX, posY, width, height ) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end
  17. I created a scoreboard system, but when i make a team, the team does not show in scoreboard.. how can i add this after playerlist?
  18. Boa Noite, queria saber qual e a função que faz mexer o setCameraMatrix vi em um servidor e queria colocar ele fica meio que girando de um lado para o outro devagar sem sair do local
  19. On my client the dx-font working fine, but with another client the dx-font does not working.. Got this warning: WARNING: customchat\sourceC.Lua:164: Bad argument @ 'dxDrawText' [Expected dx-font at argument 8, got boolean] the code: local TwCen14s = dxCreateFont('TwCen.ttf', 10) dxDrawText("Chat: #ffFFff"..chat.input, sx / 2 - 450 - 255, sy / 2 - 356 - 60 + 25 * chat.maxShowedMessage, 450, 300, tocolor(255, 181, 64, 255), 1, TwCen14s,_,_,_,_,_,true) what wrong?... how can i fix this problem?
  20. Boa noite, queria saber que função eu uso para tirar dano do tanque de guerra o hrino. ele nao recebe dano ai queria colocar ele para tirar
  21. Ola, estou tendo problemas para criar um script para modificar como texturas, eles simplismente n funcionam, ja fiz de tudo, mas não instrumento.meu script: meta: <meta> <info type = "map" version = "1.0.0"> </ info> <mapa src = "BASE-SAMU.map" dimension = "0"> </ mapa> <arquivo src = "a51vntcvx. txd "/> <arquivo src =" drydockgate_sfse.txd "/> <arquivo src =" a51jdrx.txd "/> <script src =" txd.Lua "tipo =" cliente " <configurações> <configuração name =" # maxplayers "value =" [128] "> </ setting> <nome da configuração =" # useLODs "value =" [false] "> </ setting> <nome da configuração =" # gamespeed "value =" [1] "> < / setting> <setting name = "# minplayers"value = "[0]"> </ setting> <nome da configuração = "# gravidade" value = "[0.008]"> </ setting> <nome da configuração = "# waveheight" value = "[0]"> </ configuração> <nome da configuração = "# locked_time" value = "[false]"> </ setting> <nome da configuração = "# weather" value = "[0]"> </ setting> <nome da configuração = "# time" value = "12: 0"> </ setting> </ settings> <script src = "mapEditorScriptingExtension_s.Lua" tipo = "servidor"> </ script> <script src = "mapEditorScriptingExtension_c.Lua" tipo = "cliente" validate = " false "> </ script> </ meta> arquivo pra carregar o txd (eu acho) addEventHandler ('onClientResourceStart', resourceRoot, função () txd1 = engineLoadTXD ('a51jdrx') engineImportTXD (txd1, 3095) txd2 = engineLoadTXD ('drydockgate_sfse') engineImportTXD (txd2, 10841) txd3 = engineLoadTXD ('a51vntcvx') engineImportTXD (txd3 3117)
  22. Bom dia, Estou precisando de uma ajuda num sistema que to precisando de uma ajuda mais to fazendo errado pq nao sabia como fazer. Que é aparecer um icone mostrando que o jogador ta com o ping acima do limite. a imagem deu certo so que nao consigo destruir quando fica abaixo disso function teste() if getPlayerPing(getLocalPlayer()) > 180 then imagensnet = guiCreateStaticImage(0.85, 0.85, 0.03, 0.05, "net.png", true) setElementData(getLocalPlayer(),"pingaltyo",true) outputChatBox("alto ping") else if getElementData(getLocalPlayer(),"pingaltyo") then if isElement(imagensnet) then destroyElement(imagensnet) end end end end addEventHandler("onClientRender", getRootElement(), teste)
  23. How can i replace model for only 1 car? Not for all of them. for example. i got 2 perennials, i want to make first in sedan and second in coupe, and i want to spawn two in the same time.
  24. Bom Dia, queria criar uma função no meu sistema de login a onde, o ped que fica no login mostra a mochila e o armamento que ele esta equipado. ai queria saber quais as função que devo usar no ped para aparecer em questão da mochila que fica nas costas devo usar um bone_attach? Obrigado
  25. Bom Dia, Preciso de uma ajuda. Fiz um botão não meu login .png e usei o guiCreateStaticImage, para fazer que ele não seja destruído quando eu clico nele function createImageButtonLogin(x,y,widht,height,text,bool,parent,image,info) button = guiCreateStaticImage(x,y,widht,height,"Images/"..image..".png",true) guiBringToFront(button) label = guiCreateLabel(0,0,1,1,text,bool,button) guiBringToFront(label) setElementData(label,"parent",button) setElementData(label,"nome",text) setElementData(button,"info",info) setElementData(button,"image",image) guiLabelSetVerticalAlign(label,"center") guiLabelSetHorizontalAlign(label,"center") return label end login_window = guiCreateStaticImage(0, 0, 1, 1, "Images/BG2.png", true) login_play = createImageButtonLogin(0.05,0.4,0.12,0.04,"",true,login_window,"play") login_char = createImageButtonLogin(0.05,0.45,0.12,0.04,"",true,login_window,"caract") -- login_about = createImageButtonLogin(0.05,0.5,0.12,0.04,"",true,login_window,"info") login_Sair = createImageButtonLogin(0.05,0.5,0.12,0.04,"",true,login_window,"quit") Ja usei isso e nao vai function detroisss(login_window,login_play,login_char,login_Sair) if isElement(login_window) then destroyElement(login_window) guiSetVisible(login_window,false) end if isElement(login_play) then destroyElement(login_play) guiSetVisible(login_play,false) end if isElement(login_char) then destroyElement(login_char) guiSetVisible(login_char,false) end if isElement(login_Sair) then destroyElement(login_Sair) guiSetVisible(login_Sair,false) end end Imagem https://ibb.co/2dgC9N9 https://ibb.co/2dgC9N9