Jump to content

Peti

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by Peti

  1. We don't give support to people who use stolen scripts.
  2. https://www.google.com/search?client=firefox-b-d&q=gta+sa+unused+objects
  3. I'm not a Discord type of person, so I'll keep waiting for updates on this post. I'm tired of generic servers that use the same scripts, this looks original, keep it up.
  4. We are going to need your code to give a proper answer
  5. Try to replace unused objects.
  6. Why do you need such thing? Maybe there are other ways.
  7. I made this custom command for you as an example of what I'm saying: local anchoPantalla, largoPantalla = guiGetScreenSize() function obtenerPosicionVentana(ancho, largo) local x = anchoPantalla / 2 - ancho / 2 local y = largoPantalla / 2 - largo / 2 return x, y, ancho, largo end local tableItems = { 'item1', 'item2', 'item3' } local itemRow = 1 function createTable() local x, y, ancho, largo = obtenerPosicionVentana(400, 400) local windowItems = guiCreateWindow(x, y, ancho, largo, 'Example', false) local listItems = guiCreateGridList(0.04, 0.1, 0.4, 0.78, true, windowItems) local columnItems = guiGridListAddColumn(listItems, 'Items', 0.75) if (columnItems) then for _, item in pairs(tableItems) do local row = guiGridListAddRow(listItems, item) guiGridListSetItemText(listItems, row, columnItems, item, false, true) end end local btn = guiCreateButton(0.55, 0.1, 0.2, 0.1, 'Delete', true, windowItems) showCursor(true) itemRow = itemRow - 1 if #tableItems == 1 then itemRow = 0 end if itemRow == #tableItems then itemRow = itemRow - 1 end guiGridListSetSelectedItem(listItems, itemRow, 1, true) addEventHandler('onClientGUIClick', btn, function (boton, estado) if boton == 'left' and estado == 'up' then itemRow = guiGridListGetSelectedItem (listItems) itemRow = itemRow + 1 table.remove(tableItems, itemRow) local timer = setTimer(createTable, 100, 1) destroyElement(windowItems) end end, false) end addCommandHandler('items', createTable) THIS IS NOT A SOLUTION, JUST AN EXAMPLE.
  8. Hm, have you tried saving the index before deleting the item and then forcing a new selection using said index? I mean: item1 -- 0 item2 -- 1 item3 -- 2 Delete item2(save index first, then delete it) Force selection on saved index.
  9. You want to destroy an attached sound?
  10. Peti

    headshot

    It isn't a bug, it doesn't even programmed in the code. You need to add teams to your script if you want to cancel the event from certain players to others. Btw, try to give details next time, you didn't mention armour. Instead you said this: Good luck.
  11. addEvent ("onJobAccept", true) function empezarTrabajo () vehiculo = createVehicle (578, 2786.7009277344, -2494.1677246094, 14.277079582214, 0, 0, 90) warpPedIntoVehicle (source, vehiculo, 0) outputChatBox ("Ahora ve a cargar el DFT", source, 0, 255, 0, false) cargar = createMarker (2775.3952636719, -2511.1645507813, 12.454493713379, "cylinder", 4, 255, 0, 0) addEventHandler ("onMarkerHit", cargar, cargando) end addEventHandler ("onJobAccept", getRootElement(), empezarTrabajo) function cargando (player) if getElementType(player) == 'player' then removeEventHandler ("onMarkerHit", source, cargando) outputChatBox ("Espera mientras se carga el DFT", player, 0, 255, 0, false) setElementPosition (vehiculo, 2773.97265625, -2511.2573242188, 14.254050254822) setElementRotation (vehiculo, 0, 0, 90) if isElement(cargar) then destroyElement (cargar) end setElementFrozen (vehiculo, true) triggerEvent ("onDFTFrozen", player) end end Tratá siempre de remover el evento para ese jugador cuando lo activa: https://wiki.multitheftauto.com/wiki/RemoveEventHandler
  12. Peti

    headshot

    Do you have any errors or something to work with? It should work. Did you add the script at mtaserver.conf? Try without brackets like the original addEvent "onPlayerHeadshot"
  13. Peti

    headshot

    Ok, you're legit. I'm sorry. I was bieng skeptical because you mention that you were making a headshot script, but it wasn't yours. Here you have your needed support: addEvent("onPlayerHeadshot") addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 and weapon == 34 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then setElementHealth ( source, getElementHealth(source) - 100 ) if isPlayerDead ( source ) == true then killPed(source, attacker, weapon, bodypart) setPedHeadless( source, true ) setTimer( BackUp, 900, 1, source ) end end end end ) function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end
  14. Peti

    headshot

    Give me the link of the script then.
  15. Peti

    headshot

    First of all, where did you get the script from? If it is stolen, I'm not going to give you support. It seems that you don't know the basis of scripting, so I assume this is not yours. If it is, I'm sorry
  16. Well, it sounds like an entire gamemode from scratch. You need: Teleport command. Races. GUI for races. Script for toptimes. A timer function for the races. etc. etc. What do you need exactly?
  17. I can't access the website: project-wot.eu Good job, btw.
  18. Peti

    headshot

    https://wiki.multitheftauto.com/wiki/SetElementHealth setElementHealth ( thePlayer, getElementHealth(thePlayer) - 100 )
  19. I don't know what happened, I was trying to update my script, but it generated a different one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15864 Please delete it. This is the original: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15854 DONE
  20. I don't know your language, but I can understand your problem. Here you have a script of mine that could help: GOOGLE TRANSLATOR Não conheço sua língua, mas posso entender seu problema. Aqui você tem um script meu que poderia ajudar: https://community.multitheftauto.com/index.php?p=resources&s=details&id=15854
  21. local x, y, z = busTable[ID][1], busTable[ID][2], busTable[ID][3] Aquí le estás definiendo valores fijos, entonces siempre tomará esa ruta. Trata de usar la función table.random: https://wiki.multitheftauto.com/wiki/Table.random
  22. I don't really understand your problem. BUT, I think this should help: row1, column1 = guiGridListGetSelectedItem(gridlistItems["inventory"]) if row1 and column1 then guiGridListSetSelectedItem(gridlistItems["inventory"], row1, column1) if row1 == -1 then guiGridListSetSelectedItem(gridlistItems["inventory"], 0, column1) end end
×
×
  • Create New...