Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-07-29, 02:28


Vxen







Wiek: 27
Na forum: 4086 dni
Posty: 293

Piwa: 1299

Respekt: 130,5
Respekt: 130,5

Jak zrobi? aby Buttony w wybiera?ce Spawnu si? pojawia?y po logowaniu a nie po najechaniu?

local Panel = {}
local show true
local sm = {}
sm.moov 0
sm.object1sm.object2 nilnil

local function camRender ()
    local x1y1z1 getElementPosition sm.object1 )
    local x2y2z2 getElementPosition sm.object2 )
    setCameraMatrix x1y1z1x2y2z2 )
end
 
local function removeCamHandler ()
    if(sm.moov == 1then
        sm.moov 0
        removeEventHandler "onClientPreRender"getRootElement(), camRender )
    end
end
 
function smoothMoveCameraa x1y1z1x1ty1tz1tx2y2z2x2ty2tz2ttime )
    if(sm.moov == 1then return false end
    sm.object1 createObject 1337x1y1z1 )
    sm.object2 createObject 1337x1ty1tz1t )
    setElementAlpha sm.object1)
    setElementAlpha sm.object2)
    setObjectScale(sm.object10.01)
    setObjectScale(sm.object20.01)
    moveObject sm.object1timex2y2z2000"InOutQuad" )
    moveObject sm.object2timex2ty2tz2t000"InOutQuad" )
 
    addEventHandler "onClientPreRender"getRootElement(), camRender )
    sm.moov 1
    setTimer removeCamHandlertime)
    setTimer destroyElementtime1sm.object1 )
    setTimer destroyElementtime1sm.object2 )
    return true
end


Panel.Label_Login guiCreateButton(0.420.5540.150.04"Zaloguj"true)
--guiSetFont(Panel.Label_Login"default-bold-small")
--guiLabelSetHorizontalAlign(Panel.Label_Login"center"false)
--guiLabelSetVerticalAlign(Panel.Label_Login"center")
--Panel.Label_Login:setVisible false );
Panel.Label_Rejka guiCreateButton(0.420.6110.150.04"Zarejestruj"true)
guiSetFont(Panel.Label_Rejka"default-bold-small")
--guiLabelSetHorizontalAlign(Panel.Label_Rejka"center"false)
--guiLabelSetVerticalAlign(Panel.Label_Rejka"center")
--Panel.Label_Rejka:setVisible false );
Panel.Edit_Login guiCreateEdit(0.420.450.150.04""true)
Panel.Edit_Login:setVisible false );
Panel.Edit_Haslo guiCreateEdit(0.420.510.150.04""true)    
guiEditSetMasked(Panel.Edit_Haslotrue)    
Panel.Edit_Haslo:setVisible false );
Panel.Informacje guiCreateLabel(0.260.380.470.05""true)
guiSetFont(Panel.Informacje"default-bold-small")
guiLabelSetColor(Panel.Informacje71173195)
guiLabelSetHorizontalAlign(Panel.Informacje"center"false)
guiLabelSetVerticalAlign(Panel.Informacje"center")    
Panel.Informacje:setVisible false );

