Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. ON / OFF?
  2. Because you haven't found it yet. The boss is probably created serverside, because it has to be synced with all other players. I do not know the script, neither I am going to spend time searching it for you (I don't have that luxury either). This will be your first research case, where you have to search and find a component you want to edit. Did you know that I spend more than 30 hours researching a single resource? (one of the first large resources I came in contact with) While researching I started to edit things on the way, which makes researching a bit more interesting. Tell me @TorNix~|nR, how much energy and time are you going to spend on achieving this?
  3. Before you can try, you have to understand else those 100 times are for nothing. So tell me what did you learn from the code?
  4. You will have to study the script that is creating the `boss`, because this is just bull:~ code and will not get you anywhere. Check for export functions or custom events you could trigger.
  5. IIYAMA

    Help me pls

    edit line 1, to: sha1 = { Edit line 297, to: -- nothing
  6. IIYAMA

    Help me pls

    ONLY the file " sha1.lua", not a folder. Just put it in the root/top layer of the resource where you are going to using this sha1 function. Then open the meta.xml of the resource. (which is also in the root/top layer) And add there between the meta tags: <meta>HERE</meta> This: <script src="sha1.lua" />
  7. IIYAMA

    Help me pls

    I really hope you didn't copy the Github comments with it. Because the code you posted contains them, if so try to copy the raw format of it. Raw format: https://raw.githubusercontent.com/kikito/sha1.lua/master/sha1.lua Replace:(it is in your code, seek and find) sha1(password) With: sha1.sha1(password) Make sure to check if the code you download is working. :
  8. local sounds = {} function onSay1() if isElement(source) then local x, y, z = getElementPosition(source) local sound = playSound3D('say1.mp3',x,y,z) setSoundMaxDistance(sound, 25) sounds[#sounds + 1] = {sound = sound, player = source} end end addEvent("onSay1",true) addEventHandler("onSay1", root, onSay1) addEventHandler("onClientRender", root, function () if #sounds > 0 then for i=#sounds, 1, -1 do local soundData = sounds[i] local sound = soundData.sound local player = soundData.player if isElement(sound) and isElement(player) then local x, y, z = getElementPosition(player) setElementPosition (sound, x, y, z) else table.remove(sounds, i) end end end end) triggerClientEvent (root, "onSay1", player) Something like this. (untested)
  9. This is all there is.
  10. onClientPreRender < (do not use attachElements)
  11. How about attaching the player and ped to the car while doing the animation?
  12. Re-writting it in your own style is a good way of learning how the code works.
  13. https://wiki.multitheftauto.com/wiki/GetVehicleHandling or https://wiki.multitheftauto.com/wiki/GetModelHandling or https://wiki.multitheftauto.com/wiki/GetOriginalHandling At key/index. maxVelocity Combine with the post of the @Unknown-guy.
  14. siren-system Not enough context to help you with this. For the interior. Use createElement and set it's children. local newElement = createElement("interiorEntrance", "interiorEntrance:" .. interiorID) for i=1, 30 do local marker = createMarker (...) setElementParent(marker, newElement) end destroyElement(newElement) -- will also destroy it's children. Syntax createElement: element createElement ( string elementType, [ string elementID = nil ] )
  15. Put this in your meta.xml <oop>true</oop> As I said before, do not mix oop in your script, unless you know what you are doing.
  16. https://wiki.multitheftauto.com/wiki/RemovePedFromVehicle
  17. function dxOutputMessage(message, player, r, g, b) -- this works for server side trigger from another resource triggerClientEvent(player, "dxMessage.dxOutputMessage", player, message, r, g, b); end function outputMessage(message, player, r, g, b) dxOutputMessage(message, player, r, g, b); end addEvent("dxMessage.outputMessage", true); addEventHandler("dxMessage.outputMessage", root, function(message, r, g, b) outputMessage(message, client, r, g, b); -- and here end); It is not recommended to mix oop syntax in your code, unless you want to learn that,
  18. Please follow the createVehicle syntax vehicle createVehicle ( int model, float x, float y, float z [, float rx, float ry, float rz, string numberplate, bool bDirection, int variant1, int variant2 ] ) https://wiki.multitheftauto.com/wiki/CreateVehicle You have to fill in the model and it's position (x, y, z). So for example: createVehicle(400, 0, 0, 10) This will create a vehicle with the skin/model 400 in the middle of the map. And if that doesn't work, please check if that part of the code gets executed.
  19. Nice goal. And the problem is? ...
  20. local sound function say1() if isElement(sound) then stopSound (sound) end local x, y, z = getElementPosition(localPlayer) sound = playSound3D('say1.mp3',x,y,z) setSoundMaxDistance(sound, 25) end addCommandHandler('say1', say1) ----------------------------------------------------- addEventHandler("onClientRender", root, function () if isElement(sound) then local x,y,z = getElementPosition(localPlayer) setElementPosition (sound, x, y, z) end end) There is no source available in those functions. Not here: https://wiki.multitheftauto.com/wiki/AddCommandHandler And not here: https://wiki.multitheftauto.com/wiki/OnClientRender
  21. It has to do with weather or/and time. As you can see, it is getting dark there. There are no functions for that.
  22. Insert it in `List` like this. The variable `player` is used as key, which leads to the data(another table). Saving List[player] = {Value, Value2, Value3} Loading local data = List[player] local value1 = data[1] local value2 = data[2] local value3 = data[3] Looping for player, data in pairs(List) do local value1 = data[1] local value2 = data[2] local value3 = data[3] end Please do not abuse using the predefined variable `source` inside of an addCommandHandler. Just simple: function ShowRank (player) Since you already know that it is a player (or false if it is activated by script.)
  23. I wouldn't hate you for that, I am a human after all. But I do hope you are a human too and let one of our efforts not vain.
  24. yes, but if you do that, you must make sure that the receiver resource is always running while using the other resource.
  25. And I shouldn't forget to tell you that the resource must be running as well.
×
×
  • Create New...