-
Posts
313 -
Joined
-
Last visited
Everything posted by MAB
-
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)
-
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.
-
change his T-shirt to other exist one and the trouser as well
-
The god damn changing clothes function what hell i type there about changing the clothes
-
i know that... i want to know the function that i will bind...what to wtrite at the function
-
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
-
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
-
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
-
Thank you very much Walid.... now i know where was my mistake
-
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 )
-
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 )
-
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)
-
it isn't working... should i run the resource first? By the way..nice unlimite TUT
-
I know that .... it isn't working should i run the resource then try?
-
Does anyone know how to use the slothbot resource to spawn a bot ? I tried but i couldn't..
-
Didn't work....2 errors not 1 error now
-
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" )
-
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