Jump to content

erisP

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by erisP

  1. addEventHandler("onResourceStart", resourceRoot, function() dbQuery(toptime, db, "SELECT name, time FROM general ORDER BY time DESC LIMIT 20") dbQuery(topkill, db, "SELECT name, kills FROM general ORDER BY kills DESC LIMIT 20") dbQuery(topdrift, db, "SELECT name, drift FROM general ORDER BY drift DESC LIMIT 20") dbQuery(toprecord, db, "SELECT name, record FROM general ORDER BY record DESC LIMIT 20") dbQuery(toplvl, db2, "SELECT name, lvl FROM general2 ORDER BY lvl DESC LIMIT 20") dbQuery(topeff, db2, "SELECT name, eff FROM general2 ORDER BY eff DESC LIMIT 20") end) setTimer(function() dbQuery(toptime, db, "SELECT name, time FROM general ORDER BY time DESC LIMIT 20") dbQuery(topkill, db, "SELECT name, kills FROM general ORDER BY kills DESC LIMIT 20") dbQuery(topdrift, db, "SELECT name, drift FROM general ORDER BY drift DESC LIMIT 20") dbQuery(toprecord, db, "SELECT name, record FROM general ORDER BY record DESC LIMIT 20") dbQuery(toplvl, db2, "SELECT name, lvl FROM general2 ORDER BY lvl DESC LIMIT 20") dbQuery(topeff, db2, "SELECT name, eff FROM general2 ORDER BY eff DESC LIMIT 20") end,600*1000,0) I m trying to sort it Will I have any problems if I use it this way? or how can I do it better?
  2. i tested again and got no errors
  3. local tableData = getElementData(source,"dataT") or {} outputChatBox(toJSON(tableData)) print - [ { "38": 2, "30": 3 } ] addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount ( source ) local data = toJSON(getElementData(source,"dataT")) or {} setAccountData(account,"SaveP", data) end) addEventHandler("onPlayerLogin", root, function(_, account) local Paintjobs = fromJSON(getAccountData(account,"SaveP")) or toJSON({}) setElementData(source,"dataT",Paintjobs) end) hi, i can't save this where am i doing wrong?
  4. I want it deleted when I drop a bomb on the safe zone from afar. How can I do it?
  5. erisP

    [HELP]Molotov

    sorry for the confusion what you said gave me a new idea and solved my problem thanks
  6. erisP

    [HELP]Molotov

    I haven't tried but it doesn't work
  7. erisP

    [HELP]Molotov

    bunu yaptım ama oyun çöküyor nasıl düzgün çalıştırabilirim bu kodun düzgün çalışmasını istiyorum for you to understand better; https://github.com/multitheftauto/mtasa-blue/issues/1757
  8. erisP

    [HELP]Molotov

    what i actually want to do I want to light and extinguish tool like setPedOnFire function but this function is not working in tool Try it if you wish, when you throw a Molotov at the player inside the vehicle, the player's game crashes.
  9. erisP

    [HELP]Molotov

    I have no idea how to do what you say
  10. erisP

    [HELP]Molotov

    addEventHandler("onClientVehicleDamage", root, function() if source == getPedOccupiedVehicle(localPlayer) then local x,y,z = getElementPosition(localPlayer) extinguishFire(x,y,z, 30) end end) i did but the game crashes How do I prevent the vehicle from being damaged when Molotov is thrown at the vehicle?
  11. No team can hurt the red team and what you did is wrong. The blue team needs to deal damage, so I can't use it. Another team needs to damage the red team. When I use your code, the blue team doesn't make any sense as long as it doesn't damage the red team.
  12. it didn't work, the red team players should not hurt each other, the blue team should hurt the red team, that's all I wanted.
  13. It doesn't give an error, but when I switch to the blue team, the player in the red team still does not take damage. The red team can't hurt each other, but the blue team can hurt the red team.
  14. WARNING: customweap/client.lua:210: Bad Argument @ 'getElementType' [Expected element at argument 1, got nil]
  15. I want the gun I put in the vehicle not to harm the players of the same team. function noDamageToPlayersFromCustomWeapons(target) if target == exports.Teams:isPlayerInTeam(localPlayer, "Red") and exports.Teams:isPlayerInTeam(localPlayer, "Red") then cancelEvent() end end addEventHandler("onClientWeaponFire", root, noDamageToPlayersFromCustomWeapons)
  16. sample: function start(vehicle) if getElementModel(vehicle) == 470 then local weapon = createWeapon("m4", 0, 0, 0) attachElements(weapon, vehicle, 1, -4.2, 0, 0, 30, 90) setWeaponClipAmmo(weapon, 9999) end end How can I detect the weapon I created using onClientPlayerDamage?
  17. I'm using a damage system, some teams can't damage each other. but with createweapon Every player can be harmed in the vehicle where I set up a weapon. How do I fix this?
  18. erisP

    [HELP] block

    No, when shooting with the minigun, the rear of the vehicle or anywhere else is removed. If I shoot with the minigun, I want to keep the car from moving.
  19. erisP

    [HELP] block

    When the vehicle is damaged with the Minigun, the vehicle blows up. How can I block?
  20. erisP

    [HELP] rocket

    I don't understand, can you give an example?
  21. erisP

    [HELP] rocket

    How can I reduce rocket launcher damage using OnClientExplosion?
  22. Sorry, thank you for your time.
  23. first; function warpPlayer() local selected = guiGridListGetSelectedItem(transportGUI.locationgrid) if (selected) then local DestinationData = guiGridListGetItemData(transportGUI.locationgrid, selected, 1) -- x,y,z,rotation,price if (getPlayerMoney() >= DestinationData[5]) then triggerServerEvent ( "transport.onPlayerWarp", localPlayer,DestinationData[5]) toggletransportGUI() cameraTranslate(DestinationData[1],DestinationData[2],DestinationData[3],DestinationData[4]) else outputChatBox("You do not have enough money!",255,0,0) end end end end; function warpPlayer() local selected = guiGridListGetSelectedItem(transportGUI.locationgrid, row, 0, Data) if (selected) then local DestinationData = guiGridListGetItemData(transportGUI.locationgrid, selected, 0) if type(DestinationData) == "table" then if (getPlayerMoney() >= DestinationData[5]) then triggerServerEvent ( "transport.onPlayerWarp", localPlayer,DestinationData[5]) toggletransportGUI() cameraTranslate(DestinationData[1],DestinationData[2],DestinationData[3],DestinationData[4]) else outputChatBox("You do not have enough money!",255,0,0) end end end end
  24. Bad Argument 'guiGridListSetItemData' [Expected number at argument 2, got nil] i got this error.
  25. error passed but script doesn't work I think it's broken
×
×
  • Create New...