Jump to content

Hydra

Members
  • Posts

    372
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Hydra

  1. Hydra

    Need Help

    Or like this: local used = false function givecash(command, thePlayer) if used == false then givePlayerMoney(thePlayer, 5000) used = true elseif used == true then outputChatBox("Already used this command", thePlayer, 255, 0, 0, true) end end addCommandHandler("cash", givecash)
  2. Hydra

    help

    You can use playSound or playSoundFrontend if you want a sound from the game
  3. I don't think there is something to do about that. You could do something via scripting to check his name length and if there is # at the beginning.
  4. Hydra

    Bad argument

    Please tell more about your problem, not just post a picture and wait for someone to fix it for you.
  5. If you are using hedit resource there is already a save system implemented in that resource. You just need to load the handling from the panel
  6. Hydra

    help?

    You can search on community website, I'm pretty sure there are a few gamemodes there Website: https://community.multitheftauto.com/ You can also make your own gamemode if you learn scripting Some tutorials: https://wiki.multitheftauto.com/wiki/Scripting_Introduction https://forum.multitheftauto.com/topic/121619-lua-for-absolute-beginners/ https://www.youtube.com/watch?v=Goqj5knKLQM&list=PLY2OlbN3OoCgTGO7kzQfIKPj4tJbYOgSR You can find more just from a simple search on google
  7. g_P = getLocalPlayer() rocketTimer = false rocketActivated = false function rocket() if rocketActivated == true then if not rocketTimer and isPedInVehicle(g_P) then local occupiedVehicle = getPedOccupiedVehicle(g_P) local rotX,rotY,rotZ = getElementRotation(occupiedVehicle) local x, y, z = getElementPosition(occupiedVehicle) local matrix = getElementMatrix(occupiedVehicle) local offX = 0 * matrix[1][1] + 1 * matrix[2][1] + 0 * matrix[3][1] + 1 * matrix[4][1] local offY = 0 * matrix[1][2] + 1 * matrix[2][2] + 0 * matrix[3][2] + 1 * matrix[4][2] local offZ = 0 * matrix[1][3] + 1 * matrix[2][3] + 0 * matrix[3][3] + 1 * matrix[4][3] local vx = offX - x local vy = offY - y local vz = offZ - z x = 0 * matrix[1][1] + 3 * matrix[2][1] + 0 * matrix[3][1] + 1 * matrix[4][1] y = 0 * matrix[1][2] + 3 * matrix[2][2] + 0 * matrix[3][2] + 1 * matrix[4][2] z = 0 * matrix[1][3] + 3 * matrix[2][3] + 0 * matrix[3][3] + 1 * matrix[4][3] createProjectile(g_P, 19, x, y, z, 200, nil, 0, 0, 360 - rotZ, vx, vy, vz) rocketTimer = setTimer(function() rocketTimer = false end, 3000, 1) else outputChatBox("#ff00003 Sec Wait!", 0, 0, 0, true) end else outputChatBox("#ff0000Rocket is not enabled please use /erocket", 255, 255, 255, true) end end bindKey("lctrl", "down", rocket) function rocketEnable() if rocketActivated == false then rocketActivated = true elseif rocketActivated == true then rocketActivated = false end end addCommandHandler("erocket", rocketEnable) Try this
  8. Hydra

    Image screen...

    I didn't understand anything. Can you be more specific in translation because there are words in another language in your sentence?
  9. local jumpActivated = false function jumpVehicle() if jumpActivated == true then local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then if isVehicleOnGround(vehicle) then local vx, vy, vz = getElementVelocity(vehicle) setElementVelocity(vehicle, vx, vy, vz+0.5) end end elseif jumpActivated == false then outputChatBox("#FF0000[CAR JUMP]: #FFFfffCar Jump is not activated, please use /ecarjump to activate", 255, 255, 255, true) end end bindKey("lshift", "down", jumpVehicle) function activateJump() if jumpActivated == false then jumpActivated = true elseif jumpActivated == true then jumpActivated = false end end addCommandHandler("ecarjump", activateJump) Is this what you want?
  10. From what I understand, he wants an effect for plants to grow when you approach them. ?. If this is what he is asking then he can make it with setObjectScale since plants are objects or with a shader. With script he could use colshape events
  11. Show us the full script for the database
  12. Hydra

    Fade Sound

    Why don't you use this to stop the sound slowly: l function stopSoundSlowly (sElement) if not isElement(sElement) then return false end local sound_timer_quant = getSoundVolume(sElement) local slowlyStop = setTimer( function () local soundVolume = getSoundVolume(sElement) setSoundVolume(sElement,soundVolume - 0.5) if soundVolume >= 0 then stopSound(sElement) end end,400,sound_timer_quant*2 ) end https://wiki.multitheftauto.com/wiki/StopSoundSlowly You can also make something like startSoundSlowly with this function
  13. function protectModel() if fileExists("model.dff") then local replaceDFF = engineLoadDFF("model.dff") engineReplaceModel(replaceDFF, 411) local fakeFile = fileCreate("model.3d") fileWrite(fakeFile, "Nope") fileClose(fakeFile) fileDelete("model.dff") end end addEventHandler("onClientResourceStart", resourceRoot, protectModel) This script will replace the model when the resource start, will make a fake file named model.3d and will delete the original file.
  14. These are the functions you need to use: fileExists fileDelete fileOpen fileRead engine functions for replace the model Quick description: You can get the data from your original file using fileRead then use engine functions for the data you get from your .dff and .txd to replace the model and delete the files after using fileDelete. I hope you understand what I said because I'm on phone and can't give you an example
  15. Version 1.4.1(BETA VERSION) - Added coronas and lighting for the objects located in Missionary Hills - Added lighting for a few building objects in Los Santos - Added 2 new settings for settings.lua file * activationMessage (is set to false as default) * activateOnlyAtNight (is set to true as default) More info about the new settings are in settings.lua file Download the new version from here: https://community.multitheftauto.com/?p=resources&s=details&id=18637 Things that will be added in the next version: - Sun lighting - More lighting for buildings that do not have it
  16. I don't think this is what he needs. I think he is asking if he can load the txd and dff files with custom format such as 'myModel.blabla'. If this is what is he is asking then yes it can
  17. You mean to load the .txd and .dff files with custom format?
  18. Thanks for your suggestions. I will add these in the next update
  19. You could use setAccountData/getAccountData or with database to store the login times
  20. Is there any way to check a respective surface? Like if getTerrainSurface() == "grass" or something.
  21. I started working on this resource again and I said to give 2 pictures for you to make an idea on how the map will look when this script is finished. Default: With this resource: Gonna change the name from ,,New Lamppost Lighting" in "New Lighting System"
  22. I think this shader can help you: https://nightly.multitheftauto.com/files/shaders/shader_hud_mask.zip
  23. Refresh the page if you see this message on community. It happens to me too
×
×
  • Create New...