Jump to content

Spajk

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by Spajk

  1. Uhm, that won't replace the vehicle name itself. Modifying the vehicle name in MTA ain't possible.
  2. Are these charts constantly changing? If not, some kind of local storage would be usefull.
  3. Spajk

    Modules

    Modules are only server-side so no, you cannot create custom GUIs.
  4. I guess you can create a ped on some random location below ground, set it's skin and then change camera matrix to that position.
  5. Why are you storing it as a string anyway?
  6. Spajk

    Synced Ball

    Did you get the element position server-side or client-side?
  7. It's not about functions, it's about states of the element that are synced.
  8. Use "source" instead of "player".
  9. Don't keep variables clientside, just use tables to store them. Example: On top of the server script: playtime = {} When player logins: playtime[player] = x When player logsout: playtime[player] = nil Also, onPlayerLogout event should be triggered when the player disconnects.
  10. Ah, then it shouldn't be a problem to use the local variables and just read/save to mysql on login and logout.
  11. Try it: function dxDrawCircle3D( x, y, z, radius, segments, color, width ) segments = segments or 16; -- circle is divided into segments -> higher number = smoother circle = more calculations color = color or tocolor( 255, 255, 0 ); width = width or 1; local segAngle = 360 / segments; local fX, fY, tX, tY; -- drawing line: from - to for i = 1, segments do fX = x + math.cos( math.rad( segAngle * i ) ) * radius; fY = y + math.sin( math.rad( segAngle * i ) ) * radius; tX = x + math.cos( math.rad( segAngle * (i+1) ) ) * radius; tY = y + math.sin( math.rad( segAngle * (i+1) ) ) * radius; dxDrawLine3D( fX, fY, z, tX, tY, z, color, width ); end end addEventHandler("onClientRender", root, function() dxDrawCircle3D( 1603, -1696.4, 5, 3) end )
  12. It all depends on how often that panel is used. If the panel is often used then you should constantly update it on these events, but if the panel is rarely used then there's no need for constant updating.
  13. Well, if both servers are using these variables then you will need to make an mysql request whenever you need the data as the other server might have changed that data to something else.
  14. Spajk

    DxHud 2.0

    Don't forget about the oxygen level.
  15. https://wiki.multitheftauto.com/wiki/GuiGridListClear Use this function to remove all the data from the gridlist and then just use the code you wrote above.
  16. As far as I know, every function used client side on an element whose streamer is the local player should be synced. That's how MTA works. The player "reports" every action for the elements he's streaming to the server.
  17. If the driver is the syncer of the trailer then you could use the function client-side.
  18. Why would "Simple" be bad? When something is simple then it's good. Something isn't perfect when there's nothing left to add, it's perfect when there's nothing left to take away.
  19. Spajk

    Please help me :)

    If someone forgets his password you should just change his password to a new one instead of telling him the old one.
  20. I also have a question about this. If I have this: local a = 5 a = nil a = 3 So the question is, will on line 3 a global variable be created or it will change the value of local?
  21. Spajk

    Team

    It is possible with this function: https://wiki.multitheftauto.com/wiki/AclGroupAddObject
  22. Just loop thru table and add it. A function like this would have to do the same thing at some level.
×
×
  • Create New...