Jump to content

MAB

Members
  • Posts

    313
  • Joined

  • Last visited

Everything posted by MAB

  1. Hi i need your help with a dx drawing functions... i am making a dx speedometer but this my first time to deal with dx and gui stuff so i looked to the drawing functions i didn't find anything in the rectangle that makes my able to write in that rectangle dxDrawText...do u use that to write on the rectangle? what about progress bars? how u make them inside the rectangle?? I NEED AN EXAMPLE NOT TO TELL ME WHAT FUNCTION TO USE also the rectangles ain't getting destroyed when the player leaves the vehicle code: function draw () nitro = dxDrawRectangle(929, 619, 170, 33, tocolor(57, 59, 50, 100), false) fuel = dxDrawRectangle(929, 576, 170, 33, tocolor(57, 59, 50, 100), false) speed = dxDrawRectangle(929, 533, 170, 33, tocolor(57, 59, 50, 100), false) lock = dxDrawRectangle(929, 490, 170, 33, tocolor(57, 59, 50, 100), false) engine = dxDrawRectangle(929, 447, 170, 33, tocolor(57, 59, 50, 100), false) light = dxDrawRectangle(929, 404, 170, 33, tocolor(57, 59, 50, 100), false) end function event () addEventHandler("onClientRender", root, draw) end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),event) function destroy () destroyElement(nitro) destroyElement(fuel) destroyElement(speed) destroyElement(lock) destroyElement(engine) destroyElement(light) end addEventHandler("onClientPlayerVehicleExit",getRootElement(),destroy)
  2. MAB

    Questions

    Thank you... question 2 i done it myself
  3. MAB

    Questions

    Question one : How to hide the health bar that appears when you aim at someone with a gun? Question two: I made a marker and made it invisible for a player and used setAccountData and getAccountData to stop the function from starting if his account data is the value i set also i tried if not isElementVisibleTo and didn't work .. note : the player logged in.
  4. MAB

    Fast help

    what function should i use to draw things like in that resource? https://community.multitheftauto.com/index.php?p=resources&s=details&id=6738
  5. MAB

    Come on

    All i want is to bind arrow up to change the player torso clothes and down to change the trouser... is that hard? no mod them or add new clothes... change it to other exist GTA cj clothes https://forum.multitheftauto.com/viewtopic.php?f=91&t=89739
  6. MAB

    1 fast question

    change his T-shirt to other exist one and the trouser as well
  7. MAB

    1 fast question

    The god damn changing clothes function what hell i type there about changing the clothes
  8. MAB

    1 fast question

    i know that... i want to know the function that i will bind...what to wtrite at the function
  9. MAB

    Question (?)

    If what u want is adding weapons inaddition to GTA original weapons then u can't but u can change the shape of the original weapons ... first download the mod you want second go to mta wiki and search for "txd" and you will find an example about what i am saying.. u will find in the mod files a .txd file and .dff file copy them and past them to an empty folder then make a meta.xml and .lua file.. u will find the codes u need at the example and also the weapon u want to change id is needed .. at the xml type something like that.. look at meta .xml for something like that..at the end put the at the resources folder or .zip ... sorry i can't show u an example because am in my phone
  10. MAB

    1 fast question

    i am making a clothes shop script i 1 questions ( i tried and failed ) i know how to bind but don't know how to use these functions.... i want to make a marker and on that marker hit i want to bind "up arrow" to change the Player shirt and "down arrow" to change the trouser .... addPedClothes getPedClothes getClothesTypeName
  11. Thank you very much
  12. Does anyone know to make other players icons at the F11 map invisible? i mean...the player can only see his icon at the map but others are invisible...thank you
  13. MAB

    Small problem

    Thank you very much Walid.... now i know where was my mistake
  14. MAB

    Small problem

    it is saying that it failed to load the script because of something near ping at line 4 at little help here function ping ( player, command ) local name = getPlayerName ( player ) local ping = getPlayerPing ( player ) outputChatBox( name.."'s ping is"ping.."!", root, 255, 255, 0, false ) end addCommandHandler ( "ping", ping )
  15. MAB

    Help

    i am making a Ghost town script using slothbot but there is a addEventHandler problem at although it worked before Help! the problem happened because the bot isn't getting spawned i don't why local GhostRadar = createRadarArea ( -465.25684, 2173.76489, 130, 110, 255, 0, 0, 255 ) local GhostCol = createColCuboid ( -465.25684, 2173.76489, 40, 127, 100, 20 ) createBlip( -399.48187, 2233.17896, 42.42969, 23 ) addEvent ( "onBotWasted", true ) addEvent ( "onBotSpawned", true ) function onHit ( hitElement ) if getElementType ( hitElement ) == "player" then x,y,z = getElementPosition ( hitElement ) Timer = setTimer ( Spawn, 5*1000, 1) end if getElementType ( hitElement ) == "vehicle" then setElementHealth ( hitElement, 25 ) end end addEventHandler ( "onColShapeHit", GhostCol, onHit ) function Spawn () bot1 = exports["slothbot"]:spawnBot ( x + 5, y, z, 90, math.random ( 1, 100 ), 0, 0, nil, math.random ( 2, 9 ), "chasing" ) bot2 = exports["slothbot"]:spawnBot ( x, y + 5, z, 90, math.random ( 1, 100 ), 0, 0, nil, math.random ( 2, 9 ), "chasing" ) end function Events () if bot1 and bot2 then addEventHandler ( "onBotWasted", bot1, OnWasted ) addEventHandler ( "onBotWasted", bot2, OnWasted ) addEventHandler ( "onBotSpawned", bot1, OnSpawn ) addEventHandler ( "onBotSpawned", bot2, OnSpawn ) end end addEventHandler ( "onBotSpawned", bot1, Events ) addEventHandler ( "onBotSpawned", bot2, Events ) function OnWasted ( attacker, weapon, bodypart ) if attacker then if isElementWithinColShape ( attacker, GhostCol ) then if bodypart ~= 9 then givePlayerMoney ( attacker, 1000 ) end if bodypart == 9 then givePlayerMoney ( attacker, 2000 ) end end end end function OnSpawn () players = getElementsByType( "player", GhostCol ) setBotChase ( source, players ) end function onLeave ( leaveElement ) if Timer then killTimer ( Timer ) end end addEventHandler ( "onColShapeLeave", GhostCol, onLeave )
  16. MAB

    help fast

    How to create a table of locations and randomly when the player joins the game...he get spawned a one of the locations of the table?! i tried this but didn't work locations = { [1] = "-375.14301 2192.22534 42.03526", [2] = "-371.94513 2206.79468 42.41978" } function spawn () local x,y,z = math.random (1,2) spawnPlayer ( source,x.y,z ) addEventHandler ( "onPlayerJoin", getRootElement(), spawn)
  17. MAB

    Help quickly please

    it isn't working... should i run the resource first? By the way..nice unlimite TUT
  18. MAB

    Help quickly please

    I know that .... it isn't working should i run the resource then try?
  19. Does anyone know how to use the slothbot resource to spawn a bot ? I tried but i couldn't..
  20. MAB

    Unsolved

    https://forum.multitheftauto.com/viewtopic.php?f=91&t=89530
  21. MAB

    [Help] Slothbot

    Didn't work....2 errors not 1 error now
  22. MAB

    [Help] Slothbot

    ERROR: attempt to call global 'spawnBot' bot1 = spawnBot ( x + 5, y, z, 0, math.random ( 1, 312 ), 0, 0, nil, math.random ( 333, 339 ), "chasing" )
  23. MAB

    GamerZZoNe

    Hello... Today i am going to talk about one of the top RPG servers on MTA...it is GamerZZoNe a 100% Roleplay IP : mtasa://5.175.181.63:22003 forum: Gamerzzone.gq -It has a Postman , Pilot , Bus Driver , Taxi Driver , Pizza boy and Criminal Jobs and more is coming soon -It has a perfect Vehicles shops and vehicles system -Weapons shop -A help panel with F1 it will tell you everything you need -A bank system -Very NICE turf system -Modshop , Clothes shop and a Base JUMP -Green zones and a quick transport system All you need is in there....What you waiting?! Join it now
  24. MAB

    Unsolved

    post your code here. What Code?! i am trying to do something for the first the time i failed so i deleted the code because i am sure that it isn't going to work...fast please...this is my last function i must finish that last function today
  25. MAB

    Unsolved

    Do it by yourself then post your code here , and we will help you stop asking for ready codes. BTW try to use an other subject. I tried many things but all failed so i came here ...who said i didn't try?
×
×
  • Create New...