Gallardo9944
Members-
Posts
442 -
Joined
-
Last visited
Everything posted by Gallardo9944
-
division by zero? Nice, man
-
libmysqlclient.so.16 cannot open shared object file
Gallardo9944 replied to ccw's topic in Linux-Server
Phew, I was just looking for it, thanks -
https://community.multitheftauto.com/ind ... ls&id=9334 Stolen from WTF DONE
-
That's strange cause it's a VPS. The host says there's nothing what could block the traffic
-
You can simply use sin and cos for such things. Just change the rotation and then calculate positions for it (something like +math.cos(math.rad(rot))*sx)
-
what for? You'll have to use string.lower anyway.
-
You can edit admin panel to display that the way you like. There's table.sort function for such operators.
-
Of course it will not work. onResourceStart (if we speak about current resource) runs AFTER everything outside it. So outputDebugString should be inside the realTime function.
-
It does if you add more checks before actually drawing and moving.
-
[HELP] Player freezes for a few seconds after spawning
Gallardo9944 replied to Backsage's topic in Scripting
Well, you can obviously do setElementDimension(0) first, and then set position. -
Injection means using a custom code by abusing mistakes made by scripters. Avoiding is simple: never do something with the "direct" text the player wrote. He can write a lua script there by breaking out of your resource and do what he wants.
-
local offset = 0 -- offset should be 0 by default function scoreScroll(side) if side == "mouse_wheel_down" then offset = offset + 10 -- scroll down elseif side == "mouse_wheel_up" then offset = offset - 10 -- scroll up end end bindKey("mouse_wheel_up","down",scoreScroll) bindKey("mouse_wheel_down","down",scoreScroll) --Later in your rendering part dxDrawText(text,px,py+offset,sx,sy,...) -- render, including scroll
-
That's not even maths tho
-
Use it in rendering as positioning.
-
You are not able to save mta tables into mysql. You should save that as a text (you might wanna use a JSON format tho)
-
Add a variable called "offset" and increase/decrease with when you move the mouse wheel.
-
You have to set that element datas to display them. Update manually each time you set new values.
-
apparently it doesn't set the tick count. Add at the beginning of the code: local g_PickupStartTick = getTickCount()
-
(login remember me system)Are MTA Serials 'reliably unique'?
Gallardo9944 replied to LonelyRoad's topic in Scripting
There are more than 500k serials possible though. But I don't use serials as a base for smth - there are situations when you are not using your own computer or got a new one. -
If you want to save a file without special symbols in the name, but don't want to gsub every single one, you might consider using this function: -- Get the string using this function function getUTFlessString(str) if not (type(str) == "string") then return end local arr = UTF8ToCharArray(str) local ln = { } for k,v in pairs(arr) do local sz = 0 for t in v:gmatch"." do sz = sz + 1 -- count the size per symbol end if sz <= 1 then table.insert(ln,v) end end str = table.concat(ln,"") return str end function UTF8ToCharArray(str) local charArray = {} local iStart = 0 local strLen = str:len() local function bit(b) return 2 ^ (b - 1) end local function hasbit(w, b) return w % (b + b) >= b end local function checkMultiByte(i) if (iStart ~= 0) then charArray[#charArray + 1] = str:sub(iStart, i - 1) iStart = 0 end end for i = 1, strLen do local b = str:byte(i) local multiStart = hasbit(b, bit(7)) and hasbit(b, bit(8)) local multiTrail = not hasbit(b, bit(7)) and hasbit(b, bit(8)) if (multiStart) then checkMultiByte(i) iStart = i elseif (not multiTrail) then checkMultiByte(i) charArray[#charArray + 1] = str:sub(i, i) end end checkMultiByte(strLen + 1) return charArray end The usage is simple: local c = "[DM] Packy Ѡ vol.13 Ѡ Defiance Ѡ" local dc = getUTFlessString(c) -- the result will be "[DM] Packy vol.13 Defiance "
-
Nah, i'm not looking for reflection. I just want to make the vehicle colour use its max brightness.
-
Oh wow, full copypaste of my example Use triggerClientEvent.
-
Hello. When the car is under some light (e.g. headlights from other car or a street lamp), vehicle's colour is also brighter. Is there any proper way of making the car always act as it's under some direct light? Thanks.
-
viewtopic.php?f=91&t=65746&p=619388
-
Just remove the event handler each time you are not sure if it's added or not.