Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - Live

Oldalak: [1] 2 3 ... 34
1
Segítségkérés / Bollard, bollardlight
« Dátum: 2019. Január 26. - 21:00:49 »
Ha nem alap GTA-s akkor a setElementFrozen/setObjectBreakable függvényekkel.

2
Segítségkérés / setCameraMatrix
« Dátum: 2018. Október 25. - 18:14:18 »

function recursiveSetCamera(cameraId)
if cameraId == 3 then
   setCameraMatrix(1380.9006347656, -903.75323486328,60, 1412.3126220703, -807.5615234375, 55, -2, 85)
elseif cameraId == 2 then
   setCameraMatrix(1380.9006347656, -903.75323486328,50, 1412.3126220703, -807.5615234375, 55, -5, 85)
elseif cameraId == 1 then
   setCameraMatrix(1380.9006347656, -903.75323486328,25, 1412.3126220703, -807.5615234375, 55, -20, 85)
elseif cameraId == 0 then
   setCameraMatrix(1380.9006347656, -903.75323486328,10, 1412.3126220703, -807.5615234375, 55, -2, 85)
else
   setCameraTarget(localPlayer)
end
if cameraId >= 0 then
   setTimer(recursiveSetCamera, 1000, 1, cameraId - 1)
end
end
-- Használat: recursiveSetCamera(3) -- azaz a 3-as kamera Id-től fog indulni

 
 

3
Segítségkérés / Responsive dxDrawRectangle & dxDrawText
« Dátum: 2018. Szeptember 09. - 20:21:04 »

local screenX, screenY = guiGetScreenSize()
local responsiveMultipler = 0.75 + (screenX - 1024) * (1 - 0.75) / (1920 - 1024) --> reMap

 
 

4
Segítségkérés / Client/Source
« Dátum: 2018. Június 04. - 17:04:57 »

