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

Wysłany: 2019-07-05, 01:01


EvilXmik







Wiek: 28
Na forum: 3761 dni
Posty: 148
Nick w MP: EvilXmik

Piwa: 399

Respekt: 50

Witam mam taki problem z jednym skryptem, kt?rym jest panel logowania.
Problem jest nast?puj?cy, po zalogowaniu si? i wybraniu spawnu, otrzymuj? skina CJ, chcia? bym si? tego pozby?, czy kto? m?g? by mnie nakierowa? gdzie to jest?

Client

local Panel = {}
local show = true
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil

local function camRender ()
    local x1, y1, z1 = getElementPosition ( sm.object1 )
    local x2, y2, z2 = getElementPosition ( sm.object2 )
    setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
end
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function smoothMoveCameraa ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end


Panel.Label_Login = guiCreateLabel(0.42, 0.554, 0.15, 0.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.42, 0.611, 0.15, 0.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.42, 0.45, 0.15, 0.04, "", true)
Panel.Edit_Login:setVisible ( false );
Panel.Edit_Haslo = guiCreateEdit(0.42, 0.51, 0.15, 0.04, "", true)    
guiEditSetMasked(Panel.Edit_Haslo, true)    
Panel.Edit_Haslo:setVisible ( false );
Panel.Informacje = guiCreateLabel(0.26, 0.38, 0.47, 0.05, "", true)
guiSetFont(Panel.Informacje, "default-bold-small")
guiLabelSetColor(Panel.Informacje, 71, 173, 195)
guiLabelSetHorizontalAlign(Panel.Informacje, "center", false)
guiLabelSetVerticalAlign(Panel.Informacje, "center")    
Panel.Informacje:setVisible ( false );

local screenW, screenH = guiGetScreenSize()
function Panel.Grafika()
    dxDrawRectangle(screenW * 0.263, screenH * 0.378, screenW * 0.474, screenH * 0.284, tocolor(0, 0, 0, 188), false)
    dxDrawRectangle(screenW * 0.263, screenH * 0.313, screenW * 0.474, screenH * 0.065, tocolor(68, 68, 68, 182), false)
    dxDrawText("Panel Logowania", screenW * 0.263, screenH * 0.313, screenW * 0.442, screenH * 0.378, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("Pseudol XD ", screenW * 0.558, screenH * 0.313, screenW * 0.738, screenH * 0.378, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("Autor: R3M!KS", screenW * 0.271, screenH * 0.635, screenW * 0.318, screenH * 0.661, tocolor(255, 255, 255, 255), 0.80, "default-bold", "left", "center", false, false, false, false, false)
    dxDrawText("Login >>", screenW * 0.329, screenH * 0.453, screenW * 0.424, screenH * 0.488, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("Has?o >>", screenW * 0.329, screenH * 0.507, screenW * 0.424, screenH * 0.542, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("<< Login", screenW * 0.576, screenH * 0.456, screenW * 0.671, screenH * 0.491, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("<< Has?o", screenW * 0.576, screenH * 0.505, screenW * 0.671, screenH * 0.540, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
    dxDrawText("Wersja: 1.0", screenW * 0.690, screenH * 0.635, screenW * 0.738, screenH * 0.661, tocolor(255, 255, 255, 255), 0.80, "default-bold", "left", "center", false, false, false, false, false)
end

function Panel.Button_Login_Off()
    if show == true then
        dxDrawRectangle(screenW * 0.420, screenH * 0.555, screenW * 0.150, screenH * 0.043, tocolor(68, 68, 68, 209), false)
    end
end

function Panel.Button_Haslo_Off()
    dxDrawRectangle(screenW * 0.420, screenH * 0.611, screenW * 0.150, screenH * 0.043, tocolor(68, 68, 68, 209), false)
end

function Panel.Button_Login_On()
    dxDrawRectangle(screenW * 0.420, screenH * 0.555, screenW * 0.150, screenH * 0.043, tocolor(71, 173, 195, 212), false)
end

function Panel.Button_Haslo_On()
    dxDrawRectangle(screenW * 0.420, screenH * 0.611, screenW * 0.150, screenH * 0.043, tocolor(71, 173, 195, 212), false)
end

addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), 
function ()
    smoothMoveCameraa (1895.091796875, -1807.1420898438, 70.458423614502,
    1573.9093017578, -1722.6770019531, 52.467288970947,
    1422.9503173828, -1728.3800048828, 22.484668731689,
    1478.8485107422, -1662.4718017578, 25.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", root, Panel.Grafika);
    addEventHandler ("onClientRender", root, Panel.Button_Haslo_Off);
    addEventHandler ("onClientRender", root, Panel.Button_Login_Off);
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_On);
    removeEventHandler ("onClientRender", root, Panel.Button_Login_On);
end)

addEventHandler ("onClientMouseEnter", Panel.Label_Login,
function ()
    removeEventHandler ("onClientRender", root, Panel.Button_Login_Off)
    addEventHandler ("onClientRender", root, Panel.Button_Login_On)
end, false)


addEventHandler ("onClientMouseLeave", Panel.Label_Login,
function ()
    addEventHandler ("onClientRender", root, Panel.Button_Login_Off)
    removeEventHandler ("onClientRender", root, Panel.Button_Login_On)
end, false)

addEventHandler ("onClientMouseEnter", Panel.Label_Rejka,
function ()
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_Off)
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_On)
    addEventHandler ("onClientRender", root, Panel.Button_Haslo_On)
end, false)


addEventHandler ("onClientMouseLeave", Panel.Label_Rejka,
function ()
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_Off)
    addEventHandler ("onClientRender", root, Panel.Button_Haslo_Off)
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_On)
end, false)

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_Login, onClickBtnLogin, false)

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_Rejka, onClickBtnRegister, false)

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.00, 0.08, 0.30, 0.07, "", true)
    Spawn.San_Fierro = guiCreateLabel(0.00, 0.16, 0.30, 0.07, "", true)
    Spawn.Las_Venturas = guiCreateLabel(0.00, 0.25, 0.30, 0.07, "", true)
    Spawn.Fort_Carson = guiCreateLabel(0.00, 0.33, 0.30, 0.07, "", true)
    Spawn.OZP = guiCreateLabel(0.00, 0.41, 0.30, 0.07, "", true)    
    Spawn.Los_Santos:setVisible ( false );
    Spawn.San_Fierro:setVisible ( false );
    Spawn.Las_Venturas:setVisible ( false );
    Spawn.Fort_Carson:setVisible ( false );

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

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

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

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

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

