Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. then he better can try this: http://mta.dzek.eu/mmove/
  2. As glowdemon said, those values are for the offset between the elements. X and Y are for horizontal offset and the Z value are for changing the height between the elements. Google proudly presents.(dutch image> as = axes) We can better call it the distance/offset in 3D.
  3. is this out side the gta san map?
  4. You have ever take a look at this function? https://wiki.multitheftauto.com/wiki/Tr ... lientEvent and for showing the download: https://wiki.multitheftauto.com/wiki/Ge ... entHandles triggerLatentClientEvent (player,"lovely_function",10000,player,mapstring) local table = getLatentEventHandles ( player ) local handler = table[#table] if handler then outputChatBox(tostring(getLatentEventStatus( handler)["percentComplete"])) end --- etc.... Player won't be freeze, when you limit the bandwidth(to the value you want) and network traffic is not blocked. Next to that you can cancel the map transfer when you send the next map. https://wiki.multitheftauto.com/wiki/CancelLatentEvent
  5. I found some information about vehicle parts at this function a few months ago. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight Not sure if those parts are sharing the same id, but I think they do.
  6. nope, only required when you call a function outside the function/if block. Try this: gMe = getLocalPlayer() function gravity() marker1 = createMarker (6009, 392, 10.800000190735, "corona", 2, 0, 0, 0, 0) object = createObject (1681, 6009.2998046875, 396.39999389648, 16.10000038147) end function MarkerHit ( hitPlayer, matchingDimension ) local vehicle = getPedOccupiedVehicle ( hitPlayer ) if hitPlayer ~= gMe then return end if source == marker1 then attachElements (vehicle, object, 0, 0, -5.5, 0, 0, 0) moveObject (object, 1999, 6009.2998046875, 490, 16.10000038147) setTimer(function () if isElement(vehicle) then detachElements (vehicle) -- you detach the elements from the object. So it should be the vehicle. end end,2000,1) end end addEventHandler( "onClientResourceStart", resourceRoot, gravity ) addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) vehicle = child. object = mother. (mother holds the child.)
  7. Try this: local Xr,Yr,Zr = getElementRotation(vehicle) if Xr > 90 and Xr < 270 and Yr > 90 and Yr < 270 then end
  8. But you didn't use from Json.
  9. Was that sarcasm? Nvm, enjoy that. No reply pls.
  10. IIYAMA

    Sync peds

    np.
  11. IIYAMA

    Sync peds

    Peds/vehicles/players have automatic de-sync functions when they got streamed out. They will go over to light sync updates(slow updates). You can set up some of those settings with this: https://wiki.multitheftauto.com/wiki/Sy ... l_settings Put ped_sync_interval at around 150/200. Trigger events are using much more data then streamed in elements. I don't run a zombie server, but I will recommend you to limit the zombies or try to set them in differed dimensions or what every you can try. For finding the best data result, use: /shownetstat This will show you how many packets will be send, the less packets the better. Also note: Uploading cost much more bandwidth than download. So script as manys thing that have to be with sync at serverside. Make sure the server and the client knows "which player sync which ped". So you make sure that I know all peds that are synced by me, etc. (but other players don't have to know that) Good luck,
  12. IIYAMA

    Sync peds

    You are wasting to much bandwidth. Use: https://wiki.multitheftauto.com/wiki/GetElementSyncer And set your TriggerClientEvent targets manually in stead of root them, because just 1 player have to check his own synced peds. Too solve your laggy problem.
  13. and this a problem? It can be, when you use it. But to get back to the topic, he can also fake that 100 hp. Just use the math people learn at school and he will be fine.
  14. max is 2000. only it is buggy.
  15. I know what you show me and that was my conclusion. If it wasn't true then you wouldn't have 2 repliers, but many more. I won't reply on your topics as you won't reply on mine. Don't reply on this reply, because I will be the last person that make THAT reply. Have a nice day,
  16. IIYAMA

    onPlayerQuit

    It can only show that error at moments his team >element< got deleted at the exact same time. I have that problem with my custom killmessages. Conclusion: If that isn't the case, then his code isn't the same as this one.
  17. This isn't help, this is making a free script for you. I have showed you a lot of those problems, but you aren't reading my notes. You also don't ask questions why some things don't work, you are uninterested in lua and only interested in the scripts. I can't help somebody with 1% knowledge about lua. You just copy every line from wiki, mix them up somehow and say: here is my code, can you fix it pls!?! But actuality you say: "here are a few lines, make me a code"
  18. You can't just add random player arguments when a resource starts, wtf? You should start learning the basic of scripting, this isn't going to work. and how you solve it, is by reading wiki mta instead of doing the "wtf". https://wiki.multitheftauto.com/wiki/Main_Page https://wiki.multitheftauto.com/wiki/Main_Page https://wiki.multitheftauto.com/wiki/Main_Page https://wiki.multitheftauto.com/wiki/Main_Page
  19. line 7 isn't serverside. (localPlayer isn't serverside) local team = getPlayerTeam(localPlayer) --Line 7 Line 28, is a client event. addEventHandler("onClientPickupHit", root,MP5, giveMP5) --Line 28 The source of line 11,12,14 and 15 isn't a player. showPlayerHudComponent ( source, "ammo", true ) showPlayerHudComponent ( source, "weapon", true ) else showPlayerHudComponent ( source, "ammo", false ) showPlayerHudComponent ( source, "weapon", false ) onResourceStart The source of this event is the root element in the resource that started.
  20. Then you should debug the script and see if it works. I prefer to do it all serverside, without oop. Then you can control the latency, with oop you can't. Did you enable OOP in the meta.xml?
  21. I haven't worked that much with OOP, but it probably will work. The best way to find it out is by testing it.
  22. setElementDimension that's how.
  23. it isn't smart to set a vehicle to dimension 0, when you don't even know the vehicle still does exist. Next to that you don't clear the table when a player leaves the server, the userdata will remain there until the resource stops/restart. Even so it was a good example how it should be done, table systems are making the code very, very, fast.
  24. localPlayer can only be used at clientside. "local team = getPlayerTeam(localPlayer)" and many more mistakes. This all isn't going to work, you swapped client and serverside.
  25. Don't ask that, It is terrible enough that people like that do exist in this world. People who like to rape others, for their own benefit.
×
×
  • Create New...