local screenWscreenH guiGetScreenSize()
function Panel.Grafika()
    dxDrawRectangle(screenW 0.263screenH 0.378screenW 0.474screenH 0.284tocolor(000188), false)
    --dxDrawRectangle(screenW 0.263screenH 0.313screenW 0.474screenH 0.065tocolor(686868182), false)
    --dxDrawText("Panel Logowania"screenW 0.263screenH 0.313screenW 0.442screenH 0.378tocolor(255255255255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)
    --dxDrawText("Nazwa Serwera "screenW 0.558screenH 0.313screenW 0.738screenH 0.378tocolor(255255255255), 1.20"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Autor: Monio"screenW 0.271screenH 0.635screenW 0.318screenH 0.661tocolor(255255255255), 0.80"default-bold""left""center"falsefalsefalsefalsefalse)
    dxDrawText("Login:"screenW 0.329screenH 0.453screenW 0.424screenH 0.488tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Has?o:"screenW 0.329screenH 0.507screenW 0.424screenH 0.542tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    --dxDrawText("<< Login"screenW 0.576screenH 0.456screenW 0.671screenH 0.491tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    --dxDrawText("<< Password"screenW 0.576screenH 0.505screenW 0.671screenH 0.540tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
    dxDrawText("Wersja: by Vxen"screenW 0.690screenH 0.635screenW 0.738screenH 0.661tocolor(255255255255), 0.80"default-bold""left""center"falsefalsefalsefalsefalse)
end

--function Panel.Button_Login_Off()------------------------------------------------------------
--    if show == true then
--        dxDrawRectangle(screenW 0.420screenH 0.555screenW 0.150screenH 0.043tocolor(686868209), false)
--    end
--end
--
--function Panel.Button_Haslo_Off()-----------------------------------------------------------
--    dxDrawRectangle(screenW 0.420screenH 0.611screenW 0.150screenH 0.043tocolor(686868209), false)
--end

--function Panel.Button_Login_On()-------------------------------------
--    dxDrawRectangle(screenW 0.420screenH 0.555screenW 0.150screenH 0.043tocolor(71173195212), false)
--end

--function Panel.Button_Haslo_On()-------------------------------------
--    dxDrawRectangle(screenW 0.420screenH 0.611screenW 0.150screenH 0.043tocolor(71173195212), false)
--end

addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), 
function ()
    smoothMoveCameraa (1895.091796875, -1807.142089843870.458423614502,
    1573.9093017578, -1722.677001953152.467288970947,
    1422.9503173828, -1728.380004882822.484668731689,
    1478.8485107422, -1662.471801757825.742967605591,
    12000 );
    show true
    fadeCamera (true);
    showChat (false);
    showPlayerHudComponent("all",false);
    showCursor true );
    Panel.Edit_Haslo:setVisible true );
    Panel.Edit_Login:setVisible true );
    Panel.Label_Login:setVisible true );
    Panel.Informacje:setVisible true );
    Panel.Label_Rejka:setVisible true );
    addEventHandler ("onClientRender"rootPanel.Grafika);
--    addEventHandler ("onClientRender"rootPanel.Button_Haslo_Off);
--   addEventHandler ("onClientRender"rootPanel.Button_Login_Off);
--    removeEventHandler ("onClientRender"rootPanel.Button_Haslo_On);
--    removeEventHandler ("onClientRender"rootPanel.Button_Login_On);
end)

--addEventHandler ("onClientMouseEnter"Panel.Label_Login,
--function ()
--    removeEventHandler ("onClientRender"rootPanel.Button_Login_Off)
--    addEventHandler ("onClientRender"rootPanel.Button_Login_On)
--endfalse)


--addEventHandler ("onClientMouseLeave"Panel.Label_Login,
--function ()
--    addEventHandler ("onClientRender"rootPanel.Button_Login_Off)
--    removeEventHandler ("onClientRender"rootPanel.Button_Login_On)
--endfalse)

--addEventHandler ("onClientMouseEnter"Panel.Label_Rejka,
--function ()
--    removeEventHandler ("onClientRender"rootPanel.Button_Haslo_Off)
--    removeEventHandler ("onClientRender"rootPanel.Button_Haslo_On)
--    addEventHandler ("onClientRender"rootPanel.Button_Haslo_On)
--endfalse)


--addEventHandler ("onClientMouseLeave"Panel.Label_Rejka,
--function ()
--    removeEventHandler ("onClientRender"rootPanel.Button_Haslo_Off)
--    addEventHandler ("onClientRender"rootPanel.Button_Haslo_Off)
--    removeEventHandler ("onClientRender"rootPanel.Button_Haslo_On)
--endfalse)

function onClickBtnLogin(button,state)
    if(button == "left" and state == "up"then
        username guiGetText(Panel.Edit_Login)
        password guiGetText(Panel.Edit_Haslo)
        checksave true
        triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,passwordConfirm,checksave)
    end
end
addEventHandler ("onClientGUIClick"Panel.Label_LoginonClickBtnLoginfalse)

function onClickBtnRegister(button,state)
    if(button == "left" and state == "up"then
        username guiGetText(Panel.Edit_Login)
        password guiGetText(Panel.Edit_Haslo)
        triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,password)
    end