-- Add

function Spawn.Los_Santos_Dx_On()
    dxDrawRectangle(screenW * 0.000, screenH * 0.082, screenW * 0.299, screenH * 0.069, tocolor(71, 173, 195, 212), false)
end

function Spawn.San_Fierro_Dx_On()
    dxDrawRectangle(screenW * 0.000, screenH * 0.164, screenW * 0.299, screenH * 0.069, tocolor(71, 173, 195, 212), false)
end

function Spawn.Las_Venturas_Dx_On()
    dxDrawRectangle(screenW * 0.000, screenH * 0.246, screenW * 0.299, screenH * 0.069, tocolor(71, 173, 195, 212), false)
end

function Spawn.Fort_Carson_Dx_On()
    dxDrawRectangle(screenW * 0.000, screenH * 0.328, screenW * 0.299, screenH * 0.069, tocolor(71, 173, 195, 212), 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", root, Panel.Grafika);
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_Off);
    removeEventHandler ("onClientRender", root, Panel.Button_Login_Off);
    removeEventHandler ("onClientRender", root, Panel.Button_Haslo_On);
    removeEventHandler ("onClientRender", root, Panel.Button_Login_On);
    addEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx)
    addEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx)
    addEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx)
    addEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx)
    addEventHandler ("onClientRender", root, Spawn.OZP_Dx)
    removeEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.OZP_Dx_On)
    addEventHandler ("onClientRender", root, Spawn.Panel)
    Spawn.Los_Santos:setVisible ( true );
    Spawn.San_Fierro:setVisible ( true );
    Spawn.Las_Venturas:setVisible ( true );
    Spawn.Fort_Carson:setVisible ( true );
end)

addEventHandler ("onClientMouseEnter", Spawn.Los_Santos,
function ()
    removeEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx)
    addEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx_On)
    smoothMoveCameraa (1895.091796875, -1807.1420898438, 70.458423614502,
    1573.9093017578, -1722.6770019531, 52.467288970947,
    1422.9503173828, -1728.3800048828, 22.484668731689,
    1478.8485107422, -1662.4718017578, 25.742967605591,
    12000 );
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)


addEventHandler ("onClientMouseLeave", Spawn.Los_Santos,
function ()
    addEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx)
    removeEventHandler ("onClientRender", root, Spawn.Los_Santos_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)

-- Sf

addEventHandler ("onClientMouseEnter", Spawn.San_Fierro,
function ()
    removeEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx)
    addEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx_On)
    smoothMoveCameraa (-2680.89478, 1677.40405, 89.47169,
    -2681.04639, 1438.63428, 76.17654,
    -2680.82520, 1294.82141, 65.73161,
    -2680.11377, 1197.18738, 75.04411,
    12000 );
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)


