Szerző Téma: Modpanel Bug  (Megtekintve 773 alkalommal)

Nem elérhető fredy

Modpanel Bug
« Dátum: 2014. Augusztus 12. - 19:04:49 »
0 Show voters
Sziasztok, most kivételesen kérek egy segítséget, mivel elkezdtem írni egy ModPanel scriptet amivel ki be lehet kapcsolni a modolást.. Na oké Meg írtam, hogy hogy képzeltem el. ÉS  BUMM, nem jó. :(

Itt Kód:




Cim, ModList, Elfogad, Bezar = nil
local allapot1 = true
local allapot2 = true
function modpanel()
local width, height = 300, 400
local scrWidth, scrHeight = guiGetScreenSize()
local x = scrWidth/2 - (width/2)
local y = scrHeight/2 - (height/2)
Cim = guiCreateWindow(x, y, width, height, \"Jármű Modok Vezérlése\", false)
ModList = guiCreateGridList(0.05, 0.05, 0.9, 0.8, true, Cim)
local column = guiGridListAddColumn(ModList, \"Kocsi Neve\", 0.6)
local row = guiGridListAddRow(ModList)
guiGridListSetItemText(ModList, row, column, \"Ferrari\", false, false)
local row = guiGridListAddRow(ModList)
guiGridListSetItemText(ModList, row, column, \"Evo X Rendőr Kocsi\", false, false)
 
Elfogad = guiCreateButton(0.05, 0.85, 0.45, 0.1, \"Bekapcsolás      Kikapcsolás\", true, Cim)
Bezar = guiCreateButton(0.5, 0.85, 0.45, 0.1, \"Bezárás\", true, Cim)
showCursor(true)
addEventHandler(\"onClientGUIClick\", Elfogad, modpanelmodolas)
addEventHandler(\"onClientGUIDoubleClick\", ModList, modpanelmodolas)
addEventHandler(\"onClientGUIClick\", Bezar, modpanelbezar)
end
addCommandHandler(\"modpanel\", modpanel)
function modpanelbezar(button, state)
if(source==Bezar) and (button==\"left\") then
destroyElement(ModList)
destroyElement(Elfogad)
destroyElement(Bezar)
destroyElement(Cim)
Cim, ModList, Elfogad, Bezar = nil, nil, nil, nil
showCursor(false)
end
end
function modpanelmodolas(button, state)
if(source==Elfogad) and (button==\"left\") then
local row, col = guiGridListGetSelectedItem(ModList)
if (row==-1) or (col==-1) then
   outputChatBox(\"Elöszőr válazd ki a kikapcsolandó vagy a bekapcsolandó modot!\", 255, 0, 0)
else
   local ModText = guiGridListGetItemText(ModList, guiGridListGetSelectedItem(ModList), 1)
   if (ModText==\"Ferrari\") then
      if (allapot1==true) then
         engineRestoreModel(411)
         allapot1 = false
      else
         DFF = engineLoadDFF( \"Kocsik/infernus.dff\", 0 )
         engineReplaceModel ( DFF, 411 )
         TXD = engineLoadTXD( \"Kocsik/infernus.txd\" )
         engineImportTXD( TXD, 411 )
         allapot1 = true
      end
   elseif  (ModText==\"Mitshubishi Lancer Evolution X Rendőr Autó\") then
      if (allapot2==true) then
         engineRestoreModel(597)
         allapot2 = false
      else
         DFF = engineLoadDFF( \"Kocsik/pd_EVO.dff\", 0 )
         engineReplaceModel ( DFF, 597 )
         TXD = engineLoadTXD( \"Kocsik/pd_EVO.txd\" )
         engineImportTXD( TXD, 597 )
         allapot2 = true
      end   
   end
   destroyElement(ModList)
   destroyElement(Elfogad)
   destroyElement(Bezar)
   destroyElement(Cim)
   Cim, ModList, Elfogad, Bezar = nil, nil, nil, nil
   showCursor(false)
end
end
end


Mi lehet a probléma???


De bezzeg ez megy:




if (row==-1) or (col==-1) then
outputChatBox(\"Elöszőr válazd ki a kikapcsolandó vagy a bekapcsolandó modot!\", 255, 0, 0)
else

Nem elérhető Toxic

  • 798
  • #elfújalágyszellő
    • Profil megtekintése
Modpanel Bug
« Válasz #1 Dátum: 2014. Augusztus 24. - 00:18:52 »
0 Show voters
[mod]Elavult, zárom.[/mod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal