Jump to content

Skin Panel


Xperia

Recommended Posts

El error esta en que no encuentra el archivo "swat.txd".

  
function skin_panel() 
  
    PANEL = guiCreateWindow(337,130,333,338,"Skin panel",false) 
    guiSetAlpha(PANEL,1) 
    guiWindowSetMovable(PANEL,true) 
    guiWindowSetSizable(PANEL,false) 
     
    ON285 = guiCreateButton(160,35,154,26,"ON",false,PANEL) 
     
    INFO = guiCreateMemo(9,233,315,96,"New skin panel load.\n\n---------------------------\n\nBy SrXperia^",false,PANEL) 
    guiMemoSetReadOnly(INFO,true) 
     
    OFF285 = guiCreateButton(160,71,154,26,"OFF",false,PANEL) 
     
    ON287 = guiCreateButton(160,146,154,26,"ON",false,PANEL) 
     
    OFF287 = guiCreateButton(160,182,154,26,"OFF",false,PANEL) 
     
    SKIN285 = guiCreateLabel(43,56,123,24,"Skin 285",false,PANEL) 
    guiSetFont(SKIN285,"default-bold-small") 
     
    SKIN287 = guiCreateLabel(43,167,123,24,"Skin 287",false,PANEL) 
    guiSetFont(SKIN287,"default-bold-small") 
     
    showCursor(true) 
end 
addEventHandler("onClientResourceStart",getRootElement(),skin_panel)     
     
function skinOn285 (button,state) 
    if button == "left" and state == "up" then 
        txd = engineLoadTXD ( "swat.txd" ) 
        engineImportTXD ( txd, 285 ) 
        dff = engineLoadDFF ( "swat.dff", 285 ) 
        engineReplaceModel ( dff, 285 ) 
    end 
end 
addEventHandler("onClientGUIClick",ON285,skinOn285,false) 
addEvent("onSkinOn285",true) 
addEventHandler("onSkinOn285",getRootElement(),skinOn285) 

PD: Este script no esta terminado.

Link to comment
function skin_panel() 
  
    PANEL = guiCreateWindow(337,130,333,338,"Skin panel",false) 
    guiSetAlpha(PANEL,1) 
    guiWindowSetMovable(PANEL,true) 
    guiWindowSetSizable(PANEL,false) 
     
    ON285 = guiCreateButton(160,35,154,26,"ON",false,PANEL) 
     
    INFO = guiCreateMemo(9,233,315,96,"New skin panel load.\n\n---------------------------\n\nBy SrXperia^",false,PANEL) 
    guiMemoSetReadOnly(INFO,true) 
     
    OFF285 = guiCreateButton(160,71,154,26,"OFF",false,PANEL) 
     
    ON287 = guiCreateButton(160,146,154,26,"ON",false,PANEL) 
     
    OFF287 = guiCreateButton(160,182,154,26,"OFF",false,PANEL) 
     
    SKIN285 = guiCreateLabel(43,56,123,24,"Skin 285",false,PANEL) 
    guiSetFont(SKIN285,"default-bold-small") 
     
    SKIN287 = guiCreateLabel(43,167,123,24,"Skin 287",false,PANEL) 
    guiSetFont(SKIN287,"default-bold-small") 
     
    showCursor(true) 
     
    addEventHandler( "onClientGUIClick", ON285, skinOn285, false ) 
    addEventHandler( "onClientGUIClick", ON287, skinOn287, false ) 
    addEventHandler( "onClientGUIClick", OFF285, skinOff285, false ) 
end 
addEventHandler("onClientResourceStart",getRootElement(),skin_panel)     
     
     
--PONER SKIN HOMER   
function skinOn285 (button,state) 
    if button == "left" and state == "up" then 
        txd = engineLoadTXD ( "swat.txd", 285 ) 
        engineImportTXD ( txd, 285 ) 
        dff = engineLoadDFF ( "swat.dff", 285 ) 
        engineReplaceModel ( dff, 285 ) 
    end 
end 
addEvent("onSkinOn285",true) 
addEventHandler("onSkinOn285",getRootElement(),skinOn285) 
  
  
--PONER SKIN WINNIEH 
function skinOn287 (button,state) 
    if button == "left" and state == "up" then 
        txd = engineLoadTXD ( "army.txd", 287 ) 
        engineImportTXD ( txd, 287 ) 
        dff = engineLoadDFF ( "army.dff", 287 ) 
        engineReplaceModel ( dff, 287 ) 
    end 
end 
addEvent("onSkinOn287",true) 
addEventHandler("onSkinOn287",getRootElement(),skinOn287) 
  
  
--ENCENDER/APAGAR PANEL 
function toggle() 
    if (guiGetVisible(PANEL)) then 
        showCursor(false) 
        guiSetVisible(PANEL,false) 
    else 
        showCursor(true) 
        guiSetVisible(PANEL,true) 
    end 
end 
bindKey("F2","down",toggle) 
  
function skinOff285 (button,state) 
    if button == "left" and state == "up" then 
        txd = engineLoadTXD ( "army.txd", 287 ) 
        engineImportTXD ( txd, 287 ) 
        dff = engineLoadDFF ( "army.dff", 287 ) 
        engineReplaceModel ( dff, 287 )  
    end 
end 
addEvent("onSkinOff285",false) 
addEventHandler("onSkinOff285",getRootElement(),skinOff285) 

¿Que hago para que al apretar OFF285, se desactive el skin?

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...