Jump to content

IIYAMA

Moderators
  • Posts

    6,086
  • Joined

  • Last visited

  • Days Won

    215

Everything posted by IIYAMA

  1. strange error: Maybe it is: "--" Try to replace it with: text -" .. "- text
  2. IIYAMA

    Mods ._.

    Then you check if the file does exist: https://wiki.multitheftauto.com/wiki/FileExists
  3. IIYAMA

    Table indexes

    To be honest the table.insert has it's benefits, but not in this code. Table.insert is a little bit slower(because it is a function), so you won't have benefit from it now. Benefit of table.insert is that you can add data at fields without overwrite other fields. myTable = { "hi1","hi2","hi4" } table.insert(myTable,3,"hi3" ) outputChatBox = outputChatBox or print for i=1,#myTable do outputChatBox(myTable[i]) end Result: hi1 hi2 hi3 hi4 So do what you want to use and know the differences between them!
  4. adjust the velocity depending of the distance from the ground. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight https://wiki.multitheftauto.com/wiki/Ge ... enPoints3D
  5. IIYAMA

    Mods ._.

    Apply the txd and the dff directly after each other.
  6. IIYAMA

    Money

    @Matevsz If you don't understand shaders, make it with dx as the other guys say. Now please post your code. (after your wrote it...) [url=https://wiki.multitheftauto.com/wiki/DxDrawText]https://wiki.multitheftauto.com/wiki/DxDrawText[/url] [url=https://wiki.multitheftauto.com/wiki/OnClientRender]https://wiki.multitheftauto.com/wiki/OnClientRender[/url] [url=https://wiki.multitheftauto.com/wiki/DxSetAspectRatioAdjustmentEnabled]https://wiki.multitheftauto.com/wiki/Dx ... entEnabled[/url] [url=https://wiki.multitheftauto.com/wiki/ShowPlayerHudComponent]https://wiki.multitheftauto.com/wiki/Sh ... dComponent[/url] [url=https://wiki.multitheftauto.com/wiki/GetPlayerMoney]https://wiki.multitheftauto.com/wiki/GetPlayerMoney[/url] [url=https://wiki.multitheftauto.com/wiki/GuiGetScreenSize]https://wiki.multitheftauto.com/wiki/GuiGetScreenSize[/url] I gave you everything you need, try the code yourself. Don't start crying that you can't try it, because you will end up in my foes group and you won't get help from me any more.
  7. IIYAMA

    Mods ._.

    well then you don't need to apply the dff if it is the same model.
  8. IIYAMA

    Mods ._.

    Most of the dff require a txd to work. DFF = the collision TXD = the paint. (not effects, since they use image data from the "effect" itself) You can replace the txd(correct txd for this model) of an element without dff. But you can't replace dff without txd, because he doesn't know what color the element parts will be.
  9. IIYAMA

    Mods ._.

    then you need same txd's or remove the last overwrite.
  10. IIYAMA

    Mods ._.

    and what about txd
  11. IIYAMA

    Mods ._.

    Model 2 is something? Model 1 is something?
  12. You are moving the gates to the same position as they already are. ALSO: Debug your code: https://wiki.multitheftauto.com/wiki/Debugging and debug your code with debug strategies.
  13. Well you can change the vehicle handling: setVehicleHandling or push the vehicle down: setElementVelocity
  14. Ik heb er geen verstand van 3ds max(al heb ik de software wel), maar je zou het kunnen oplossen door andere objecten onzichtbaar te maken en daar mee de gaten te vullen.
  15. Daar leren ze als goed is geen lua. Dus nee, voornamelijk zelfstudie.
  16. That's only for custom weapons.(created weapons) For player weapons: onClientPlayerWeaponFire Which can't cancel. I know there is some confusion with: onClientPlayerWeaponFire and onClientWeaponFire Just read the wiki better guys and the brains will !
  17. ehm? How are you outputting it? / store it. The function you called select is a lua function, I will not recommend you to use it as overwrite. select (index, ···) If index is a number, returns all arguments after argument number index. Otherwise, index must be the string "#", and select returns the total number of extra arguments it received.
  18. it doesn't matter, the client is loading the script even if he joins or if he is already ingame.
  19. It can be done more ways, I only need one event, you two. My example will reduce warnings when re-communicate with the clients directly after the binds. Also gives the option to register players and start large data transfers without problems. But yours is quicker. @Miika822 what is it Miika822?
  20. The important thing is that you check if the elementdata has changed. Elementdata has it's own update rate(so NO not every frame), but it will also update when you set the elementdata to the same value. "Why does it updates(synchronisation) when the value is the same?" Because serverside/clientside can use the elementdata without synchronisation, so it has to be updated on the other side too. Can simply be reduced with: if getElementData(element,"key") ~= newData then setElementData(element,"key",newData) end The update rate of elementdata is very quick, so getTickCount() can reduce the amount of updates. local nextUpdate = 0 addEventHandler("onClientRender",root, function () local timeNow = getTickCount() if timeNow > nextUpdate then nextUpdate = timeNow+1000 outputChatBox("update!!!!!") end end) Elementdata can be handy but you have to be careful how many times you execute it (on both sides).
  21. client addEventHandler("onClientResourceStart",resourceRoot, function () triggerServerEvent("bindKeysFadeCamera",localPlayer)-- when the player has loaded end) server function fadeBind(thePlayer) if getCameraTarget(thePlayer) then fadeCamera(thePlayer, false, 1) else fadeCamera(thePlayer, true, 1) end end addEvent("bindKeysFadeCamera",true) addEventHandler("bindKeysFadeCamera",root, function () if isElement(client) then bindKey(client, "f12", "down", fadeBind) end end)
  22. try it yourself: Resource 1: addCommandHandler("lol1", function() outputChatBox("lol1") showCursor( not isCursorShowing() ) end) Resource 2: addCommandHandler("lol2", function() outputChatBox("lol2") showCursor(false) end) Also there also another problem, which will overwrite showCursor. That happens when you change the gui input mode. I am not a gui expert and I probably only created circa 12 gui's in my live, but this is what I know about enable the mouse.
  23. Hi, Is the function getPlayerCommunityID able to use? and yes it does exist, only it isn't on the wiki.
  24. I am telling you, that it isn't going to work what ever you do. Unless you try to understand the meaning of what I just said. If you do not understand (my)English, then find somebody who can translate it for you.
×
×
  • Create New...