-
Posts
285 -
Joined
-
Last visited
Everything posted by Spajk
-
Uhm, that won't replace the vehicle name itself. Modifying the vehicle name in MTA ain't possible.
-
Are these charts constantly changing? If not, some kind of local storage would be usefull.
-
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.
-
Why are you storing it as a string anyway?
-
Did you try without the ";" on the end?
-
Did you get the element position server-side or client-side?
-
[SOLVED] Apply velocity to vehicle synced with server
Spajk replied to Einheit-101's topic in Scripting
It's not about functions, it's about states of the element that are synced. -
Use "source" instead of "player".
-
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.
-
Ah, then it shouldn't be a problem to use the local variables and just read/save to mysql on login and logout.
-
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 )
-
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.
-
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.
-
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.
-
[SOLVED] Apply velocity to vehicle synced with server
Spajk replied to Einheit-101's topic in Scripting
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. -
[SOLVED] Apply velocity to vehicle synced with server
Spajk replied to Einheit-101's topic in Scripting
If the driver is the syncer of the trailer then you could use the function client-side. -
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.
-
If someone forgets his password you should just change his password to a new one instead of telling him the old one.
-
Accessing local variable from the chunk above?
Spajk replied to Pigfoot_Nosebeggar's topic in Scripting
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? -
Accessing local variable from the chunk above?
Spajk replied to Pigfoot_Nosebeggar's topic in Scripting
Are you sure that "k" becomes global? -
It is possible with this function: https://wiki.multitheftauto.com/wiki/AclGroupAddObject
-
Just loop thru table and add it. A function like this would have to do the same thing at some level.