addEventHandler ("onClientMouseLeave", Spawn.San_Fierro,
function ()
    addEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx)
    removeEventHandler ("onClientRender", root, Spawn.San_Fierro_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)

-- LV

addEventHandler ("onClientMouseEnter", Spawn.Las_Venturas,
function ()
    removeEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx)
    addEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx_On)
    smoothMoveCameraa (2323.81885, 1283.08362, 97.47743,
    2292.17163, 1283.96350, 61.43044,
    2129.38086, 1286.09814, 49.42192,
    2176.60327, 1285.87280, 41.17391,
    12000)
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)


addEventHandler ("onClientMouseLeave", Spawn.Las_Venturas,
function ()
    addEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx)
    removeEventHandler ("onClientRender", root, Spawn.Las_Venturas_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)

-- FC

addEventHandler ("onClientMouseEnter", Spawn.Fort_Carson,
function ()
    removeEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx)
    addEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx_On)
    smoothMoveCameraa (206.52852, 1035.67444, 38.83426,
    189.90648, 1078.48901, 43.67355,
    173.14142, 1161.04895, 26.81353,
    169.98270, 1200.96692, 30.19880,
    12000 );
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)


addEventHandler ("onClientMouseLeave", Spawn.Fort_Carson,
function ()
    addEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx)
    removeEventHandler ("onClientRender", root, Spawn.Fort_Carson_Dx_On)
    removeEventHandler ("onClientRender", root, Spawn.Panel)
    addEventHandler ("onClientRender", root, Spawn.Panel)
end, false)

-- Klikanie

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

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

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

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


Serwer

function PlayerLogin(username,password,checksave)
    if not (username == "") then
        if not (password == "") then
            local account = getAccount ( username,password )
                if ( account ~= false ) then
                    logIn(source, account, password)
                        setCameraTarget(source, source)
                    --outputChatBox ("Gratulacje! Zalogowa?e? si? poprawnie!")
                triggerClientEvent (source,"Zacznij",getRootElement())
                toggleControl (source, "fire", true)
                toggleControl (source, "aim_weapon", true)
            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 == false) then
                        local accountAdded = addAccount(tostring(username),tostring(password))
                        if (accountAdded) then
                            triggerClientEvent (source, "Zaloguj", root, source)
                        else
                            triggerClientEvent( source, "Konto_jest", root, source)                        
                        end
                    else
                        triggerClientEvent ( source, "Nick_Konto", root, source)
                    end
        else
            triggerClientEvent ( source, "Brak_Haslo", root, source)
        end
    else
        triggerClientEvent (source, "nick", root, source)
        end
        end
                                               
        
addEvent("onRequestRegister",true)
addEventHandler("onRequestRegister",getRootElement(),registerPlayer)


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

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

addEvent ("For_Spawn", true)
addEventHandler ("For_Spawn", root,
function ( plr )
plr:spawn ( 13.96034, 1189.98108, 19.31405)
end)

addEvent ("LV_Spawn", true)
addEventHandler ("LV_Spawn", root,
function ( plr )
plr:spawn ( 2080.88647, 1285.69531, 10.82031 )
end
)

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

addEvent ("SF_Spawn", true)
addEventHandler ("SF_Spawn", root,
function ( plr )
plr:spawn ( -1931.59668, 487.33221, 34.30988 )
end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-07-06, 00:55


FUTURISM

Five MTA - RP/RPG






Wiek: 25
Na forum: 2737 dni
Posty: 12

Piwa: 434

Respekt: 40

Ostrzeżeń: 100%
Mo?esz po prostu podmieni? skina CJ, czyli id skina - 0 na jaki? model inny, i ustawi? pod 0 id, czyli C-J, bo tak jest ju? w Gta Sa zrobione.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-07-06, 07:24


Wilq







Wiek: 24
Na forum: 4569 dni
Posty: 3409

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

To zmieniasz graczowi model po zalogowaniu za pomoc?

Więcej informacji znajdziesz w Wikipedii MTA:

setElementModel


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-07-06, 13:08


TheBAMBO

restMTA






Wiek: 22
Na forum: 2953 dni
Posty: 73
Nick w MP: zexty

Piwa: 12314

Respekt: 75,8

W core (dokladniej s_saveplayers) masz linijk? odpowiadaj?c? za skina, wystarczy zmienic 0 na id skina

Postaw piwo autorowi tego posta
 

 
Tagi: daje :: skina
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