end
addEventHandler ("onClientGUIClick"Panel.Label_RejkaonClickBtnRegisterfalse)

addEvent ("Spawn"true)
addEventHandler ("Spawn"root,
function ()

end
)

addEvent ("nick"true)
addEventHandler ("nick"root, 
function ()
    text Panel.Informacje:setText ("Wprowad? sw?j login!")
end)

addEvent ("Zaloguj"true)
addEventHandler ("Zaloguj"root,
function ()
    text Panel.Informacje:setText ("Teraz sie zaloguj !")
end)

addEvent ("Konto_jest"true)
addEventHandler ("Konto_jest"root,
function ()
    text Panel.Informacje:setText ("Takie konto juz istnieje! \nWpisz inny nick lub haslo i sprobuj ponownie!")
end
)

addEvent ("Nick_Konto"true)
addEventHandler ("Nick_Konto"root,
function ()
    text Panel.Informacje:setText ("Konto z tym nick'iem juz istnieje!")
end
)

addEvent ("Brak_Haslo"true)
addEventHandler ("Brak_Haslo"root,
function ()
    text Panel.Informacje:setText ("Wpisz swoje haslo!")
end
)



    Spawn = {}
    showed true


    Spawn.Los_Santos guiCreateLabel(0.000.080.300.07""true)
    Spawn.San_Fierro guiCreateLabel(0.000.160.300.07""true)
    Spawn.Las_Venturas guiCreateLabel(0.000.250.300.07""true)
    Spawn.Fort_Carson guiCreateLabel(0.000.330.300.07""true)
    --Spawn.OZP guiCreateLabel(0.000.410.300.07""true)    
    Spawn.Los_Santos:setVisible false );
    Spawn.San_Fierro:setVisible false );
    Spawn.Las_Venturas:setVisible false );
    Spawn.Fort_Carson:setVisible false );
    --.OZP:setVisible false );

function Spawn.Panel()
    if showed == true then
        dxDrawRectangle(screenW 0.000screenH 0.000screenW 0.299screenH 0.069tocolor(000172), false)
        dxDrawText("Wyb?r Spawnu!"screenW 0.007screenH 0.000, (screenW 0.007) + 397, ( screenH 0.000) + 53tocolor(255255255255), 2.00"default-bold""center""center"falsefalsefalsefalsefalse)
        --dxDrawText("Los Santos"screenW 0.000screenH 0.082screenW 0.299screenH 0.151tocolor(255255255255), 2.00"default-bold""center""center"falsefalsefalsefalsefalse)
        --dxDrawText("San Fierro"screenW 0.000screenH 0.164screenW 0.299screenH 0.233tocolor(255255255255), 2.00"default-bold""center""center"falsefalsefalsefalsefalse)
        --dxDrawText("Las Venturas"screenW 0.000screenH 0.246screenW 0.299screenH 0.315tocolor(255255255255), 2.00"default-bold""center""center"falsefalsefalsefalsefalse)
        --dxDrawText("Fort Carson"screenW 0.000screenH 0.328screenW 0.299screenH 0.397tocolor(255255255255), 2.00"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Aby zaakceptowa? sw?j wyb?r\n kliknij dwa razy!"screenW 0.000screenH 0.410screenW 0.299screenH 0.479tocolor(255255255255), 1.60"default-bold""center""center"falsefalsefalsefalsefalse)
    end
end

--function Spawn.Los_Santos_Dx()
--    if showed == true then
--        dxDrawRectangle(screenW 0.000screenH 0.082screenW 0.299screenH 0.069tocolor(000172), false)
--    end
--end

--function Spawn.San_Fierro_Dx()
--    if showed == true then
--        dxDrawRectangle(screenW 0.000screenH 0.164screenW 0.299screenH 0.069tocolor(000172), false)
--    end
--end

--function Spawn.Las_Venturas_Dx()
--    if showed == true then
--        dxDrawRectangle(screenW 0.000screenH 0.246screenW 0.299screenH 0.069tocolor(000172), false)
--    end
--end

