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

Wysłany: 2015-09-27, 15:19


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%
Siema. Mam do Was 2 sprawy:

1. Odkry?em w mta taki skrypt jak "voice" oraz w ustawieniach bind na chat glosowy. Czy to rzeczywi?cie da si? zrobi?? Jak tak, to jak?

2. Mam zapis pieni?dzy, skina itp. Ale je?li wybior? jaki? spawn z tego panelu logowania, to ustawia mi skin CJ. Mo?na to jako? zmieni?? Abo w og?le nie dawa?o skina?

C-side:

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 guiCreateLabel(0.420.5540.150.04"Zaloguj Si?™!"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 guiCreateLabel(0.420.6110.150.04"Zarejestruj Si?™!"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("Author: 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("Wersjon: 1.0"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?&#8225; 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()
    dxDrawRectangle(screenW 0.000screenH 0.082screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.San_Fierro_Dx_On()
    dxDrawRectangle(screenW 0.000screenH 0.164screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.Las_Venturas_Dx_On()
    dxDrawRectangle(screenW 0.000screenH 0.246screenW 0.299screenH 0.069tocolor(71173195212), false)
end

function Spawn.Fort_Carson_Dx_On()
    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
--)


S-side:

function PlayerLogin(username,password,checksave)
    if not (username == ""then
        if not (password == ""then
            local account getAccount username,password )
                if ( account ~= false then
                    logIn(sourceaccountpassword)
                        setCameraTarget(sourcesource)
                    outputChatBox ("Gratulacje! Zalogowa?&#8218;e?&#8250; si?&#8482; poprawnie!")
                triggerClientEvent (source,"Zacznij",getRootElement())
                toggleControl (source"fire"false)
                toggleControl (source"aim_weapon"false)
            end
        end
    end
end                        
addEvent("onRequestLogin",true)
addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)

function registerPlayer(username,password,passwordConfirm)
    if not (username == ""then
        if not (password == ""then
                    local account getAccount (username,password)
                    if (account == falsethen
                        local accountAdded addAccount(tostring(username),tostring(password))
                        if (accountAddedthen
                            triggerClientEvent (source"Zaloguj"rootsource)
                        else
                            triggerClientEventsource"Konto_jest"rootsource)                        
                        end
                    else
                        triggerClientEvent source"Nick_Konto"rootsource)
                    end
        else
            triggerClientEvent source"Brak_Haslo"rootsource)
        end
    else
        triggerClientEvent (source"nick"rootsource)
        end
        end
                                               
        
addEvent("onRequestRegister",true)
addEventHandler("onRequestRegister",getRootElement(),registerPlayer)


function playerLoginthePlayer )
end
addEventHandler("onPlayerLogin"getRootElement(), playerLogin)

function playerJointhePlayer )
spawnPlayer(thePlayer,0,0,0,0)
end
addEventHandler("onPlayerJoin"getRootElement(), playerLogin)

addEvent ("For_Spawn"true)
addEventHandler ("For_Spawn"root,
function ( plr )
plr:spawn 13.960341189.9810819.31405)
end)

addEvent ("LV_Spawn"true)
addEventHandler ("LV_Spawn"root,
function ( plr )
plr:spawn 2080.886471285.6953110.82031 )
end
)

addEvent ("LS_Spawn"true)
addEventHandler ("LS_Spawn"root,
function ( plr )
plr:spawn 1481.23022, -1749.4438515.44531 )
end
)

addEvent ("SF_Spawn"true)
addEventHandler ("SF_Spawn"root,
function ( plr )
plr:spawn ( -1931.59668487.3322134.30988 )
end
)



Za pomoc dam :piwo: :)

Podpis



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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-27, 19:32


monio







Wiek: 30
Na forum: 4887 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

Ooo m?j panel logowania :D

[ Dodano: 2015-09-27, 19:33 ]
I w tym panelu nie ma opcji takiej, ?e zmienia skina na 0

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-27, 19:40


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%
"monio" napisał/a:

Ooo m?j panel logowania :D

[ Dodano: 2015-09-27, 19:33 ]
I w tym panelu nie ma opcji takiej, ?e zmienia skina na 0


No to jakim cudem zmienia mi na CJ? Bo jak wy??cz? i zaloguj? si? komend? to mam skina :o


PS. Napraw te ruchy kamer?, bo jak najedziesz ma SF i na LS to kamera ci?gle jest w SF :)

Podpis



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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-28, 11:30


PolskiSebek12

Programista






Wiek: 28
Na forum: 4346 dni
Posty: 343
Nick w MP: CrosRoad95

Piwa: 3883

Respekt: 288,8
Respekt: 288,8Respekt: 288,8Respekt: 288,8

Ostrzeżeń: 100%
https://wiki.multitheftauto.com/wiki/SpawnPlayer
Spawn player ma argument w nr5 w kt?rym podajesz i skinu

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-28, 11:33


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%
"PolskiSebek12" napisał/a:

