Jump to content

IIYAMA

Moderators
  • Posts

    6,089
  • Joined

  • Last visited

  • Days Won

    216

Everything posted by IIYAMA

  1. onClientPreRender < (do not use attachElements)
  2. How about attaching the player and ped to the car while doing the animation?
  3. Re-writting it in your own style is a good way of learning how the code works.
  4. 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.
  5. 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 ] )
  6. 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.
  7. https://wiki.multitheftauto.com/wiki/RemovePedFromVehicle
  8. 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,
  9. 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.
  10. 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
  11. It has to do with weather or/and time. As you can see, it is getting dark there. There are no functions for that.
  12. 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.)
  13. 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.
  14. yes, but if you do that, you must make sure that the receiver resource is always running while using the other resource.
  15. And I shouldn't forget to tell you that the resource must be running as well.
  16. nope, in at least one RESOURCE where you want to use it. It can be in any server file, but it doesn't have to be added multiple times, just one time.
  17. Time to get started @santinet12, thanking us will even so put our effort in vain.
  18. A triggerServerEvent is used to communicate with the server. It is required that the event is added serverside before used. addEvent("onPlayer(ResourceName)Start", true) The addEvent function will make sure that the event is added. (serverside in your case) The first argument is the event name "onPlayer(ResourceName)Start". The second argument will enable events from a different side (client/server). If set to false you can't use triggerServerEvent/triggerClientEvent, only triggerEvent to activate it. For more information: https://wiki.multitheftauto.com/wiki/AddEvent
  19. So you are saying that verification is a useless thing? Receiving very different code from 3* people and answer it with 'doesn't work' is 10x worse. They all might work if applied correctly. * Almost 4.
  20. Where is your next attempt bro? We didn't even see what you did with our code. It is almost as if you are not working either.
  21. Yea should break the loop if there are no rows. if row then -- your thing else break end
  22. If you don't debug your code manually, then you don't work either. Sounds like a great match to me.
  23. Please read those two lines better. Because at the end it is not focused.
×
×
  • Create New...