--function Spawn.Fort_Carson_Dx()
--    if showed == true then
--        dxDrawRectangle(screenW 0.000screenH 0.328screenW 0.299screenH 0.069tocolor(000172), false)
--    end
--end

--function Spawn.OZP_Dx()
--    if showed == true then
--        dxDrawRectangle(screenW 0.000screenH 0.410screenW 0.299screenH 0.069tocolor(000172), false)
--    end
--end 

-- Add

function Spawn.Los_Santos_Dx_On()
    guiCreateButton(0.0000.0820.2990.069"Los Santos"true)
    --dxDrawRectangle(screenW 0.000screenH 0.082screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.San_Fierro_Dx_On()
    guiCreateButton(0.0000.1640.2990.069"San Fiero"true)
    --dxDrawRectangle(screenW 0.000screenH 0.164screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.Las_Venturas_Dx_On()
    guiCreateButton(0.0000.2460.2990.069"Las Venturas"true)
    --dxDrawRectangle(screenW 0.000screenH 0.246screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.Fort_Carson_Dx_On()
    guiCreateButton(0.0000.3280.2990.069"Fort Carson"true)
    --dxDrawRectangle(screenW 0.000screenH 0.328screenW 0.299screenH 0.069tocolor(71173195212), false)
end

--function Spawn.OZP_Dx_On()
    --dxDrawRectangle(screenW 0.000screenH 0.410screenW 0.299screenH 0.069tocolor(71173195212), false)
--end 


addEvent ("Zacznij"true)
addEventHandler ("Zacznij"root,
function ()
    show false
    showed =  true
    Panel.Edit_Haslo:setVisible false );
    Panel.Edit_Login:setVisible false );
    Panel.Label_Login:setVisible false );
    Panel.Informacje:setVisible false );
    Panel.Label_Rejka:setVisible false );
    removeEventHandler ("onClientRender"rootPanel.Grafika);
    --removeEventHandler ("onClientRender"rootPanel.Button_Haslo_Off);
    --removeEventHandler ("onClientRender"rootPanel.Button_Login_Off);
    --removeEventHandler ("onClientRender"rootPanel.Button_Haslo_On);
    --removeEventHandler ("onClientRender"rootPanel.Button_Login_On);
    --addEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    --addEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    --addEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    --addEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    --addEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    --removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    addEventHandler ("onClientRender"rootSpawn.Panel)
    Spawn.Los_Santos:setVisible true );
    Spawn.San_Fierro:setVisible true );
    Spawn.Las_Venturas:setVisible true );
    Spawn.Fort_Carson:setVisible true );
    --Spawn.OZP:setVisible true );
end)

addEventHandler ("onClientMouseEnter"Spawn.Los_Santos,
function ()
--    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    addEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    smoothMoveCameraa (1895.091796875, -1807.142089843870.458423614502,
    1573.9093017578, -1722.677001953152.467288970947,
    1422.9503173828, -1728.380004882822.484668731689,
    1478.8485107422, -1662.471801757825.742967605591,
    12000 );
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)


addEventHandler ("onClientMouseLeave"Spawn.Los_Santos,
function ()
--    addEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)

-- Sf

addEventHandler ("onClientMouseEnter"Spawn.San_Fierro,
function ()
--    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    addEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    smoothMoveCameraa (-2680.894781677.4040589.47169,
    -2681.046391438.6342876.17654,
    -2680.825201294.8214165.73161,
    -2680.113771197.1873875.04411,
    12000 );
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)


addEventHandler ("onClientMouseLeave"Spawn.San_Fierro,
function ()
--    addEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)

-- LV

addEventHandler ("onClientMouseEnter"Spawn.Las_Venturas,
function ()
--    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    addEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    smoothMoveCameraa (2323.818851283.0836297.47743,
    2292.171631283.9635061.43044,
    2129.380861286.0981449.42192,
    2176.603271285.8728041.17391,
    12000);
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)


addEventHandler ("onClientMouseLeave"Spawn.Las_Venturas,
function ()
--    addEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)

-- FC

addEventHandler ("onClientMouseEnter"Spawn.Fort_Carson,
function ()
--    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    addEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    smoothMoveCameraa (206.528521035.6744438.83426,
    189.906481078.4890143.67355,
    173.141421161.0489526.81353,
    169.982701200.9669230.19880,
    12000 );
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)


