Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 13/12/21 in Posts

  1. I will be aware of that, for now the code is not throwing me any errors but I will do my best to improve it, I thank you for everything.
    1 point
  2. I still advise you to cautiously read through your code to understand if it's working properly. I think you were expecting to have a meat element inside the caixa table indexed by the source (a player), but that is not happening. Probably the line that was warning before isn't needed actually because since you are destroying the meat element later on the code all event handlers attached to it will also be deleted anyway.
    1 point
  3. I can't believe it for hours trying to fix it and I couldn't, Thank you very much and what you told me I'll take into account. Fixed issue Close Post
    1 point
  4. removeEventHandler("onElementClicked", caixa[source], onClick) The error is potentially at this line. I guess you probably meant: removeEventHandler("onElementClicked", source, onClick) But you have to make sure that's exactly what you expect your code to do. Tell me what does the table caixa do in your code?
    1 point
  5. The event onMarkerHit is triggered anytime an element hits the marker, not only when a player hits a marker. Turns out the vehicle is also an element and usually when a player runs over a marker driving a vehicle the vehicle element hits the marker before the player element. You have two options: 1. Use onPlayerMarketHit instead. Note it's not a drop in replacement, you'll have to change your code to work with onPlayerMarkerHit 2. At the very top of the Cavar function, check for the element type before executing any action local function Cavar(hitElement) if getElementType(hitElement) ~= "player" then return end -- Here you place your current code end Excuse me to give you a general tip around programming. Avoid nesting to much if statements, always check by the failure condition and return your function. Dont: -- Evite muitos IFs encadeados! local function Cavar(hitElement) if getElementType(hitElement) == "player" then if not isPedInVehicle(hitElement) then --- code ... end end end Do: -- Muito mais elegante local function Cavar(hitElement) if getElementType(hitElement) ~= "player" or isPedInVehicle(hitElement) then return end -- code ... end You can find reference for onMarkerHit, onPlayerMarkerHit and getElementType on the official wiki.
    1 point
  6. Hola, Ahora mismo tengo tiempo libre como para poder encargarme de un Servidor. Me podrás contactar para solucionarte tus problemas que tengas. Para las personas que van creando su servidor Y no tienen Staff. Tengo un alto nivel de escritura y facilitare el Tema de Soporte. Si quieres contactarme Agrégame y nos ponemos de acuerdo. ✔
    1 point
  7. Hay muchísimas GM de Zombies,RP,reeroam,etc. si no te interesa mucho lo que tienen te recomiendo hacer tu propio GM.
    1 point
  8. Emperezamos por que descargar un gamemode, si por una parte no entiendes el Script.
    1 point
  9. Optimiza tu PC. en Configuraciones de MTA baja toda la calidad para, así tendrás más rendimiento!
    1 point
  10. Buenaas, te recomiendo Desistalar e intalar el GTA:SA Y MTA. para no obtener ningún tipo de problema
    1 point
  11. Hola, Tal vez no tienes activado el reosurce, playerblips or no tienes el Resource de la community de mapnames!
    1 point
  12. El problema no viene de ti, es el Servidor amigo
    1 point
  13. Hola, use este código para Transportarse mediante comando: local tele= { {0, 0, 15} } function teleT(thePlayer, command) local pos= math.random(#tele) local car = getPedOccupiedVehicle(thePlayer) if (car) then setElementPosition(car, unpack (tele[pos])) else setElementPosition(thePlayer, unpack (tele[pos])) end end --end addCommandHandler("pvp", teleT)
    1 point
  14. Are you sure you saved it after changing the text?
    1 point
  15. function blueBerryGoverment() sexy = guiCreateWindow(192, 123, 209, 353, "Job list", false) joblist = guiCreateGridList(10, 185, 190, 109, false, sexy) guiGridListAddColumn(joblist, "Job", 0.9) for i = 1, 4 do guiGridListAddRow(joblist) end guiGridListSetItemText(joblist, 0, 1, "Job1", false, false) guiGridListSetItemText(joblist, 1, 1, "Job2", false, false) guiGridListSetItemText(joblist, 2, 1, "Job3", false, false) guiGridListSetItemText(joblist, 3, 1, "Job4", false, false) sexy2 = guiCreateWindow(401, 123, 209, 353, "Second tab", false) guiSetVisible(sexy2,false) end addEvent("requestblueBerryGoverment", true) addEventHandler("requestblueBerryGoverment", getRootElement(), blueBerryGoverment) --this part is not working. Why? addEventHandler( "onClientGUIClick", root, function( ) if ( source == joblist ) then local row, col = guiGridListGetSelectedItem ( joblist ) if ( row == -1 ) then return end local text = guiGridListGetItemText ( joblist, row, col ) if ( text == 'Job1' ) then ---do Something elseif ( text == 'Job2' ) then ---do Something elseif ( text == 'Job3' ) then ---do Something elseif ( text == 'Job4' ) then ---do Something end end end )
    1 point
×
×
  • Create New...