Jump to content

IIYAMA

Moderators
  • Posts

    5,972
  • Joined

  • Last visited

  • Days Won

    191

IIYAMA last won the day on February 23

IIYAMA had the most liked content!

About IIYAMA

  • Birthday 01/01/2016

Member Title

  • Global Moderator

Details

  • Gang
    [HB]
  • Location
    Netherlands
  • Occupation
    I have never been to the streets of SA... so who knows?
  • Interests
    Design, scripting, UX/UI

Recent Profile Visitors

28,134 profile views

IIYAMA's Achievements

Gangsta

Gangsta (45/54)

1.5k

Reputation

  1. IIYAMA

    Help

    Double check if the serverside file is running and init as serverside. Do not enable remote for native events. This is a security risk. Use the predefined client variable for remote triggers, else cheaters can kill a whole server instantly. iprint(triggerClientEvent and "serverside" or "clientside") -- inspect if the file is running serverside addEvent("onPlayerDamage", false) -- disable remote function handlePlayerDamage(attacker, weapon, bodypart, loss) if client ~= source then return end local victim = client triggerEvent("onPlayerDamage", victim, attacker, weapon, bodypart, loss) -- emulate the (client) cancelled onPlayerDamage event if getElementHealth(victim) > 0 then setElementHealth(victim, getElementHealth(victim) - loss) if getElementHealth(victim) <= 0 then setElementData(victim, "isDead", true) killPed(victim) end end end addEvent("onCustomPlayerDamage", true) addEventHandler("onCustomPlayerDamage", root, handlePlayerDamage) function isPlayerDead(player) return getElementData(player, "isDead") or false end function onClientPlayerDamage(attacker, weapon, bodypart, loss) if attacker and getElementType(attacker) == "player" then triggerServerEvent("onCustomPlayerDamage", localPlayer, attacker, weapon, bodypart, loss) cancelEvent() end end addEventHandler("onClientPlayerDamage", root, onClientPlayerDamage)
  2. IIYAMA

    Help

    Technically it is possible, but it will only work as intended when the latency is very low (< 60 ping) and stable internet (no packet loss). How it technically works is that the server is used as mediator for all the damage. When a player it's health is 0, all future damage done by this player is ignored. But keep in mind that this will look very weird when the latency is too high. (unplayable) Some basics: Clientside onClientPlayerDamage cancelEvent triggerServerEvent Serverside addEvent addEventHandler getElementHealth setElementHealth killPed
  3. If the parameter matchingDimension contains the value true, the marker is hit in the same dimension. Instead of setting a timer. Which currently is being created infinity > crashing the server at a given point. Do the following: When giving a jetpack, check if the player is inside of the marker. Based on that, give the Jetpack yes / no. -- Making the marker find able inside of another resource local antiJetpack = createElement ( "antiJetpackType", "antiJetpackID" ) local marker = createMarker ( 0, 0, 0, "cylinder", 1.5, 255, 255, 0, 170 ) setElementParent(marker, antiJetpack) (Other resource) local parent = getElementByID ("antiJetpackID") if not parent then return end local marker = getElementChildren ( parent )[1] local status = isElementWithinMarker ( thePlayer, marker ) https://wiki.multitheftauto.com/wiki/IsElementWithinMarker
  4. Can't you just copy your Program Files (x86)\MTA San Andreas 1.6\server to the server? (maybe I am missing something, but a windows server should be able to start up windows stuff)
  5. Then the code looks fine. Unless the numbers are a mixture of numbers and strings. 123 vs "123" In theory it shouldn't be possible because this function is ran single threaded. There will always be one that is first. The whole function chain-call should have been ended before a new call can be made. The following should be finished before the root function can be called again.
  6. What is inside of data[1] and data[2]? (to be more specific, what type is inside: table, string, number etc.) And what are you clicking on?
  7. For those that have already downloaded the definition files. In the last week, there have been some missing/incorrect types being discovered and fixed. See here the list of changes. Thanks to @srslyyyy for helping me with that!
  8. It can be an issue if you used the config of an older build. You checked the logs as well? (sometimes not all errors are visible in the console) And what kind of server are you running? Windows or linux? If it is Windows, you should be able to copy over your local server and try that one. If Linux, you might consider starting it up with sudo, so that it does not run in to any permission issues while creating/moving the initial files.
  9. Is this server installed with MTA or did you download the stable version separately? Things to check/do: Check your virus scan, maybe some server files have been quarantined. Reset the config, maybe it is missing something: https://github.com/multitheftauto/mtasa-blue/blob/master/Server/mods/deathmatch/mtaserver.conf.template You might consider, just reinstall MTA competently.
  10. A hard function skip maybe, just to figure out if it is actually the models. addDebugHook( "preFunction", function ( ) return "skip" end, {"engineLoadCOL", "engineReplaceCOL", "engineLoadTXD", "engineImportTXD", "engineLoadDFF", "engineReplaceModel"}) (if possible run the hook on a resource with higher download priority) If that is the issue, then rewrite the resources so that the models are loaded slower. For example load a model every X frame(s).
  11. You could start with disabling all models, number 1 in causing cashes.
  12. Is the web panel accessible? (and other resources)
  13. Not sure but, would the > operator not make more sense? if health > loss then --- ... else setElementExtraHealth(source, 0) -- clean dead status (not sure if this is a good idea) end
×
×
  • Create New...