addEventHandler ("onClientMouseLeave"Spawn.Fort_Carson,
function ()
--    addEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    addEventHandler ("onClientRender"rootSpawn.Panel)
endfalse)

-- OZP

--addEventHandler ("onClientMouseEnter"Spawn.OZP,
--function ()
    --removeEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    --addEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    --removeEventHandler ("onClientRender"rootSpawn.Panel)
    --addEventHandler ("onClientRender"rootSpawn.Panel)
--endfalse)


--addEventHandler ("onClientMouseLeave"Spawn.OZP,
--function ()
    --addEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    --removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    --removeEventHandler ("onClientRender"rootSpawn.Panel)
    --addEventHandler ("onClientRender"rootSpawn.Panel)
--endfalse)

-- Klikanie

addEventHandler ("onClientGUIDoubleClick"Spawn.Los_Santos,
function ()
    showed false
    showPlayerHudComponent("all",true);
    triggerServerEvent ("LS_Spawn"rootlocalPlayer)
    player getLocalPlayer()
    setCameraTarget (player)
    showChat true )
    showCursor false )
    removeEventHandler "onClientPreRender"getRootElement(), camRender )
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    Spawn.Los_Santos:setVisible false );
    Spawn.San_Fierro:setVisible false );
    Spawn.Las_Venturas:setVisible false );
    Spawn.Fort_Carson:setVisible false );
    --Spawn.OZP:setVisible false );
endfalse
)

addEventHandler ("onClientGUIDoubleClick"Spawn.San_Fierro,
function ()
    showed false
    showPlayerHudComponent("all",true);
    triggerServerEvent ("SF_Spawn"rootlocalPlayer)
    player getLocalPlayer()
    setCameraTarget (player)
    showChat true )
    showCursor false )
    removeEventHandler "onClientPreRender"getRootElement(), camRender )
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    Spawn.Los_Santos:setVisible false );
    Spawn.San_Fierro:setVisible false );
    Spawn.Las_Venturas:setVisible false );
    Spawn.Fort_Carson:setVisible false );
    --Spawn.OZP:setVisible false );
endfalse
)

addEventHandler ("onClientGUIDoubleClick"Spawn.Las_Venturas,
function ()
    showed false
    showPlayerHudComponent("all",true);
    triggerServerEvent ("LV_Spawn"rootlocalPlayer)
    player getLocalPlayer()
    setCameraTarget (player)
    showChat true )
    showCursor false )
    removeEventHandler "onClientPreRender"getRootElement(), camRender )
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    Spawn.Los_Santos:setVisible false );
    Spawn.San_Fierro:setVisible false );
    Spawn.Las_Venturas:setVisible false );
    Spawn.Fort_Carson:setVisible false );
    --Spawn.OZP:setVisible false );
endfalse
)

addEventHandler ("onClientGUIDoubleClick"Spawn.Fort_Carson,
function ()
    showed false
    showPlayerHudComponent("all",true);
    triggerServerEvent ("For_Spawn"rootlocalPlayer)
    player getLocalPlayer()
    setCameraTarget (player)
    showChat true )
    showCursor false )
    removeEventHandler "onClientPreRender"getRootElement(), camRender )
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx)
    removeEventHandler ("onClientRender"rootSpawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.OZP_Dx_On)
    removeEventHandler ("onClientRender"rootSpawn.Panel)
    Spawn.Los_Santos:setVisible false );
    Spawn.San_Fierro:setVisible false );
    Spawn.Las_Venturas:setVisible false );
    Spawn.Fort_Carson:setVisible false );
    --Spawn.OZP:setVisible false );
endfalse
)

--addEventHandler ("onClientGUIDoubleClick"Spawn.OZP,
--function ()
--outputChatBox ("OStatnio Zapisana Pozycja")
--endfalse
--)


Za pomoc stawiam!


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-30, 00:15


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%

Więcej informacji znajdziesz w Wikipedii MTA:

onPlayerLogin


Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Tagi: buttony :: pojawiające :: się :: zalogowaniu.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku