Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. 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,
  2. 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.
  3. 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.
  4. max is 2000. only it is buggy.
  5. 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,
  6. 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.
  7. 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"
  8. 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
  9. 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.
  10. 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?
  11. I haven't worked that much with OOP, but it probably will work. The best way to find it out is by testing it.
  12. setElementDimension that's how.
  13. 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.
  14. 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.
  15. 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.
  16. IIYAMA

    Head Rotation

    I will look at it tomorrow, probably because the camera end stops at the player. It should be extended.
  17. IIYAMA

    Head Rotation

    ignore pa3ck his post, it seems he doesn't know what the source is.... Btw try this: (not tested) It will give you better information about the head rotation, the default update of the camera matrix is 4 secs. addEvent("sendRotateHead",true) addEventHandler("sendRotateHead",root, function (xr,yr,zr) if isElement(source) then -- make sure he is still in game triggerClientEvent(root,"rotateHead",source,xr,yr,zr) end end) local headUpdateFunction = function () local x,y,z,xr,yr,zr = getCameraMatrix(localPlayer) if xr and getElementHealth(localPlayer) > 0 then triggerServerEvent("sendRotateHead", localPlayer, xr,yr,zr) end end addEventHandler("onClientResourceStart",root, function () setTimer(headUpdateFunction,1000,0) end) addEvent("rotateHead", true) addEventHandler("rotateHead", root, function(xr,yr,zr) if isElement(source then -- make sure he is still in game setPedLookAt (source, xr,yr,zr, 100) end end) Updated.
  18. IIYAMA

    Head Rotation

    send this information over from server to client: https://wiki.multitheftauto.com/wiki/GetCameraMatrix float targetX, float targetY, float targetZ
  19. IIYAMA

    Head Rotation

    Well triggerClientEvent or elementdata. - TriggerClientEvent uses 3+ times more data but you can choose what player receives the data. (the closes players) - ElementData uses less data but it will send to all players directly. It depends on this: - 30+ players and for big maps (or full gta san) use triggerClientEvent. - Less players and players are all in the same part of the world, use elementdata. Use the command: /shownetstat to choose between those ways of data transfer.
  20. IIYAMA

    OOP functions

    yes, I had same result.
  21. IIYAMA

    OOP functions

    To be honest I have no idea how to connect those tables. When you send them over with triggerClientEvent, only a copie remains of the table from serverside. Also when you set the lua file as client and serverside, you also will have a copie. But I will try to find this secret. Ik weet niet hoever dit mogelijk is.
  22. IIYAMA

    OOP functions

    Meta tables, hmm I have never tried to use them because they never had any extra use for me. I always did things like this: local myTable Information = Table1[variable] or Table2[vaiable] So it is possible to set a meta table from client to serverside? Bedankt!
  23. freeroam running? Then freeroam also outputs.
  24. IIYAMA

    OOP functions

    I have heard some things about the OOP system, about that it is faster etc. But is this all ready possible and able to use? If "yes" were can I find how to use it? Because I have never seen an OOP system. Thank you
×
×
  • Create New...