-
Posts
1,862 -
Joined
-
Days Won
8
Rockyz last won the day on May 28 2019
Rockyz had the most liked content!
Details
-
Gang
N/A
-
Location
Earth
-
Occupation
N/A
-
Interests
N/A
Recent Profile Visitors
6,550 profile views
Rockyz's Achievements
Jacker (39/54)
318
Reputation
-
You could use callbacks to avoid that an example from the wiki: local dbConnection = dbConnect("sqlite", "sql.db") function onServerCallback(queryHandler, extraData) local queryResult = dbPoll(queryHandler, 0) print(extraData) if type(queryResult) == "table" then print("queryResult == table") if #queryResult > 0 then print("#queryResult > 0") else print("#queryResult == 0") end else print("queryResult ~= table") end end dbQuery(onServerCallback, {"Extra data :)"}, dbConnection, "SELECT * FROM `Players` WHERE `playerName` = ?", "playerName")
-
function stringToMS(str) local ms = 0 str = str:lower(); ms = ms + tonumber(str:match("(%d+)%s*s") or "0") * 1000 -- Seconds ms = ms + tonumber(str:match("(%d+)%s*m") or "0") * (1000 * 60) -- Minutes ms = ms + tonumber(str:match("(%d+)%s*h") or "0") * (1000 * 60 * 60) -- Hours ms = ms + tonumber(str:match("(%d+)%s*d") or "0") * (1000 * 60 * 60 * 24) -- Days ms = ms + tonumber(str:match("(%d+)%s*y") or "0") * (1000 * 60 * 60 * 24 * 365) -- Years return ms end
-
Rockyz changed their profile photo
-
Then what about that function guiLabelGetTextHeight(label) local text = guiGetText(label) local height = guiLabelGetFontHeight(label) return ((text:len()-text:gsub("\n", ""):len())*height)+height end I haven't test it tho
-
That might help you guiLabelGetFontHeight
-
استخدم https://wiki.multitheftauto.com/wiki/Matrix local forwardPosition = player.matrix.position + player.matrix.forward * 2
-
For better performance, create an element and set it as the parent for the markers instead of adding an event for every single marker. local markersParent = createElement("markersParent") local t = { {2450, -1670, 12}, {2455, -1670, 12}, {2460, -1670, 12} } addEventHandler("onResourceStart", resourceRoot, function() for i = 1, #t do local v = t[i] local marker = createMarker(v[1], v[2], v[3], "cylinder", 2.5, 255, 255, 255) setElementParent(marker, markersParent) end end) addEventHandler("onMarkerHit", markersParent, function(hitElement) if getElementType(hitElement) == "player" then if isPedInVehicle(hitElement) then outputChatBox("Vehicles not allowed.", hitElement) else setElementPosition(hitElement, 2400, -1650, 12) outputChatBox("You're spawned.", hitElement) end end end)
-
You're getting this error because you've missed a bracket on the end of the db string: CREATE TABLE IF NOT EXISTS `vehicles` (id INT, model INT, x FLOAT, y FLOAT, z FLOAT)
-
I don't know what are you trying to do, but anyways try to replace the db string with this: CREATE TABLE IF NOT EXISTS `vehicles` (id INT, model INT, x FLOAT, y FLOAT, z FLOAT)
-
الخطأ غالبا بسبب انك مررت الأرقمنتات في التايمر اخر سطر
-
Ahmed Salah started following Rockyz
-
تقدر تختصر كل هذا table.insert(table, 1, value)
-
وين مشكلتك بالضبط واطرح جدول players
-
جرب كذا local TiempoPr = getTickCount() addEvent("onPlayerSpray", true) addEventHandler("onPlayerSpray", root, function(rockets) local tick = getTickCount() if (tick - TiempoPr > 5000) then outputChatBox("Player #FFFFFF"..getPlayerName(source).." #FFFFFFhas shot #aacccc["..rockets.." #ffffffrockets in #ffffff"..math.floor((tick - TiempoPr) / 1000).." #ffffffseconds]", root, 255, 255, 255, true) TiempoPr = tick end end)
-
حاول تعدل اسلوبك اذا تبي احد يساعدك المهم, سويت لك الكود على حسب الي فهمته منك ما جربته local tick = getTickCount() local from, to = test.moveX, 1; addEventHandler("onClientRender", root, function() local currentTick = getTickCount() local progress = (currentTick - tick) / 2000 local position = interpolateBetween(from, 0, 0, to, 0, 0, progress, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0", sX*0.35-position, sY*0.15, 250, 250, tocolor(255, 255, 255, 255), 2.00, "default-build", "left", "center", false) if progress >= 1 then tick = currentTick from, to = to, from end end)