function loginPlayer(username,password,client)
dbQuery( function(qh, player, username, password)
   local result,rows,errmsg = dbPoll( qh, 0 )
   local row = result[1]
   if row then
      setElementData(player, \"isPlayedLoggedIn\", true)
      setElementData(player, \"getPlayerUsername\", username)
      if row[\"haveCharacter\"] == 0 then
            spawnCharacter(player)
      else
         triggerClientEvent(player, \"successLogin\", player, \"haveChar\")
      end
   else
      outputChatBox(\"Hibás felhasználónév, vagy jelszó!\")
   end
end,{source,username,password}, sql, \"SELECT * FROM account WHERE username=? and password=?\",username,password)
end
addEvent(\"loginPlayer\", true)
addEventHandler(\"loginPlayer\", getRootElement(), loginPlayer)

 
 

5
Segítségkérés / Object ütközések
« Dátum: 2018. Június 02. - 17:43:22 »

function canPlaceObject(objectElement)
if isElement(objectElement) then
   local objectX, objectY, objectZ = getElementPosition(objectElement)
   local minX, minY, minZ, maxX, maxY, maxZ = getElementBoundingBox(objectElement)
   local objectMatrix = getElementMatrix(objectElement)
   for i = 0, 1 do
      local z = minZ + maxZ * i
      local offX, offY, offZ = getPositionFromElementOffset(objectMatrix, minX, minY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, maxX, minY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, minX, maxY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, maxX, maxY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, minX, 0, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, maxX, 0, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, 0, minY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, 0, maxY, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
      
      offX, offY, offZ = getPositionFromElementOffset(objectMatrix, 0, 0, z)
      if not isLineOfSightClear(objectX, objectY, objectZ, offX, offY, offZ, true, true, false, true, true, false, false, localPlayer) then
         return false
      end
   end
   return true
end
return false
end
function getPositionFromElementOffset(matrix, x, y, z)
return    x * matrix[1][1] + y * matrix[2][1] + z * matrix[3][1] + matrix[4][1],
      x * matrix[1][2] + y * matrix[2][2] + z * matrix[3][2] + matrix[4][2],
      x * matrix[1][3] + y * matrix[2][3] + z * matrix[3][3] + matrix[4][3]
end

 
 
 
Az isLineOfSightClear értékeivel játszhatsz, hogy mivel ütközhet és mivel nem.

6
Segítségkérés / Multi line text height
« Dátum: 2018. Március 27. - 18:45:37 »

str = [[1
2
3
4
5
6
]]
local _, sorok = string.gsub(str, \"\\n\", \"\")
print(sorok)

 
 

7
Segítségkérés / Gsub / match?
« Dátum: 2018. Január 18. - 21:22:35 »

local darabolas = split(\"3x4\", \"x\") -- x karakter az elválasztó
local elsoSzam = tonumber(darabolas[1])
local masodikSzam = tonumber(darabolas[2])

 
 

9
Segítségkérés / Nem működik az OnClientKey.
« Dátum: 2017. December 28. - 17:03:55 »

addEventHandler(\"onClientKey\", root,
function(key, pressOrRelease)
   if key == \"lalt\" then   
      if pressOrRelease then --ha ez igaz akkor lenyomta a gombot, ha false akkor felengedte. Nincs \"down\" és \"up\"
         if isPedInVehicle( localPlayer ) then
            outputChatBox(\"Működik!\")
            dxDrawRectangle(1366 - 683, 200, 100, 30, 0xFF006400)
         end   
      end   
   end   
end
)

 
 

10
Segítségkérés / dxDrawRectlange
« Dátum: 2017. December 22. - 23:59:22 »

addEventHandler(\"onClientRender\", root,
    function()
        dxDrawRectangle((screenW - 243) / 2, (screenH - 353) / 2, 243, 353, tocolor(0, 0, 0, 110), false)
        dxDrawRectangle(562, 208, 243, 17, tocolor(0, 0, 0, 110), false)
        dxDrawRectangle(574, 259, 221, 30, tocolor(0, 0, 0, 130), false)
        dxDrawRectangle(574, 311, 221, 30, tocolor(0, 0, 0, 130), false)
        dxDrawRectangle(574, 385, 221, 30, tocolor(0, 0, 0, 130), false)
        dxDrawRectangle(574, 429, 221, 30, (isCursorInPosition(574, 429, 221, 30) and tocolor(255, 0, 0) or tocolor(0, 255, 0)))
        dxDrawText(\"Üdv az #4286f4Immortal Gaming #ffffffszerverén!\\nKérlek #ff6363 regisztrálj #ffffff vagy #4286f4jelentkezz be!\\n\\n#ffffffTovábbi jó játékot kívánunk!\", 576, 481, 795, 533, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, true, false)
        dxDrawRectangle(438, 451, 0, 0, tocolor(255, 255, 255, 255), false)
        dxDrawText(\"#4286f4Bejelentkezés\", 562, 208, 805, 224, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, true, false)
        dxDrawText(\"Felhasználónév\", 620, 240, 746, 259, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, false, false)
        dxDrawText(\"Jelszó\", 620, 292, 746, 311, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, false, false)
        dxDrawText(\"Bejelentkezés\", 620, 390, 746, 409, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, false, false)
        dxDrawText(\"Regisztráció\", 620, 435, 746, 454, tocolor(255, 255, 255, 255), 1.00, \"default-bold\", \"center\", \"center\", false, false, false, false, false)
        showPlayerHudComponentVisible(\"all\", false)
    end
)
addEventHandler(\"onClientClick\", getRootElement(),
function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ)
   if button == \"left\" and state == \"up\" then
      if (absoluteX >= 574) and (absoluteX <= 574+221) and (absoluteY >= 311) and (absoluteY <= 311+30) then
         outputChatBox(\"Ráböktél a gombra\")
      end
      if (absoluteX >= x) and (absoluteX <= x+szelesseg) and (absoluteY >= y) and (absoluteY <= y+magassag) then
         outputChatBox(\"Ráböktél a másk gombra\")
      end
   end
end
)
function isCursorInPosition(rectX, rectY, rectW, rectH)
local cursorX, cursorY = getCursorPosition()
cursorX, cursorY = cursorX * screenWidth, cursorY * screenHeight
return (cursorX >= rectX and cursorX <= rectX+rectW) and (cursorY >= rectY and cursorY <= rectY+rectH)
end

 
 

11
Segítségkérés / fileWrite probléma, json kiírás fájlba
« Dátum: 2017. November 13. - 20:03:03 »
Törlöd előtte a fájlt ha létezik, majd újra létrehozod és feltöltöd adattal.
 
 

12
Segítségkérés / Las Venturas eltüntetése és a helyére Víz!
« Dátum: 2017. Június 19. - 19:29:23 »

local waters = {
{1823, 576, 0, 2927, 576, 0, 1823, 2998, 0, 2927, 2998, 0},
{-1236, 510, 0, 1131, 510, 0, -1236, 2895, 0, 1131, 2895, 0},
{-2871, 1721, 0, -1232, 1721, 0, -2871, 2909, 0, -1232, 2909, 0},
{-2995, 452, 0, 2958, 452, 0, -2995, 2937, 0, 2958, 2937, 0},
}
addEventHandler(\"onClientResourceStart\", resourceRoot,
function ()
   setWaterLevel(-3000)
   
   for i = 1, #waters do
      createWater(waters[i][1], waters[i][2], waters[i][3], waters[i][4], waters[i][5], waters[i][6], waters[i][7], waters[i][8], waters[i][9], waters[i][10], waters[i][11], waters[i][12])
   end
end
)

 
 

14
Segítségkérés / Városok Törlése
« Dátum: 2017. Június 01. - 13:01:06 »
A .map formátumból is removeWorldModel funkcióval törli ki.

15
Segítségkérés / LS és SF törlése [removeWorldModel]
« Dátum: 2017. Május 27. - 19:42:32 »
Nagyon szívesen.
 
 
 
waterfix.lua

Oldalak: [1] 2 3 ... 34
SimplePortal 2.3.7 © 2008-2024, SimplePortal