Ü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 - Koko ((Maxi))

Oldalak: 1 2 [3] 4 5
31
Segítségkérés / login panel, html-el
« Dátum: 2017. Június 21. - 14:45:48 »
értem! csak az a gond, hogy nem értek a JavaScripthez, meg a hmtl-t is nemrég kezdtem, akkor gui-val lehetne egyszerűbben?

32
Segítségkérés / login panel, html-el
« Dátum: 2017. Június 21. - 13:05:47 »
Sziasztok!
 
Elkezdtem egy login panelt készíteni. Az egész panel html+css-el van készítve, be is hozza meg minden. Viszont abba kérnék segítséget, hogy miként tudom lekérni a szövegdobozba írt szöveget? Próbáltam gui-val de ha félre kattintok akkor eltűnik a textbox, ezért gondoltam arra, hogy html-es textboxot kéne lekérni.

33
Segítségkérés / External Modban nem menti a kocsit
« Dátum: 2017. Április 26. - 18:09:51 »
Írd be hogy /park és autómatán lementi az autó pozícióját!

34
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 20. - 19:05:44 »
Igen szépen köszönöm szépen! Sikerült! :D

35
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 17:40:07 »

local screenW, screenH = guiGetScreenSize()
local font = dxCreateFont( \"font/myriadproregular.ttf\", 11 )
local font1 = dxCreateFont( \"font/OpenSansB.ttf\", 12 )
local font2 = dxCreateFont( \"font/OpenSans.ttf\", 12 )
local monitorSize = {guiGetScreenSize()}
local panelSize = {500, 400}
local panelX, panelY = monitorSize[1]/2-panelSize[1]/2, monitorSize[2]/2-panelSize[2]/2
local mutat = false
local jelenAblak = 0
local gombkatt = 0
local megnyomva = false
function isCursorOnBox(xS,yS,wS,hS)
if(isCursorShowing()) then
   XY = {guiGetScreenSize()}
   local cursorX, cursorY = getCursorPosition()
   cursorX, cursorY = cursorX*XY[1], cursorY*XY[2]
   if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then
      return true
   else
      return false
   end
end   
end
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
   return true
else
   return false
end
end
 
 
function rajzol()
local id = getElementData(localPlayer, \"char:id\")
local name = getElementData(localPlayer, \"acc:name\")
local admin = getElementData(localPlayer, \"acc:admin\")
local penz = getElementData(localPlayer, \"char:money\")
local ig_name = getElementData(localPlayer, \"char:name\")
local pp = getElementData(localPlayer, \"char:pp\")
local skin = getElementData(localPlayer, \"char:skin\")
local vehSlot = getElementData(localPlayer, \"char:vehSlot\")
local garageSlot = getElementData(localPlayer, \"char:houseSlot\")
local jatszottperc = getElementData(localPlayer, \"char:playedTime\")
--if show then
--addEventHandler(\"onClientClick\", root, semmisem)
--
--else
--end
 
   --dxDrawText(\"Skin ID:\", panelX+122, panelY+50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   -----dxDrawText(\"#d8a84e\"..skin, panelX+220, panelY+50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   --dxDrawText(\"#d8a84e\"..pp..\"#ffffffPP\", panelX+145, panelY, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   --dxDrawText(\"#4286f4\"..penz..\" #ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"#4286f4\"..penz..\"#ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"Admin:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   ----dxDrawText(\"Autó slotok:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"Játszott percek:\", panelX+190, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"#41f48f\"..jatszottperc..\" #ffffffperc\", panelX+380, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   
   
   
   dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+50, panelY-77, 24, 24, \"image/car_garage.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+260, panelY-77, 24, 24, \"image/admin.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+476, panelY-77, 24, 24, \"image/settings.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   --dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 150), true)
        dxDrawRectangle((screenW - 847) / 2, (screenH - 481) / 2, 847, 481, tocolor(0, 0, 0, 247), false) --bg
        dxDrawLine(297 - 1, 173 - 1, 297 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 173 - 1, 297 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(297 - 1, 199, 498, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 199, 498, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 173 - 1, 512 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 173 - 1, 512 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 199, 713, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 199, 713, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 173 - 1, 727 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 173 - 1, 727 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 199, 928, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 199, 928, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 173 - 1, 943 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 173 - 1, 943 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 199, 1144, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 199, 1144, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
   
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
   informat = dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(0, 0, 0, 195))
   vagyonos = dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --2. gomb
   adminyok = dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --3. gomb
   beall = dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --4. gomb
   dxDrawImage(panelX-145, panelY-10, 128, 256, \"files/Skinek/\"..getElementModel(localPlayer)..\".jpg\", 0, 0, 0, tocolor(255, 255, 255, 255)) ---<[ Skin kép ]>---
   dxDrawImage(panelX-151, panelY-17, 256, 512, \"files/Skinek/frame.png\", 0, 0, 0, tocolor(0, 0, 0, 255)) ---<[ Skin kép ]>---
if gombkatt == 1 then
   dxDrawText(\"Név:\", panelX+100, panelY-100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
elseif gombkatt == 2 then
   dxDrawText(\"#d8a84e\"..ig_name, panelX+200, panelY-100, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
elseif gombkatt == 3 then
dxDrawText(\"Készpénz:\", panelX+143, panelY-50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
elseif gombkatt == 4 then
dxDrawText(\"PP:\", panelX+88, panelY, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
end
      
      
      
if(isCursorOnBox(panelX-173, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(60, 114, 201), false)
end
if(isCursorOnBox(panelX+42, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(60, 114, 201), false) --2. gomb
end
if(isCursorOnBox(panelX+257, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(60, 114, 201), false) --3. gomb
end
if(isCursorOnBox(panelX+473, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(60, 114, 201), false) --4. gomb
end
 
end
 
 
 

-------------------------Klikkelések-----------------------------------      
   
function menuClick(gomb,stat,x,y)
if jelenAblak == 1 then
   if megnyomva then
      if gomb == \"left\" and stat == \"down\" then

         if (dobozbaVan(panelX+473, panelY-77, 201, 26, x, y)) then
         gombkatt = gombkatt + 1
         elseif (dobozbaVan(panelX+257, panelY-77, 201, 26, x, y)) then
         gombkatt = gombkatt + 2
         elseif (dobozbaVan(panelX+42, panelY-77, 201, 26, x, y)) then
         gombkatt = gombkatt + 3
         elseif (dobozbaVan(panelX-173, panelY-77, 201, 26, x, y)) then
         gombkatt = gombkatt + 4
         end
      end
   end
end
end
 

   
bindKey(\"home\", \"down\", function()
addEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",false)
if tonumber(jelenAblak) ~= 1 then
jelenAblak = jelenAblak + 1
end
 
addEventHandler(\"onClientClick\", root, menuClick)
 
end)
 
bindKey(\"backspace\", \"down\", function()
if tonumber(jelenAblak) ~= 0 then
jelenAblak = jelenAblak - 1
end
removeEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",true)
end)

 
 

36
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 16:14:53 »
Nos sikerült egy kicsit másképp, de az a gondom hogy csak azt hozza be amire először kattintottam, ha másikra akarok akkor nem csinál semmi! Mit ronthattam el?

37
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 13:20:00 »
Köszönöm szépen! Sokat segítettél! 

38
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 12:47:40 »
Köszönöm szépen! Sikerült!
Lenne még egy kérdésem. Van négy gombom, és ha az egyikre rákattintok akkor rendereljen egy szöveget, ha a másikra kattolok akkor megint másikat de a régit eltüntesse. Ezt hogy lehetne hogy ne zabáljon sok fps-t?

39
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 12:32:42 »
Igen, de nekem olyan kéne hogy csak egyszer növeli az értéket!

40
Segítségkérés / Változók, hozzáadás, elvonás
« Dátum: 2017. Február 19. - 12:11:11 »
Sziasztok! Azt hogy lehet megcsinálni hogy ha hozzáadok a változóhoz 1-et egy gomb megnyomásakor és ha mégegyszer megnyomom de adja hozzá?

41
Segítségkérés / Dashboard, kattintás
« Dátum: 2017. Február 19. - 11:38:47 »
Sziasztok! Egy dashboard készítése közben elakadtam! Nem sikerült megcsinálnom, hogy csak akkor tudjak rákattintani a gombra, ha a dashboard elővan hozva és minden gombnál más dolgot hozzon elő. Tudna valaki segíteni?
 

local screenW, screenH = guiGetScreenSize()
local font = dxCreateFont( \"font/myriadproregular.ttf\", 11 )
local font1 = dxCreateFont( \"font/OpenSansB.ttf\", 12 )
local font2 = dxCreateFont( \"font/OpenSans.ttf\", 12 )
local monitorSize = {guiGetScreenSize()}
local panelSize = {500, 400}
local panelX, panelY = monitorSize[1]/2-panelSize[1]/2, monitorSize[2]/2-panelSize[2]/2
local mutat = false
local jelenAblak = 0
function isCursorOnBox(xS,yS,wS,hS)
if(isCursorShowing()) then
   XY = {guiGetScreenSize()}
   local cursorX, cursorY = getCursorPosition()
   cursorX, cursorY = cursorX*XY[1], cursorY*XY[2]
   if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then
      return true
   else
      return false
   end
end   
end
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
   return true
else
   return false
end
end
 
 
function rajzol()
local id = getElementData(localPlayer, \"char:id\")
local name = getElementData(localPlayer, \"acc:name\")
local admin = getElementData(localPlayer, \"acc:admin\")
local penz = getElementData(localPlayer, \"char:money\")
local ig_name = getElementData(localPlayer, \"char:name\")
local pp = getElementData(localPlayer, \"char:pp\")
local skin = getElementData(localPlayer, \"char:skin\")
local vehSlot = getElementData(localPlayer, \"char:vehSlot\")
local garageSlot = getElementData(localPlayer, \"char:houseSlot\")
local jatszottperc = getElementData(localPlayer, \"char:playedTime\")
--if show then
--addEventHandler(\"onClientClick\", root, semmisem)
--
--else
--end
 
   dxDrawText(\"Név:\", panelX+100, panelY-100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..ig_name, panelX+200, panelY-100, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Készpénz:\", panelX+143, panelY-50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"PP:\", panelX+88, panelY, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"Skin ID:\", panelX+122, panelY+50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..skin, panelX+220, panelY+50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..pp..\"#ffffffPP\", panelX+145, panelY, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#4286f4\"..penz..\" #ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"#4286f4\"..penz..\"#ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Admin:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"Autó slotok:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Játszott percek:\", panelX+190, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"#41f48f\"..jatszottperc..\" #ffffffperc\", panelX+380, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   
   
   
   dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+50, panelY-77, 24, 24, \"image/car_garage.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+260, panelY-77, 24, 24, \"image/admin.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+476, panelY-77, 24, 24, \"image/settings.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   --dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 150), true)
        dxDrawRectangle((screenW - 847) / 2, (screenH - 481) / 2, 847, 481, tocolor(0, 0, 0, 247), false) --bg
        dxDrawLine(297 - 1, 173 - 1, 297 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 173 - 1, 297 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(297 - 1, 199, 498, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 199, 498, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 173 - 1, 512 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 173 - 1, 512 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 199, 713, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 199, 713, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 173 - 1, 727 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 173 - 1, 727 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 199, 928, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 199, 928, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 173 - 1, 943 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 173 - 1, 943 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 199, 1144, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 199, 1144, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
   
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(0, 0, 0, 195))
      dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --2. gomb
      dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --3. gomb
      dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --4. gomb
   dxDrawImage(panelX-145, panelY-10, 128, 256, \"files/Skinek/\"..getElementModel(localPlayer)..\".jpg\", 0, 0, 0, tocolor(255, 255, 255, 255)) ---<[ Skin kép ]>---
   dxDrawImage(panelX-151, panelY-17, 256, 512, \"files/Skinek/frame.png\", 0, 0, 0, tocolor(0, 0, 0, 255)) ---<[ Skin kép ]>---
      
      
      
if(isCursorOnBox(panelX-173, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(60, 114, 201), false)
end
if(isCursorOnBox(panelX+42, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(60, 114, 201), false) --2. gomb
end
if(isCursorOnBox(panelX+257, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(60, 114, 201), false) --3. gomb
end
if(isCursorOnBox(panelX+473, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(60, 114, 201), false) --4. gomb
end
 
end
 

function as()
end
 
 
-------------------------Klikkelések-----------------------------------      
   
function menuClick(gomb,stat,x,y)
if jelenAblak == 1 then
if gomb == \"left\" and stat == \"down\" then

if (dobozbaVan(panelX+473, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffSettings-re kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX+257, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffAdmin-ra kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX+42, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffVagyon-ra kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX-173, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffInfo-ra kattoltál!\", 124, 197, 118, true)
end
end
end


end
 
addEventHandler(\"onClientClick\", root, menuClick)
 
   
bindKey(\"home\", \"down\", function()
addEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",false)
jelenAblak = jelenAblak + 1
addEventHandler(\"onClientClick\", root, menuClick)
 
end)
 
bindKey(\"backspace\", \"down\", function()
--JelenAblak = JelenAblak - 1
removeEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",true)
end)

 
 

42
Segítségkérés / Klikkelés
« Dátum: 2017. Február 18. - 19:43:02 »
Köszönöm, le is tesztelem! Azért használok element data-t mert ezt találtam a legegyszerűbbnek. Még csak tanulgatom a lua-t. Nem tudom könnyebben hogyan lehetne megoldani. 

43
Segítségkérés / Klikkelés
« Dátum: 2017. Február 18. - 19:30:25 »
Ez benn van a menuClick funkció-ban vagy máshova is kell? 

44
Segítségkérés / Klikkelés
« Dátum: 2017. Február 18. - 19:19:54 »

local screenW, screenH = guiGetScreenSize()
local font = dxCreateFont( \"font/myriadproregular.ttf\", 11 )
local font1 = dxCreateFont( \"font/OpenSansB.ttf\", 12 )
local font2 = dxCreateFont( \"font/OpenSans.ttf\", 12 )
local monitorSize = {guiGetScreenSize()}
local panelSize = {500, 400}
local panelX, panelY = monitorSize[1]/2-panelSize[1]/2, monitorSize[2]/2-panelSize[2]/2
local mutat = false
local jelenAblak = 0
function isCursorOnBox(xS,yS,wS,hS)
if(isCursorShowing()) then
   XY = {guiGetScreenSize()}
   local cursorX, cursorY = getCursorPosition()
   cursorX, cursorY = cursorX*XY[1], cursorY*XY[2]
   if(cursorX >= xS and cursorX <= xS+wS and cursorY >= yS and cursorY <= yS+hS) then
      return true
   else
      return false
   end
end   
end
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
   return true
else
   return false
end
end
 
 
function rajzol()
local id = getElementData(localPlayer, \"char:id\")
local name = getElementData(localPlayer, \"acc:name\")
local admin = getElementData(localPlayer, \"acc:admin\")
local penz = getElementData(localPlayer, \"char:money\")
local ig_name = getElementData(localPlayer, \"char:name\")
local pp = getElementData(localPlayer, \"char:pp\")
local skin = getElementData(localPlayer, \"char:skin\")
local vehSlot = getElementData(localPlayer, \"char:vehSlot\")
local garageSlot = getElementData(localPlayer, \"char:houseSlot\")
local jatszottperc = getElementData(localPlayer, \"char:playedTime\")
--if show then
--addEventHandler(\"onClientClick\", root, semmisem)
--
--else
addEventHandler(\"onClientClick\", root, menuClick)
--end
 
   dxDrawText(\"Név:\", panelX+100, panelY-100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..ig_name, panelX+200, panelY-100, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Készpénz:\", panelX+143, panelY-50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"PP:\", panelX+88, panelY, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"Skin ID:\", panelX+122, panelY+50, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..skin, panelX+220, panelY+50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#d8a84e\"..pp..\"#ffffffPP\", panelX+145, panelY, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\", true, true, true, true)         
   dxDrawText(\"#4286f4\"..penz..\" #ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"#4286f4\"..penz..\"#ffffff$\", panelX+260, panelY-50, 400, 400, tocolor(255,255,255), 1, font2, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Admin:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   --dxDrawText(\"Autó slotok:\", panelX+120, panelY+100, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"Játszott percek:\", panelX+190, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   dxDrawText(\"#41f48f\"..jatszottperc..\" #ffffffperc\", panelX+380, panelY+150, 400, 400, tocolor(255,255,255), 1, font1, \"center\", \"center\",  true, true, true, true)         
   
   
   
   dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+50, panelY-77, 24, 24, \"image/car_garage.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+260, panelY-77, 24, 24, \"image/admin.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   dxDrawImage(panelX+476, panelY-77, 24, 24, \"image/settings.png\", 0, 0, 0, tocolor(255, 255, 255, 200), true)
   --dxDrawImage(panelX-170, panelY-77, 24, 24, \"image/info.png\", 0, 0, 0, tocolor(255, 255, 255, 150), true)
        dxDrawRectangle((screenW - 847) / 2, (screenH - 481) / 2, 847, 481, tocolor(0, 0, 0, 247), false) --bg
        dxDrawLine(297 - 1, 173 - 1, 297 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 173 - 1, 297 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(297 - 1, 199, 498, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(498, 199, 498, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 173 - 1, 512 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 173 - 1, 512 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(512 - 1, 199, 713, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(713, 199, 713, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 173 - 1, 727 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 173 - 1, 727 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(727 - 1, 199, 928, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(928, 199, 928, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 173 - 1, 943 - 1, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 173 - 1, 943 - 1, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(943 - 1, 199, 1144, 199, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1144, 199, 1144, 173 - 1, tocolor(0, 0, 0, 255), 1, false)
   
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      --dxDrawText(\"\", 89, 383, 180, 444, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
      dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(0, 0, 0, 195))
      dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --2. gomb
      dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --3. gomb
      dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(0, 0, 0, 195), false) --4. gomb
   dxDrawImage(panelX-145, panelY-10, 128, 256, \"files/Skinek/\"..getElementModel(localPlayer)..\".jpg\", 0, 0, 0, tocolor(255, 255, 255, 255)) ---<[ Skin kép ]>---
   dxDrawImage(panelX-151, panelY-17, 256, 512, \"files/Skinek/frame.png\", 0, 0, 0, tocolor(0, 0, 0, 255)) ---<[ Skin kép ]>---
      
      
      
if(isCursorOnBox(panelX-173, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX-173, panelY-77, 201, 26, tocolor(60, 114, 201), false)
end
if(isCursorOnBox(panelX+42, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+42, panelY-77, 201, 26, tocolor(60, 114, 201), false) --2. gomb
end
if(isCursorOnBox(panelX+257, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+257, panelY-77, 201, 26, tocolor(60, 114, 201), false) --3. gomb
end
if(isCursorOnBox(panelX+473, panelY-77, 201, 26)) then   
dxDrawRectangle(panelX+473, panelY-77, 201, 26, tocolor(60, 114, 201), false) --4. gomb
end
 
end
 
function meghivod()
addEventHandler(\"onClientRender\", root, rajzol)
rajzol()
end
 
 

-------------------------Klikkelések-----------------------------------      
   
function menuClick(gomb,stat,x,y)
if getElementData(localPlayer, \"dashon\") then return
if gomb == \"left\" and stat == \"down\" then
if (dobozbaVan(panelX+473, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffSettings-re kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX+257, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffAdmin-ra kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX+42, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffVagyon-ra kattoltál!\", 124, 197, 118, true)
end
if (dobozbaVan(panelX-173, panelY-77, 201, 26, x, y)) then
   outputChatBox(\"#ffffffInfo-ra kattoltál!\", 124, 197, 118, true)

end
end

end
end
 
addCommandHandler(\"hehe\", meghivod)
   
bindKey(\"home\", \"down\", function()
setElementData(localPlayer, \"dashon\")
addEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",false)
 
end)
 
bindKey(\"backspace\", \"down\", function()
setElementData(localPlayer, \"dashoff\")
removeEventHandler(\"onClientRender\", root, rajzol)
toggleControl(\"change_camera\",true)
end)

 
Dx

45
Segítségkérés / Klikkelés
« Dátum: 2017. Február 18. - 19:02:08 »
Sziasztok! Egy dashboard készítése közben elakadtam! Nem sikerült megcsinálnom, hogy csak akkor tudjak rákattintani a gombra, ha a dashboard elővan hozva. Mielőtt először megnyitom működik, de miután bezárom és a képernyőre kattintok, ugyanúgy kiírja a szöveget! Mi lehet a gond?

Oldalak: 1 2 [3] 4 5
SimplePortal 2.3.7 © 2008-2024, SimplePortal