Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    Sync peds?

    According to wiki the minimum for peds value is 200. If you can set it to 100, it shouldn't be working, that is if wiki is up to date. Will it hurt the server? That depends on the internet connection of the players. ?
  2. IIYAMA

    Sync peds?

    You can reduce the ped sync interval from 400 to 200 (mtaserver.conf): https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf#ped_sync_interval (https://wiki.multitheftauto.com/wiki/SetServerConfigSetting) The server has to be stopped first in case of editing the config file.
  3. IIYAMA

    Help please

    Try this: function gatefuncclose( ) if isMoving then stopObject(parkgate1) stopObject(parkgate2) moveObject ( parkgate1, 2000, 2777.123, 905.84, 10.666, 0, 90, 0) moveObject ( parkgate2, 2000, 2777.127, 920.71, 10.62, 0, -90, 0) setTimer(function() isMoving = false end,2000,1) end end addEventHandler( "onMarkerLeave", parkmarker, gatefuncclose )
  4. Then it is a scripting request, moved to resources. The code has been scraped from the following topic:
  5. Not sure which option you are referring to (I do not have access to my pc at the moment so I can't check). But the following function contains some of the settings, maybe it is in there: https://wiki.multitheftauto.com/wiki/DxGetStatus
  6. local endTime = 0 function drawTime () local timeNow = getTickCount() if timeNow < endTime then local remainingTime = endTime - timeNow dxDrawText("remainingTime:" .. remainingTime, 300, 300) else -- (re)set endTime = timeNow + 60000 end end addEventHandler("onClientRender", root, drawTime) A small example. You have to make the code iterations yourself.
  7. Here is your multiplier: Each pc/player is running a copy of this file: function botdamaged ( attacker, weapon, bodypart ) if getElementType ( source ) == "ped" then local bot = getElementData(source, "bot") local settlementguard = getElementData(source, "settlementguard") local boss = getElementData(source, "boss") local zombie = getElementData(source, "zombie") local zombieSpecial = getElementData(source, "zombieSpecial") if boss then --[[ ... ]] This file will check if ANY ped is damaged: addEventHandler ( "onClientPedDamage", root, botdamaged) The event "onClientPedDamage" does not only trigger when <you> damage the ped. It triggers always when a ped is damaged. (If it happens in the game of player, this can differ when the ping is higher/lower) When that happens, each player will do this: triggerServerEvent ("botdamages", source, source, attacker, weapon, bodypart ) And this (serverside): addEventHandler( "botdamages", root, botdamages ) To solve the issue, you have to check if the attacker is <you>. if attacker == localPlayer then end
  8. Disable the the GUI element: https://wiki.multitheftauto.com/wiki/GuiSetEnabled
  9. My opinion: Then he will fix it and send it again. Or he comes to the forum and ask for help. Being transparent is your only way to get things done in the scripting section.
  10. Sounds a bit like the saying: 'My cat ate my homework' To be honest in my opinion I see no reason for you to ask help. Your friend should be the one fixing the resource or be the one asking for help. Not you.
  11. With other words you want a packet sniffer. Locked
  12. You mean the switching time of the model? Or switching/swapping time of the lowLOD?
  13. That function is only available on clientside. See docs: https://wiki.multitheftauto.com/wiki/EngineLoadDFF
  14. Oh perfect. In that case, create 2 objects at the same place and link them together: -- non lowLOD obj = createObject( 5164, 2839.0313,-2371,9531,7.29688, 0, 0, 270, false ) -- lowLOD objLOD = createObject( 5164, 2839.0313,-2371,9531,7.29688, 0, 0, 270, true ) setLowLODElement(obj, objLOD) When the non lowLOD variant streams out, the lowLOD variant will kick-in.
  15. Or you learn to script first, so that your topic doesn't become a scripting request. ? I only give examples when you can learn enough from them, which is not the case when your question goes beyond the basics (those that you are missing at the moment).
  16. The syntax for the setLowLODElement function: bool setLowLODElement ( element theElement, element lowLODElement ) https://wiki.multitheftauto.com/wiki/SetLowLODElement You need to fill in the elements, not the model number. Afaik you are seeing warnings/errors appear in your debug console because of this. This function is used for swapping between default objects and lowLOD objects, depending if the object is streamed-in or not.
  17. serverside, else you are going to need some bunny hops to make it work. There are no clientside support functions for map files.
  18. For lowLOD's you need scripting as well afaik. https://wiki.multitheftauto.com/wiki/SetLowLODElement
  19. IIYAMA

    Colshape

    As you are already doing:
  20. onResourceStart = serverside < reason why your code does not run. onClientResourceStart = clientside Depending on the quantity, if it is just 2 objects, it doesn't really matter. But if it is 1000 objects, .map will be faster. Server Server(side) is code running on the server. There is only 1 serverside. Client Players are clients. This code is running inside of the game. Each player is running a copy of this code.
  21. IIYAMA

    Colshape

    This function collects all elements of a given type and puts them in a table. You do not have to check afterwards which type they are.
  22. IIYAMA

    Colshape

    In that case you could get all players and loop through them. See first example of this page: https://wiki.multitheftauto.com/wiki/GetElementsByType
  23. Yes Maybe here as well, but you probably already figured that one out.
  24. There is a 1 second delay between validation > if bossmusic is an element. You will have to validate again. The 1 second delay is where that 'sometimes' comes in. if isElement(bossmusic) then -- validation fadeout = setTimer(function() -- delay -- missing revalidation volume = getSoundVolume(bossmusic) setSoundVolume(bossmusic, volume-0.1) end, 1000, 0) --[[ ... ]]
  25. IIYAMA

    Colshape

    You can't magically make data/elements out of nothing. You have to be very specific about what you are trying to do and where your data should come from.
×
×
  • Create New...