Jump to content

Patrick

Moderators
  • Posts

    1,143
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by Patrick

  1. Patrick

    xml vs json

    You forgot the file format
  2. https://wiki.multitheftauto.com/wiki/GetVehicleWheelStates local frontLeft, rearLeft, frontRight, rearRight = getVehicleWheelStates( vehicleElement )
  3. https://wiki.multitheftauto.com/wiki/SetGlitchEnabled maybe
  4. https://wiki.multitheftauto.com/wiki/Debugging
  5. Patrick

    Help CP

    local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) local dutymarker2 = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) or isElementWithinMarker(thePlayer, dutymarker2) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty)
  6. MTA Settings, SFX volume
  7. Patrick

    xml vs json

    I also think JSON is better and simpler. local table = { [1] = "asd", [2] = "qwe", } local JSON = toJSON(table) -- convert table to JSON. (JSON is a string, you need to store that like a string) print(JSON) -- you can print it local table_again = fromJSON(JSON) -- convert JSON back to table -- table and table_again is equal
  8. Patrick

    Help Function

    https://wiki.multitheftauto.com/wiki/SetWorldSoundEnabled
  9. local veh = (getElementType(source) == "vehicle") -- if 'source' is a vehicle, 'veh' is true, if not 'veh' is false if veh and isVehicleDamageProof(veh) == false then -- 'veh' is a boolean (true/false) and a boolean can't be damageproof. Fixed local veh = (getElementType(source) == "vehicle") if veh and isVehicleDamageProof(source) == false then
  10. Patrick

    Question

    engineRemoveShaderFromWorldTexture
  11. Patrick

    Question

    Temporary download link: http://skycore.hu/glasscolor.rar Something like that, but this is not the right solution because it also tones other parts of the car.
  12. Patrick

    Question

    dxCreateShader dxCreateTexture dxSetShaderValue engineApplyShaderToWorldTexture
  13. https://wiki.multitheftauto.com/wiki/Java_SDK
  14. You can store a table, if you convert it to a string before save. https://wiki.multitheftauto.com/wiki/ToJSON https://wiki.multitheftauto.com/wiki/FromJSON local table = { "dogs", cat = "hungry", mouse = "food", birds = 4 } local table_string = toJSON(table) -- result: [ { "1": "dogs", "mouse": "food", "cat": "hungry", "birds": 4 } ] local table_again_from_string = fromJSON(table_string) -- table == table_again_from_string
  15. Set variable to false before destroyElement is fine.
  16. What is the problem, you don't write it down? By the way, you are copied this code from a tutorial video. (link: https://youtu.be/tQBY8U3T-es?t=8485) Then why do you need help if the solution is in that video? [HUN] Első probléma, hogy nem írtad le mit szeretnél. Honnan találjuk ki? Második, hogy ezt a kódot nem te írtad, csupán lemásoltad. Akkor miért nem abban a videóban keresed a megoldást, ahonnan másoltad? (link: https://youtu.be/tQBY8U3T-es?t=8485)
  17. Szia, getElementsByType("player") részt ideiglenesen cseréld ki egy saját táblára, amelyben te, vagyis a localPlayer szerepel sokszor. {localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer, localPlayer} így magad fogod sokszor látni.
  18. https://wiki.multitheftauto.com/wiki/PHP_SDK [HUN] Egyébként csinálhatod azt is, hogy mindig SQL-ből kérdezed le és ott is módosítod mindig. Különösebb erőforrást nem igényelne, mert viszonylag keveset van használva a PP. (Persze ha folyamatosan HUD-on szeretnél renderelni, akkor nem)
  19. You have to type the difference between old and new positions.
  20. You can't do this with default chat. You need a custom chat.
  21. You can't disable the push to talk and you can't change the bind for the whole server. Every client can change the bind for himself in the settings.
  22. attachElements setCameraTarget
  23. -- SERVER SIDE addEvent("onBotWasted",true ) addEventHandler("onBotWasted", root, function() local x, y, z = getElementPosition(source) -- dead zombie's pos for i = 1, 5 do local money = createPickup(x+math.random(-2,2), y+math.random(-2,2), z, 3, 1212, 0) -- place to near random pos addEventHandler("onPickupHit", money, function(player) givePlayerMoney(player, 5000) destroyElement(source) end) end end)
  24. I know, but this is a new function, and not the best to check distance.
×
×
  • Create New...