Jump to content

RocKyz

Members
  • 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

5,765 profile views

RocKyz's Achievements

Jacker

Jacker (39/54)

318

Reputation

  1. 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
  2. RocKyz

    Scroll label

    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
  3. RocKyz

    Scroll label

    That might help you guiLabelGetFontHeight
  4. استخدم https://wiki.multitheftauto.com/wiki/Matrix local forwardPosition = player.matrix.position + player.matrix.forward * 2
  5. 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)
  6. 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)
  7. 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)
  8. الخطأ غالبا بسبب انك مررت الأرقمنتات في التايمر اخر سطر
  9. تقدر تختصر كل هذا table.insert(table, 1, value)
  10. وين مشكلتك بالضبط واطرح جدول players
  11. كودك مابيسوي اي فرق لان التيبل موجود اصلا وانت حاط IF NOT EXISTS اذا يبي يعدل على التيبل يقدر يمسحه وينشئه مرة ثانية مع الاضافات او ببساطة يستخدم ALTER TABLE
  12. جرب كذا 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)
  13. حاول تعدل اسلوبك اذا تبي احد يساعدك المهم, سويت لك الكود على حسب الي فهمته منك ما جربته 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)
  14. Could you explain what is the problem ?
×
×
  • Create New...