https://wiki.multitheftauto.com/wiki/SpawnPlayer
Spawn player ma argument w nr5 w kt?rym podajesz i skinu


Czyli je?li nie ma argumentu to daje mi skina ID 0?

[ Dodano: 2015-09-28, 14:48 ]
Dobra, doda?em do tej funkcji spawnuj?cej, jakiego ma mi dawa? skina. Ale mimo to nie dzia?a:

addEvent ("SF_Spawn"true)
addEventHandler ("SF_Spawn"root,
function ( plr )
triggerEvent ("ustawKaseitp"getRootElement (), playerlogin)
local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
plr:spawn (  -1960.96,883.83,42.110playerskin )
end
)


A tu jest ten kod do zapisu w razie czego:

function playerLogin (thePreviousAccounttheCurrentAccountautoLogin)
  if  not (isGuestAccount (getPlayerAccount (source))) then
    local accountData getAccountData (theCurrentAccount"funmodev2-money")
    if (accountDatathen
      local playerMoney getAccountData (theCurrentAccount"funmodev2-money")
      local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
      local playerHealth getAccountData (theCurrentAccount"funmodev2-health")
      local playerArmor getAccountData (theCurrentAccount"funmodev2-armor")
      local playerWanted getAccountData (theCurrentAccount"funmodev2-wantedlevel")
      local playerWeaponID0 getAccountData (theCurrentAccount"funmodev2-weaponID0")
      local playerWeaponID1 getAccountData (theCurrentAccount"funmodev2-weaponID1")
      local playerWeaponID2 getAccountData (theCurrentAccount"funmodev2-weaponID2")
      local playerWeaponID3 getAccountData (theCurrentAccount"funmodev2-weaponID3")
      local playerWeaponID4 getAccountData (theCurrentAccount"funmodev2-weaponID4")
      local playerWeaponID5 getAccountData (theCurrentAccount"funmodev2-weaponID5")
      local playerWeaponID6 getAccountData (theCurrentAccount"funmodev2-weaponID6")
      local playerWeaponID7 getAccountData (theCurrentAccount"funmodev2-weaponID7")
      local playerWeaponID8 getAccountData (theCurrentAccount"funmodev2-weaponID8")
      local playerWeaponID9 getAccountData (theCurrentAccount"funmodev2-weaponID9")
      local playerWeaponID10 getAccountData (theCurrentAccount"funmodev2-weaponID10")
      local playerWeaponID11 getAccountData (theCurrentAccount"funmodev2-weaponID11")
      local playerWeaponID12 getAccountData (theCurrentAccount"funmodev2-weaponID12")
      local playerWeaponAmmo0 getAccountData (theCurrentAccount"funmodev2-weaponAmmo0")
      local playerWeaponAmmo1 getAccountData (theCurrentAccount"funmodev2-weaponAmmo1")
      local playerWeaponAmmo2 getAccountData (theCurrentAccount"funmodev2-weaponAmmo2")
      local playerWeaponAmmo3 getAccountData (theCurrentAccount"funmodev2-weaponAmmo3")
      local playerWeaponAmmo4 getAccountData (theCurrentAccount"funmodev2-weaponAmmo4")
      local playerWeaponAmmo5 getAccountData (theCurrentAccount"funmodev2-weaponAmmo5")
      local playerWeaponAmmo6 getAccountData (theCurrentAccount"funmodev2-weaponAmmo6")
      local playerWeaponAmmo7 getAccountData (theCurrentAccount"funmodev2-weaponAmmo7")
      local playerWeaponAmmo8 getAccountData (theCurrentAccount"funmodev2-weaponAmmo8")
      local playerWeaponAmmo9 getAccountData (theCurrentAccount"funmodev2-weaponAmmo9")
      local playerWeaponAmmo10 getAccountData (theCurrentAccount"funmodev2-weaponAmmo10")
      local playerWeaponAmmo11 getAccountData (theCurrentAccount"funmodev2-weaponAmmo11")
      local playerWeaponAmmo12 getAccountData (theCurrentAccount"funmodev2-weaponAmmo12")
      setPlayerMoney (sourceplayerMoney)
      setTimer (setElementHealth5001sourceplayerHealth)
      setTimer (setPedArmor5001sourceplayerArmor)
      setTimer (setPlayerWantedLevel5001sourceplayerWanted)
      giveWeapon(sourceplayerWeaponID0playerWeaponAmmo0true)
      giveWeapon(sourceplayerWeaponID1playerWeaponAmmo1false)
      giveWeapon(sourceplayerWeaponID2playerWeaponAmmo2false)
      giveWeapon(sourceplayerWeaponID3playerWeaponAmmo3false)
      giveWeapon(sourceplayerWeaponID4playerWeaponAmmo4false)
      giveWeapon(sourceplayerWeaponID5playerWeaponAmmo5false)
      giveWeapon(sourceplayerWeaponID6playerWeaponAmmo6false)
      giveWeapon(sourceplayerWeaponID7playerWeaponAmmo7false)
      giveWeapon(sourceplayerWeaponID8playerWeaponAmmo8false)
      giveWeapon(sourceplayerWeaponID9playerWeaponAmmo9false)
      giveWeapon(sourceplayerWeaponID10playerWeaponAmmo10false)
      giveWeapon(sourceplayerWeaponID11playerWeaponAmmo11false)
      giveWeapon(sourceplayerWeaponID12playerWeaponAmmo12false)
    else
      setPlayerMoney (source0)
      setPlayerNametagColor (source255255255) 
    end   
  end
end
addEventHandler ("ustawianieKasyitp"getRootElement(), playerLogin)
addEvent ("ustawKaseitp"true)


function onQuit (quitTypereasonresponsibleElement)
  if not (isGuestAccount (getPlayerAccount (source))) then
    account getPlayerAccount (source)
    if (accountthen
      setAccountData (account"funmodev2-money"tostring (getPlayerMoney (source)))
      setAccountData (account"funmodev2-skin"tostring (getPedSkin (source)))
      setAccountData (account"funmodev2-health"tostring (getElementHealth (source)))
      setAccountData (account"funmodev2-armor"tostring (getPedArmor (source)))
      setAccountData (account"funmodev2-wantedlevel"getPlayerWantedLevel (source))
      setAccountData (account"funmodev2-weaponID0"getPedWeapon (source0))
      setAccountData (account"funmodev2-weaponID1"getPedWeapon (source1))
      setAccountData (account"funmodev2-weaponID2"getPedWeapon (source2))
      setAccountData (account"funmodev2-weaponID3"getPedWeapon (source3))
      setAccountData (account"funmodev2-weaponID4"getPedWeapon (source4))
      setAccountData (account"funmodev2-weaponID5"getPedWeapon (source5))
      setAccountData (account"funmodev2-weaponID6"getPedWeapon (source6))
      setAccountData (account"funmodev2-weaponID7"getPedWeapon (source7))
      setAccountData (account"funmodev2-weaponID8"getPedWeapon (source8))
      setAccountData (account"funmodev2-weaponID9"getPedWeapon (source9))
      setAccountData (account"funmodev2-weaponID10"getPedWeapon (source10))
      setAccountData (account"funmodev2-weaponID11"getPedWeapon (source11))
      setAccountData (account"funmodev2-weaponID12"getPedWeapon (source12))
      setAccountData (account"funmodev2-weaponAmmo0"getPedTotalAmmo (source0))
      setAccountData (account"funmodev2-weaponAmmo1"getPedTotalAmmo (source1))
      setAccountData (account"funmodev2-weaponAmmo2"getPedTotalAmmo (source2))
      setAccountData (account"funmodev2-weaponAmmo3"getPedTotalAmmo (source3))
      setAccountData (account"funmodev2-weaponAmmo4"getPedTotalAmmo (source4))
      setAccountData (account"funmodev2-weaponAmmo5"getPedTotalAmmo (source5))
      setAccountData (account"funmodev2-weaponAmmo6"getPedTotalAmmo (source6))
      setAccountData (account"funmodev2-weaponAmmo7"getPedTotalAmmo (source7))
      setAccountData (account"funmodev2-weaponAmmo8"getPedTotalAmmo (source8))
      setAccountData (account"funmodev2-weaponAmmo9"getPedTotalAmmo (source9))
      setAccountData (account"funmodev2-weaponAmmo10"getPedTotalAmmo (source10))
      setAccountData (account"funmodev2-weaponAmmo11"getPedTotalAmmo (source11))
      setAccountData (account"funmodev2-weaponAmmo12"getPedTotalAmmo (source12))
    end
  end
end
addEventHandler ("onPlayerQuit"getRootElement(), onQuit)

function onWasted(totalAmmokillerkillerWeaponbodypartstealth)
  if notisGuestAccount (getPlayerAccount(source)) ) then
    local theWeapon getPedWeapon (source)
    local weaponAmmo getPedTotalAmmo (source)
    fadeCamera (sourcefalse)
    setTimer (spawnPlayer10001source, -2462.50,132.90,35.170getPedSkin (source), 00getPlayerTeam(source))
    setTimer (setCameraTarget12501sourcesource)
    setTimer (fadeCamera20001sourcetrue)
  end
end

addEventHandler ("onPlayerWasted"getRootElement(), onWasted)
addEventHandler"onPlayerWasted"getRootElement( ),
    function()
        setTimerspawnPlayer20001source, -2462.50,132.90,35.170getPedSkin (source), 00getPlayerTeam(source))
    end
)


Mo?e ten zapis jest zrypany? Bo ja ju? nie wiem :x . A i ten zapis nie respi po ?mierci :)

Podpis



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

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: ustawianie :: skina :: oraz :: chat :: głosowy
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