Jump to content

Search the Community

Showing results for tags 'bug'.

  • 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

  1. hello all i don't know weather its legal or illegal to post this thread if its illegal i am sorry admins you can delete this thread ! but i want to show a proof that hacks possible in mta i recently recorded a video last month but i uploaded it yesterday due to slow net in this video there is guy name cyborg he usually knifing in warehouse with speed bug its like he is playing mta in 0 ping but his ping was 120 ping he was so fast that we didn't encounter on him he was not able to die due to is speed ability ! so watch this video which shows a completely speed bug its just a proof video its not for any type of knowledge base
  2. Ola jogadores preciso de ajuda pois eu chego a uma parte do download de servers e ele para trava o jogo e começa a dar load e fazendo isso nao consigo baixar o resto e quando ele da load nos mods ele crasha mostrando algumas dll me ajudem nao consigo entrar em servidor nenhum ja desisntalei e reinstalei tudo mta, gta e os mods me ajudem ele chega aos 400mb e dps acontece isso ;-;
  3. Meu Servidor De Mta Esta Com Um Problema Que Esta Aparecendo Mensagens No Chat Quando Um Jogador Morre Ou Troca o Nick ((Obs: NÃO É O SCRIPT DEATHMESSAGES POIS ESTA DESATIVADO)) | Olha:
  4. Hello, I would like to know if you can help me ... My MTA is not coming out sound, but the GTA yes, I would like you to help me because I'm with this problem a year ago
  5. Eu tenho uma hud modificada em meu servidor, mas tem momentos que a original aparece atrás da nova, tipo quando abro alguma coisa na tela como algum painel e etc, eu tenho um cinema, se eu abro ele a hud vem tmb, mas mesmo removendo cinema do servidor ela vem em outros scripts, as vezes o chat some também com isso, e tipo digamos que eu dei restart no painel de login, eu vou bugar se eu clicar em não logar e jogar como guest e o chat vai sumir. Resumindo ele some ou a hud antiga volta, e não achei nada que ativasse a antiga denovo, tanto que usei o prórpio tópico de ajuda daqui e fiz um script de showhud... mas é apenas para login, oq n me resolve pq quando faço login é normal. Obrigado a quem souber me ajudar!
  6. Estou com um erro no meu MTA que ele esta com erro de textura as vezes estou jogando e derepente a textura fica azul e fecha o jogo isso acontece varias vezes nao tem como jogar desse geito alguem me ajuda
  7. Ajuda ai gente meu mouse no mta fica puxando pra baixo toda vez que miro
  8. Gostaria de saber porque, está aparecendo duas mensagens, após digitar, aparece uma do Freeroam, e outra com a Tag que coloquei, quando dou debuscript 3, aparece que está dando erro na linha 1208 do fr_client.lua, e a linha 442 do gui.lua, gostaria de esclarecer este erro. Fica assim: #Death!^: Este erro aqui! ⟦ Đono ⟧ : #Death!^: Este erro aqui!
  9. Already in the game menu starts to crash constantly, already tried everything you have in the forum, updated drivers, I ran as administrator, I ran in compatibility mode, I used MTADIAG and nothing worked. I played it a few months back normally, now when I came back it started. Thanks in advance for any help.
  10. I need a help from the community, it is possible to prevent a player from using a specific bind, such as crouching on the mouse1, if possible, how to do it. Many players take advantage of bugs because of this, I wanted the player to be kicked when entering with bind or to take kick when to configure this bind
  11. When i press the F11, just the local player blip displayed, and the other players are not.. How to fix this?
  12. Hello. Sry for my english. I creating object: local element_object = createObject(13025, 123.123, 123.123, 123.123, 123.123, 123.123, 123.123) I creating collision: local element_col = createColCircle(0.0, 0.0, 25.0) I attach collision to object attachElements(element_col, element_object) And when i hit collision onElementColShapeHit not call. wtf? what i doing wrong? But i attach object to collision then everything works. attachElements(element_object, element_col) -- change variables
  13. when entering the mta in the main menu a great lag and delay for response of the mouse, when entering the server I play quietly but when turning the vision (mouse) has an immense drop of fps, from 50 fps I went to 30 and when turning it goes for 10 and back normally I play mta 4 years is the first time this happens, it started out of nowhere I already reinstalled mta e gta sa !!!!
  14. Hello guys, lemme explain about my problem.. I bought a new laptop, and when I installed MTA all worked fine, but when I join in a server I can't see players name.. I only see life bar and ''TAG'' like ''Admin'' or ''Police Officer'' it's a RPG server, but I can't see the name of those players.. PLEASE HELP ME GUYS :c I'm using Windows 10 and settings of Radeon in a laptop.. Thanks all
  15. Hi, i've tried to play using MTA, but every time i try, appears a message box thats says: ''you were kicked from the server (VF #20070000)'' this happening with all server i've tried to enter. this is the MTAdiag pastebin link: https://pastebin.mtasa.com/445948885
  16. this is the code(not the full code): function markerbelepkocsival() if isPedInVehicle ( localPlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( localPlayer ) addEventHandler("onClientRender", root, paynspray1) addEventHandler("onClientRender", root, paynspray2) addEventHandler("onClientRender", root, paynspray4) guiSetVisible(GUIEditor.button[1], true) guiSetVisible(GUIEditor.button[2], true) guiSetVisible(GUIEditor.button[3], true) setElementFrozen ( playerVehicle, true ) playSound("1.mp3") showChat(false) showCursor(true) end end addEventHandler ( "onClientMarkerHit", merker1, markerbelepkocsival ) when i hit the marker, the panel will appear to everyone.. how to fix this? :c
  17. I added this: to the nametag script.. but with 1-2 player working fine, and with more players, always show the chaticon.. How to fix this?
  18. Hello people, I need your help. I was getting "Attempting to index global (nil value)" a lot in past, but i have solved them, somehow. I really don't know why those errors appear. I even separated each event to single files, doesn't help anyway. Code: function loadWeaponsOnSpawn() local ped = source local account = getPlayerAccount(source) local weapon0 = getAccountData(account,"weapon0") local weapon1 = getAccountData(account,"weapon1") local weapon2 = getAccountData(account,"weapon2") local weapon3 = getAccountData(account,"weapon3") local weapon4 = getAccountData(account,"weapon4") local weapon5 = getAccountData(account,"weapon5") local weapon6 = getAccountData(account,"weapon6") local weapon7 = getAccountData(account,"weapon7") local weapon8 = getAccountData(account,"weapon8") local weapon9 = getAccountData(account,"weapon9") local weapon10 = getAccountData(account,"weapon10") local weapon11 = getAccountData(account,"weapon11") local weapon12 = getAccountData(account,"weapon12") local ammo0 = getAccountData(account,"ammo0") local ammo1 = getAccountData(account,"ammo1") local ammo2 = getAccountData(account,"ammo2") local ammo3 = getAccountData(account,"ammo3") local ammo4 = getAccountData(account,"ammo4") local ammo5 = getAccountData(account,"ammo5") local ammo6 = getAccountData(account,"ammo6") local ammo7 = getAccountData(account,"ammo7") local ammo8 = getAccountData(account,"ammo8") local ammo9 = getAccountData(account,"ammo9") local ammo10 = getAccountData(account,"ammo10") local ammo11 = getAccountData(account,"ammo11") local ammo12 = getAccountData(account,"ammo12") local cloth1 = getAccountData(account,"cloth1") local cloth2 = getAccountData(account,"cloth2") local cloth3 = getAccountData(account,"cloth3") local cloth4 = getAccountData(account,"cloth4") local cloth5 = getAccountData(account,"cloth5") local cloth6 = getAccountData(account,"cloth6") local cloth7 = getAccountData(account,"cloth7") local cloth8 = getAccountData(account,"cloth8") local cloth9 = getAccountData(account,"cloth9") local cloth10 = getAccountData(account,"cloth10") local cloth11 = getAccountData(account,"cloth11") local cloth12 = getAccountData(account,"cloth12") local cloth13 = getAccountData(account,"cloth13") local cloth14 = getAccountData(account,"cloth14") local cloth15 = getAccountData(account,"cloth15") local cloth16 = getAccountData(account,"cloth16") local cloth17 = getAccountData(account,"cloth17") if (weapon0) and (weapon1) and (weapon2) and (weapon3) and (weapon4) and (weapon5) and (weapon6) and (weapon7) and (weapon8) and (weapon9) and (weapon10) and (weapon11) and (weapon12) and (ammo0) and (ammo1) and (ammo2) and (ammo3) and (ammo4) and (ammo5) and (ammo6) and (ammo7) and (ammo8) and (ammo9) and (ammo10) and (ammo11) and (ammo12) then giveWeapon(source,weapon0,ammo0) giveWeapon(source,weapon1,ammo1) giveWeapon(source,weapon2,ammo2) giveWeapon(source,weapon3,ammo3) giveWeapon(source,weapon4,ammo4) giveWeapon(source,weapon5,ammo5) giveWeapon(source,weapon6,ammo6) giveWeapon(source,weapon7,ammo7) giveWeapon(source,weapon8,ammo8) giveWeapon(source,weapon9,ammo9) giveWeapon(source,weapon10,ammo10) giveWeapon(source,weapon11,ammo11) giveWeapon(source,weapon12,ammo12) setPedClothes(ped, 4, cloth4) setPedClothes(ped, 5, cloth5) setPedClothes(ped, 6, cloth6) setPedClothes(ped, 7, cloth7) setPedClothes(ped, 8, cloth8) setPedClothes(ped, 9, cloth9) setPedClothes(ped, 10, cloth10) setPedClothes(ped, 11, cloth11) setPedClothes(ped, 12, cloth12) setPedClothes(ped, 13, cloth13) setPedClothes(ped, 14, cloth14) setPedClothes(ped, 15, cloth15) setPedClothes(ped, 16, cloth16) setPedClothes(ped, 17, cloth17) end end addEventHandler("onPlayerSpawn",root,loadWeaponsOnSpawn) Any help appreciated. Thanks I have more scripts like that, nothing helped and I'm not sure what's :Oing cause of this :Oing bull:~ error. ):-( error: [17:24:16] ERROR: [gamemodes]/[play]/play/save2.lua:29: attempt to call global 'getPedClothesID' (a nil value) [17:24:21] ERROR: [gamemodes]/[play]/play/save1.lua:61: attempt to call global 'setPedClothes' (a nil value) Note: It works on death, even after error message, that's what's even more weird
  19. Hello, so i have few problems with Sasuke* turf script so i can't take some turfs {green ones} turf ------------------------------------------------------ -- Scripting By Sasu -- Copyright © 2013-2015 - All rights reserved. ------------------------------------------------------ local turfPos = { { 2133.1950683594, 633.66455078125, 0, 197.5, 92, 90 }, { 2486.5935058594, 678.20172119141, 0, 245, 133, 30 }, { 1856.2864990234, 627.07629394531, 0, 138.25, 152.75, 90 }, { 1576.8956298828, 662.84362792969, 0, 181, 120.5, 90 }, { 1577.6783447266, 943.66607666016, 0, 190, 190, 90 }, { 1383.4364013672, 909.61499023438, 0, 142, 230, 90 }, { 956.94744873047, 1011.635925293, 0, 220, 140, 90 }, { 1017.7476196289, 1203.4068603516, 0, 180, 165, 90 }, { 1017.623046875, 1383.4741210938, 0, 190, 290, 90 }, { 917.99707031253, 1623.6003417969, 0, 80, 220, 90 }, { 1017.7178955078, 1862.6740722656, 0, 140, 180, 90 }, { 912.50573730469, 1958.6761474609, 0, 90, 230, 90 }, { 1017.3455200195, 2063.38671875, 0, 150, 300, 90 }, { 1300.7644042969, 2095.5100097656, 0, 200, 140, 90 }, { 1398.1997070313, 2323.5505371094, 0, 160, 65, 90 }, { 1578.1955566406, 2284.0825195313, 0, 180, 110, 90 }, { 1237.6285400391, 2581.4663085938, 0, 450, 130, 90 }, { 1780.478515625, 2567.2121582031, 0, 130, 130, 90 }, { 1698.2750244141, 2724.494140625, 0, 200, 150, 90 }, { 2237.9494628906, 2723.7814941406, 0, 180, 110, 90 }, { 2498.6853027344, 2704.6188964844, 0, 300, 140, 90 }, { 2798.1267089844, 2303.9643554688, 0, 120, 300, 90 }, { 2557.5688476563, 2243.4963378906, 0, 100, 230, 90 }, { 2532.5830078125, 2063.4118652344, 0, 100, 150, 90 }, { 2558.1779785156, 1624.0816650391, 0, 100, 300, 90 }, { 2437.685546875, 1483.7209472656, 0, 160, 120, 90 }, { 2077.7106933594, 1203.5559082031, 0, 340, 170, 90 }, { 2082.3193359375, 979.23583984375, 0, 270, 210, 90 }, { 1837, 1284, 0, 195, 163, 90 }, {-2164.71436, -1018.36688, 0, 250, 315, 90}, {-2702.22412, -66.56741, 0, 110, 110, 90}, {-2806.31616, -66.56741, 0, 100, 110, 90}, {-2806.49219, -206.34576, 0, 215, 137, 90}, {-2381.51709, -197.80562, 0, 140, 137, 90}, {-2203.48193, -282.15039, 0, 210, 210, 90}, {-2242.80298, -59.82597, 0, -180, 400, 90}, {-2522.11035, 560.70557, 0, 180, -100, 90}, {-2523.62134, 460.71259, 0, -230, 250, 90}, {-1470.57178, 1480.64539, 0, 120, 35, 90}, {-2520.18237, 1530.39307, 0, 230, 50, 90}, {-2499.00928, 1389.40979, 0, 200, -200, 90}, {-2275.88281, 1181.62500, 0, 400, 115, 90}, {-1703.30615, 1339.81482, 0, 130, 130, 90}, {-1588.04858, 1240.36963, 0, 180, -235, 90}, {-1895.47473, 920.57892, 0, -100, -70, 90}, {-2002.07898, 813.75568, 0, -130, 230, 90}, {-2267.40918, 1040.40015, 0, -350, 140, 130}, {-2279.53540, 573.13440, 0, 280, 240, 90}, {-1220.70728, 530.04572, 0, -400, -300, 90}, {-1627.53259, 45.55821, 0, -150, -170, 90}, {-1743.52026, -645.92297, 0, 550, 521, 90}, {-2805.37476, -436.44717, 0, 214, 230, 90}, {-2580.08887, -362.16071, 0, 150, 150, 90}, {-2862.77686, 286.79745, 0, 266, 170, 90}, {-2806.65210, 286.24088, 0, 210, -240, 90}, {-2954.27026, 618.64880, 0, 205, 570, 90}, {-2736.81860, 1296.41052, 0, 150, 220, 90}, {98.76723, 1491.4844, 0, 190, -160, 90}, {-2337.55273, 2216.74707, 0, 170, 275, 90}, {-959.01050, -774.35657, 0, -170, 200, 90}, {-627.99286, -463.81766, 0, 180, -100, 90} } local turfElement = {} local turfTimer = {} local checkComplete = false local messages = { [1] = "Turf System by Sasuke* was started correctly!", [2] = "This territory already belongs to %s", [3] = "You enter into de %s's turf zone. Wait 2 minutes to capture the turf and win 4k", [4] = "This turf doesn't belong to anyone. Wait 2 minutes to capture the turf and win 4k", [5] = "Congratulations. You capture the turf. +4K!", [7] = "You couldn't capture the turf because of absence" } -- Nadie = None | Just a translation addEventHandler("onResourceStart", resourceRoot, function() executeSQLQuery("CREATE TABLE IF NOT EXISTS Turf_System ( Turfs TEXT, GangOwner TEXT, r INT, g INT, b INT)") -- local check = executeSQLQuery("SELECT * FROM Turf_System" ) if #check == 0 then for i=1,#turfPos do executeSQLQuery("INSERT INTO Turf_System(Turfs,GangOwner,r,g,b) VALUES(?,?,?,?,?)", "Turf["..tostring(i).."]", "Nadie", 0, 255, 0) end elseif #check > 1 then for i = #check, #turfPos do executeSQLQuery("INSERT INTO Turf_System(Turfs,GangOwner,r,g,b) VALUES(?,?,?,?,?)", "Turf["..tostring(i).."]", "Nadie", 0, 255, 0) end end for i,v in ipairs(turfPos) do local sqlData = executeSQLQuery("SELECT * FROM Turf_System WHERE Turfs=?", "Turf["..tostring(i).."]") local turfCol = createColCuboid(unpack(v)) setElementData(turfCol, "getTurfGang", sqlData[1].GangOwner) local turfArea = createRadarArea(v[1], v[2], v[4], v[5], sqlData[1].r, sqlData[1].g, sqlData[1].b, 175) turfElement[turfCol] = {turfCol, turfArea, i} turfTimer[turfCol] = {} end outputDebugString( messages[1] ) end ) addEventHandler ( "onColShapeHit", root, function ( player ) if turfElement[source] and source == turfElement[source][1] then local turf,area,id = unpack( turfElement[source] ) local playerGang = getElementData ( player, "gang" ) local turfGang = executeSQLQuery("SELECT GangOwner FROM Turf_System WHERE Turfs=?", "Turf["..tostring(id).."]" ) if ( turfGang[1].GangOwner == playerGang ) then outputChatBox( messages[2]:format( turfGang[1].GangOwner or "None" ), player, 0, 255, 0, false ) else local playerGang = getElementData ( player, "gang" ) setElementData( source, "warTurf", playerGang ) if ( isTimer ( turfTimer[source][1] ) ) then if isTimer( turfTimer[source][2] ) then killTimer( turfTimer[source][2] ) end return end if ( playerGang ) then local r, g, b = unpack ( getGangColor ( playerGang ) ) -- local r, g, b = 255, 255, 255 setRadarAreaFlashing ( area, true ) if turfGang[1].GangOwner ~= "Nadie" then outputChatBox( messages[3]:format( turfGang[1].GangOwner ), player, 0, 255, 0, false ) else outputChatBox( messages[4], player, 0, 255, 0, false ) end turfTimer[source][1] = setTimer ( function ( ) local players = getGangPlayersInTurf ( turf, playerGang ) setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) for _, player in ipairs ( players ) do outputChatBox( messages[5], player, 0, 255, 0, false ) triggerClientEvent(player, "onTakeTurf", player) givePlayerMoney ( player, 4000 ) executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) -- setElementData ( turf, "getTurfGang", playerGang ) end setRadarAreaFlashing ( area, false ) end ,1000, 1) end end end end ) addEventHandler ( "onColShapeLeave", root, function( player ) if turfElement[source] and source == turfElement[source][1] then if isTimer( turfTimer[source][1] ) then local aGang = getElementData( source, "warTurf" ) local ps = getGangPlayersInTurf( source, aGang ) if #ps == 0 then turfTimer[source][2] = setTimer( function(source, aGang) if isTimer(turfTimer[source][1]) then killTimer(turfTimer[source][1]) end setRadarAreaFlashing(turfElement[source][2], false) for _, v in ipairs( getElementsByType("player") ) do if getElementData(v, "gang") == aGang then outputChatBox(messages[7], v, 255, 0, 0) end end end , 1, 1, source, aGang) end end end end ) function getGangPlayersInTurf( turf, gang ) -- element, string if turf and gang then local players = getElementsWithinColShape ( turf, "player" ) local gPla = {} for _, v in ipairs( players ) do if getElementData(v, "gang") == gang then table.insert(gPla, v) end end return gPla end end function getGangColor(gangName) return exports[ "gang_system" ]:getGangData ( gangName, "color" ) end another bug is that sometimes turf colors doesn't change colors all turfs black/yellow owned by Black Mafia but some turfs didn't changed colors also green are those who i couldn't turf
  20. I found a really interesting bug, and i can not fix it. Well, i created a script that creates and fires a custom wepon when a bind is pressed. It's just working fine, but when i use it on the middle of my map, then the createWeapon function is not working without debugscript. The map contains 1200 Elements. When i reduced the maps objects to ca. 300-400 objects then it worked. I really dont understand why is that happening. Is there any way to make createWepon work beside 1200 elements? Thanks
  21. Bom pessoal, fiz recentemente um painel de recrutamento, no qual o jogador pode criar um recrutamento em determinado local, dimensão, e teletransporte. O sistema funcionou corretamente, porém, preciso duplicar esse recurso para que duas gangs possam usa-lo, e quando dupliquei os dois mods eles bugaram, como se eu estivesse usando dois painéis, por exemplo: quando crio um recrutamento através do painel do resource painelrecrutar_w ele cria o recrutamento nesse recurso e no outro(painelrecrutar), como criando dois teletransportes. Já tive esse mesmo problema ao duplicar painéis, quando uso um parece que estou usando dois(o duplicado e original). Alguém sabe como resolver esse problema? Grato.
  22. Working on a First Person Shooter gamemode, and i found a bug. The event onClientPreRender causes some delay at attachElements. Can somebody reproduce attachElements maths for me?
  23. Hi, the problem in race gamemode is when i have money, and start a new map, the money will reset to 0. How to fix this irritating problem?
  24. Hi! I have a problem with my DX script. I made a DX screen that gets the items in a table and display it on the rectangle The problem is, it's multiplying everything that is related with the text. This is how the issue looks in game, look at the rectangle with the texts, it's multiplying everything! And here is my code: ------------------------------------------------------- local itemList = { {"Wooden Wall"}, {"Wooden Doorway"}, {"Wooden Window"}, {"Wooden Floor"}, {"Wooden Floorport"}, {"Wooden Stairs"}, {"Wooden Fence"}, {"Wooden Door"}, {"Wooden Gate"}, {"Metal Wall"}, {"Metal Doorway"}, {"Metal Window"}, {"Metal Floor"}, {"Metal Floorport"}, {"Metal Stairs"}, {"Metal Fence"}, {"Metal Door"}, {"Metal Gate"}, {"Concrete Wall"}, {"Concrete Doorway"}, {"Concrete Window"}, {"Concrete Floor"}, {"Concrete Floorport"}, {"Concrete Stairs"}, {"Concrete Fence"}, {"Reinforced Door"}, {"Reinforced Gate"}, } ------------------------------------------------------- function returnTableCount (tab) count = 1 if ( getLocalPlayer() ) then for i,item in ipairs(tab) do if ( item ) then count = count + 1 end end return count end return false end ------------------------------------------------------- local totalRows = returnTableCount(itemList) local iRows = totalRows local iVisibleRows = 20 local iCurrentCell = 0 ------------------------------------------------------- local screenWidth,screenHeight = guiGetScreenSize() local screenW, screenH = guiGetScreenSize() local sx,sy = guiGetScreenSize() local px,py = 1366,768 local x,y = (sx/px), (sy/py) ------------------------------------------------------- function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition() cursorx,cursory = mx*px,my*py if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true end end return false end function drawInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then titleTable = dxDrawRectangle(x*050, y*040, x*350, y*45, tocolor(0, 77, 126, 170), false) titleText = dxDrawText("Building",x*060, y*055, x*250, y*30,tocolor(255,255,255, 255)) mainTable = dxDrawRectangle(x*050, y*090, x*350, y*640, tocolor(0, 0, 0, 170), false) for i,item in ipairs(itemList) do for ki = iCurrentCell, iVisibleRows+iCurrentCell-1 do visibleI = ki - iCurrentCell dxDrawRectangle(x*050+x*350, y*090+y*640/iRows*iCurrentCell, 5, y*640/iRows*iVisibleRows) itemBackground = dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 0, 0, 200), false) itemText = dxDrawText(item[1],x*070, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) --Problem is here :C useBackground = dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) useText = dxDrawText("Text",x*282, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) dropBackground = dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) dropText = dxDrawText("Text",x*347, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) if isCursorOverRectangle(x*060, y*100+visibleI*31, x*200, y*30) or isCursorOverRectangle(x*265, y*100+visibleI*31, x*60, y*30) or isCursorOverRectangle(x*330, y*100+visibleI*31, x*60, y*30) then dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) end end end end end addEventHandler("onClientRender",getRootElement(),drawInventory) function rustCraftScrollUp () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell - 1 if iCurrentCell < 0 then iCurrentCell = 0 end end end end bindKey("mouse_wheel_up","down",rustCraftScrollUp) function rustCraftScrollDown () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell + 1 if iCurrentCell > iRows-iVisibleRows then iCurrentCell = iRows-iVisibleRows end end end end bindKey("mouse_wheel_down","down",rustCraftScrollDown) function showInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then setElementData(getLocalPlayer(),"viewingInv",false) showCursor(false) showChat(true) else setElementData(getLocalPlayer(),"viewingInv",true) showCursor(true) showChat(false) end end bindKey("k","down",showInventory) How can I get the items in that table 'itemList' and put it in the screen that the dxGridList works without multiplying those stuff? I hope you guys undestand my problem :v pls help
  25. Hello guys,i got a problem which annoys me for a while,i wanna change font of my custom radio script,but when i change it the font looks small and its just a default font,not the 1 i choose,PLS HELP! lol i forgot heres the settigns.xml of the custom radio script <settings> <color r="255" g="255" b="255"/> <font>sa-header</font> <realism enabled="false"/> <stations> <station name="The Beat" URL="http://listen.181fm.com/181-beat_64k.aac"/> <station name="181 FM" URL="http://listen.181fm.com/181-party_64k.aac"/> <station name="The Vibe of Vegas" URL="http://listen.181fm.com/181-vibe_64k.aac"/> <station name="Power 181" URL="http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040)&file=181-power.pls"/> <station name="Star 90's" URL="http://relay.181.fm:8012/"/> <station name="Awesome 80's" URL="http://relay.181.fm:8000/"/> <station name="Rock 181" URL="http://listen.181fm.com/181-rock_64k.aac"/> <station name="UK Top 40" URL="http://listen.181fm.com/181-uktop40_64k.aac"/> </stations> </settings> client.lua local xml = xmlLoadFile ( "settings.xml" ) local nodeColor = xmlFindChild ( xml, "color", 0 ) local nodeFont = xmlFindChild ( xml, "font", 0 ) local nodeRealism = xmlFindChild ( xml, "realism", 0 ) local nodeStations = xmlFindChild ( xml, "stations", 0 ) local label = guiCreateLabel ( 0, 0, 1, 0.1, "Radio Off", true ) guiLabelSetColor ( label, xmlNodeGetAttribute ( nodeColor, "r" ), xmlNodeGetAttribute ( nodeColor, "g" ), xmlNodeGetAttribute ( nodeColor, "b" ) ) guiLabelSetHorizontalAlign ( label, "center" ) guiSetFont ( label, xmlNodeGetValue ( nodeFont ) ) guiSetVisible ( label, false ) addEventHandler ( "onClientResourceStart", getResourceRootElement (), function () setPlayerHudComponentVisible ( "radio", false ) setElementData ( getLocalPlayer (), "liveradio.radio", 0 ) for k, v in ipairs ( getElementsByType ( "vehicle" ) ) do setElementData ( v, "liveradio.radio0", false ) setElementData ( v, "liveradio.radio1", false ) setElementData ( v, "liveradio.radio2", false ) setElementData ( v, "liveradio.radio3", false ) end end ) addEventHandler ( "onClientResourceStop", getResourceRootElement (), function () setPlayerHudComponentVisible ( "radio", true ) end ) addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer (), function ( vehicle, seat ) setRadioChannel ( 0 ) setElementData ( getLocalPlayer (), "liveradio.seat", seat ) if sound then if isElement ( sound ) then destroyElement ( sound ) end end if xmlNodeGetAttribute ( nodeRealism, "enabled" ) == "true" then if getElementData ( vehicle, "liveradio.radio0" ) then setElementData ( getLocalPlayer (), "liveradio.radio", getElementData ( vehicle, "liveradio.radio0" ) ) else for k, v in ipairs ( xmlNodeGetChildren ( nodeStations ) ) do setElementData ( getLocalPlayer (), "liveradio.radio", k ) end setElementData ( getLocalPlayer (), "liveradio.radio", math.random ( getElementData ( getLocalPlayer (), "liveradio.radio" ) ) ) setElementData ( vehicle, "liveradio.radio0", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( vehicle, "liveradio.radio1", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( vehicle, "liveradio.radio2", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( vehicle, "liveradio.radio3", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) end else if getElementData ( vehicle, "liveradio.radio" .. seat ) then setElementData ( getLocalPlayer (), "liveradio.radio", getElementData ( vehicle, "liveradio.radio" .. seat ) ) else for k, v in ipairs ( xmlNodeGetChildren ( nodeStations ) ) do setElementData ( getLocalPlayer (), "liveradio.radio", k ) end setElementData ( getLocalPlayer (), "liveradio.radio", math.random ( getElementData ( getLocalPlayer (), "liveradio.radio" ) ) ) setElementData ( vehicle, "liveradio.radio" .. seat, getElementData ( getLocalPlayer (), "liveradio.radio" ) ) end end local nodeStation = xmlFindChild ( nodeStations, "station", getElementData ( vehicle, "liveradio.radio" .. seat ) - 1 ) if nodeStation then local radioName = xmlNodeGetAttribute ( nodeStation, "name" ) local radioURL = xmlNodeGetAttribute ( nodeStation, "URL" ) sound = playSound ( radioURL ) guiSetText ( label, radioName ) guiSetVisible ( label, true ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) else guiSetText ( label, "Radio Off" ) guiSetVisible ( label, true ) setElementData ( getLocalPlayer (), "liveradio.radio", 0 ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) end timerVehicle = setTimer ( function ( vehicle ) if isPedInVehicle ( getLocalPlayer () ) == false or getPedOccupiedVehicle ( getLocalPlayer () ) ~= vehicle or getElementHealth ( getLocalPlayer () ) <= 0 then if sound then if isElement ( sound ) then destroyElement ( sound ) end end killTimer ( timerVehicle ) guiSetVisible ( label, false ) setElementData ( getLocalPlayer (), "liveradio.radio", 0 ) end end , 50, 0, vehicle ) end ) addEventHandler ( "onClientPlayerRadioSwitch", getLocalPlayer (), function ( station ) if station ~= 0 then cancelEvent () end if xmlNodeGetAttribute ( nodeRealism, "enabled" ) ~= "true" or getElementData ( getLocalPlayer (), "liveradio.seat" ) == 0 or getPedOccupiedVehicle ( getLocalPlayer () ) == false then if station == 1 then setElementData ( getLocalPlayer (), "liveradio.radio", getElementData ( getLocalPlayer (), "liveradio.radio" ) + 1 ) elseif station == 12 then setElementData ( getLocalPlayer (), "liveradio.radio", getElementData ( getLocalPlayer (), "liveradio.radio" ) - 1 ) if getElementData ( getLocalPlayer (), "liveradio.radio" ) == -1 then for k, v in ipairs ( xmlNodeGetChildren ( nodeStations ) ) do setElementData ( getLocalPlayer (), "liveradio.radio", k ) end end end if sound then if isElement ( sound ) then destroyElement ( sound ) end end if getPedOccupiedVehicle ( getLocalPlayer () ) then setElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio" .. getElementData ( getLocalPlayer (), "liveradio.seat" ), getElementData ( getLocalPlayer (), "liveradio.radio" ) ) end local nodeStation = xmlFindChild ( nodeStations, "station", getElementData ( getLocalPlayer (), "liveradio.radio" ) - 1 ) if nodeStation then local radioName = xmlNodeGetAttribute ( nodeStation, "name" ) local radioURL = xmlNodeGetAttribute ( nodeStation, "URL" ) sound = playSound ( radioURL ) guiSetText ( label, radioName ) guiSetVisible ( label, true ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) else guiSetText ( label, "Radio Off" ) guiSetVisible ( label, true ) setElementData ( getLocalPlayer (), "liveradio.radio", 0 ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) end if xmlNodeGetAttribute ( nodeRealism, "enabled" ) == "true" and getPedOccupiedVehicle ( getLocalPlayer () ) then setElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio0", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio1", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio2", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) setElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio3", getElementData ( getLocalPlayer (), "liveradio.radio" ) ) triggerServerEvent ( "onPlayerRadioSwitch", getLocalPlayer (), getPedOccupiedVehicle ( getLocalPlayer () ) ) end end end ) addEventHandler ( "onClientVehicleStartExit", getRootElement (), function ( player ) if player == getLocalPlayer () then if sound then if isElement ( sound ) then destroyElement ( sound ) end end if isTimer ( timerVehicle ) then killTimer ( timerVehicle ) end guiSetVisible ( label, false ) setElementData ( player, "liveradio.radio", 0 ) end end ) addEvent ( "switchRadioChannel", true ) addEventHandler ( "switchRadioChannel", getLocalPlayer (), function () if sound then if isElement ( sound ) then destroyElement ( sound ) end end local nodeStation = xmlFindChild ( nodeStations, "station", getElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio0" ) - 1 ) if nodeStation then local radioName = xmlNodeGetAttribute ( nodeStation, "name" ) local radioURL = xmlNodeGetAttribute ( nodeStation, "URL" ) sound = playSound ( radioURL ) guiSetText ( label, radioName ) guiSetVisible ( label, true ) setElementData ( getLocalPlayer (), "liveradio.radio", getElementData ( getPedOccupiedVehicle ( getLocalPlayer () ), "liveradio.radio0" ) ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) else guiSetText ( label, "Radio Off" ) guiSetVisible ( label, true ) setElementData ( getLocalPlayer (), "liveradio.radio", 0 ) if isTimer ( timerLabel ) then killTimer ( timerLabel ) end timerLabel = setTimer ( guiSetVisible, 5000, 1, label, false ) end end ) server.lua addEvent ( "onPlayerRadioSwitch", true ) addEventHandler ( "onPlayerRadioSwitch", getRootElement (), function ( vehicle ) for k, v in ipairs ( getElementsByType ( "player" ) ) do if getPedOccupiedVehicle ( v ) == vehicle and v ~= source then triggerClientEvent ( v, "switchRadioChannel", v ) end end end )
×
×
  • Create New...