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

Wysłany: 2018-04-28, 16:44


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
db3:
ERROR: wd-1/c.lua: 184: attempt to call global 'spawnPlayer'(a nil value)
linijka 184
spawnPlayer ( localPlayer, -2413.15, -559.67, 132.56, 90.0, 0 ) 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-28, 17:28


Kalizman







Wiek: 24
Na forum: 3793 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

spawnPlayer dzia?a tylko po stronie server. Zr?b trigger.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-28, 17:30


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
Kalizman,

addEvent("onPlayerLoginSuccess", true)
addEventHandler("onPlayerLoginSuccess", root,
function()
destroy()
spawnPlayer ( localPlayer, -2413.15, -559.67, 132.56, 90.0, 0 )
setTimer(triggerServerEvent, 1500, 1, "onPlayerEnterGame", localPlayer, localPlayer)
end
)
Nie rozumiem cie nadal,pomozesz mi z tym?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-28, 19:22


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3351 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

Poka? ten trigger
Cytat:

"onPlayerEnterGame"


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-28, 19:44


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
TeeNekk, Ca?y kod z logowania:
local sW, sH = guiGetScreenSize()
local sx, sy = (sW/1366), (sH/768)

local selectedLanguage = false 
local dxfont0_roboto = dxCreateFont(":br_font/roboto.ttf", 35, false, "antialiased")

function isCursorOnElement(x,y,w,h)
    local mx,my = getCursorPosition ()
    local fullx,fully = guiGetScreenSize()
    cursorx,cursory = mx*fullx,my*fully
    if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
        return true
    else
        return false
    end
end


function moveCamera(x, y, z, x2, y2, z2, time)
    obj1=createObject(1337, x,y,z)
    setElementAlpha(obj1, 0)
    setObjectScale(obj1, 0.01)
    moveObject(obj1, time*1000, x2, y2, z2, 0,0,0, "InOutQuad")
    
    setElementPosition(getCamera(), 0, 0, 0)
    attachElements(getCamera(), obj1)
end 

function fadeMusic()
    if isElement(music) then 
        local vol = getSoundVolume(music)
        if vol <= 0.05 then
            stopSound(music)
        else
            setSoundVolume(music, vol-0.05)
            setTimer(fadeMusic, 100, 1)
        end 
    end 
end 

function handleKeys(key, press)
    if key == "mouse1" then 
        if press then 
            if selectedLanguage then 
                if isCursorOnElement(504*sx, 444*sy, 155*sx, 37*sy) then 
                    triggerEvent("onPlayerTryLogin", localPlayer, guiGetText(loginEdit), guiGetText(passEdit))
                elseif isCursorOnElement(701*sx, 444*sy, 155*sx, 37*sy) then 
                    triggerEvent("onPlayerTryRegister", localPlayer, guiGetText(loginEdit), guiGetText(passEdit))
                end
            end
        end
    end
end 

function renderLogin()
    local localization = exports["br_localization"]
    
    if not selectedLanguage then 
        dxDrawRectangle(381*sx, 268*sy, 604*sx, 235*sy, tocolor(0, 0, 0, 202), false)
        if isCursorOnElement(405*sx, 313*sy, 254*sx, 143*sy) then 
            dxDrawImage(405*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/english.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            if getKeyState("mouse1") then 
                selectedLanguage = "english"
                localization:setPlayerLocalization(localPlayer, "english")
                guiSetVisible(loginEdit, true)
                guiSetVisible(passEdit, true)
                guiSetInputEnabled(true)
                guiBringToFront(loginEdit)
            end
        else 
            dxDrawImage(405*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/english.png", 0, 0, 0, tocolor(255, 255, 255, 155), false)
        end 
        
        if isCursorOnElement(705*sx, 313*sy, 254*sx, 143*sy) then 
            dxDrawImage(705*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/polish.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            if getKeyState("mouse1") then 
                selectedLanguage = "polish"
                localization:setPlayerLocalization(localPlayer, "polish")
                guiSetVisible(loginEdit, true)
                guiSetVisible(passEdit, true)
                guiSetInputEnabled(true)
                guiBringToFront(loginEdit)
            end
        else 
            dxDrawImage(705*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/polish.png", 0, 0, 0, tocolor(255, 255, 255, 155), false)
        end
        dxDrawText(localization:getText(localPlayer, "login-title2"), 465*sx, 218*sy, 727*sx, 276*sy, tocolor(255, 255, 255, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        dxDrawLine(381*sx, 267*sy, 984*sx, 267*sy, tocolor(140, 0, 0), 4*sx, false)
    else 
        -- login
        dxDrawRectangle(465*sx, 266*sy, 437*sx, 237*sy, tocolor(0, 0, 0, 202), false)
        dxDrawText(localization:getText(localPlayer, "login-title"), (465 + 1)*sx, (218 + 1)*sy, (727 + 1)*sx, (276 + 1)*sy, tocolor(0, 0, 0, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-title"), 465*sx, 218*sy, 727*sx, 276*sy, tocolor(255, 255, 255, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        if isCursorOnElement(504*sx, 444*sy, 155*sx, 37*sy) then 
            dxDrawRectangle(504*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0), false)
        else 
            dxDrawRectangle(504*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0, 150), false)
        end 
        
        if isCursorOnElement(701*sx, 444*sy, 155*sx, 37*sy) then 
            dxDrawRectangle(701*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0), false)
        else 
            dxDrawRectangle(701*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0, 150), false)
        end 
        
        dxDrawText(localization:getText(localPlayer, "login-login_btn"), 541*sx, 449*sy, 620*sx, 481*sy, tocolor(255, 255, 255, 255), 0.45*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-register_btn"), 724*sx, 449*sy, 830*sx, 481*sy, tocolor(255, 255, 255, 255), 0.45*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-login_info"), 480*sx, 294*sy, 562*sx, 326*sy, tocolor(255, 255, 255, 255), 0.4*sx, dxfont0_roboto, "right", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-pass_info"), 480*sx, 354*sy, 562*sx, 386*sy, tocolor(255, 255, 255, 255), 0.4*sx, dxfont0_roboto, "right", "top", false, false, false, false, false)
        --dxDrawText(localization:getText(localPlayer, "login-remember"), 541*sx, 404*sy, 681*sx, 422*sy, tocolor(255, 255, 255, 255), 0.35*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawLine(465*sx, 266*sy, 901*sx, 266*sy, tocolor(140, 0, 0), 4*sx, false)
        
        local postepZDJ = math.sin((getTickCount()/360)*4)
                dxDrawImage(914*sx, 0*sy, 379*sx, 209*sy, "i/logo.png",postepZDJ ,tocolor(255, 255, 255, 255))
      
        -- changelog
    dxDrawRectangle(957*sx, 179*sy, 283*sx, 299*sy, tocolor(0, 0, 0, 160), false)
         dxDrawLine(958*sx, 178*sy, 1238*sx, 178*sy, tocolor(140, 0, 0, 255), 4*sx, false)
        dxDrawText("Changelog", 1030*sx, 180*sy, 1186*sx, 226*sy, tocolor(255, 255, 255, 255), .50*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-changelog"), 957*sx, 241*sy, 1240*sx, 478*sy, tocolor(255, 255, 255, 255), 0.30*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
    end
end 

function destroy()
    removeEventHandler("onClientRender", root, renderLogin)
    removeEventHandler("onClientKey", root, handleKeys)
    exports["br_blur"]:destroyBlurBox(blur)
    
    destroyElement(loginEdit)
    destroyElement(passEdit)
    destroyElement(dxfont0_roboto)
    
    detachElements(getCamera(), obj1)
    destroyElement(obj1)
    
    showCursor(false)
    guiSetInputMode("allow_binds")
    
    showChat(true)
    
    fadeMusic()
end 

addEvent("onPlayerTryLogin", true)
addEventHandler("onPlayerTryLogin", root, 
    function(login, password)
        if #login < 3 then 
            exports["br_notifications"]:addNotification("Tw?j login musi wynosi? conajmniej 3 znaki.", "error")
            return 
        end 
        
        if #password < 6 then 
            exports["br_notifications"]:addNotification("Twoje has?o musi mie? conajmniej 6 znak?w.", "error")
            return 
        end 
        
        fadeCamera(false, 1.5)
        triggerServerEvent("onPlayerEnterAccount", localPlayer, login, password)
    end 
)

addEvent("onPlayerTryRegister", true)
addEventHandler("onPlayerTryRegister", root, 
    function(login, password)
        if #login < 3 then 
            exports["br_notifications"]:addNotification("Tw?j login musi wynosi? conajmniej 3 znaki.", "error")
            return 
        end 
        
        if #password < 6 then 
            exports["br_notifications"]:addNotification("Twoje has?o musi mie? conajmniej 6 znak?w.", "error")
            return 
        end 
        
        fadeCamera(false, 1.5)
        triggerServerEvent("onPlayerCreateAccount", localPlayer, login, password)
    end 
)

addEvent("onPlayerLoginSuccess", true) 
addEventHandler("onPlayerLoginSuccess", root, 
function() 
destroy() 
spawnPlayer ( localPlayer, -2413.15, -559.67, 132.56, 90.0, 0 ) 
setTimer(triggerServerEvent, 1500, 1, "onPlayerEnterGame", localPlayer, localPlayer) 
end 
)    
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        --if getElementData(localPlayer, "player:uid") then return end -- gracz jest zalogowany 
        loginEdit = guiCreateEdit(572*sx, 289*sy, 284*sx, 37*sy, "", false)
        guiEditSetMaxLength(loginEdit, 40)
        guiSetVisible(loginEdit, false)
        
        passEdit =  guiCreateEdit(572*sx, 349*sy, 284*sx, 37*sy, "", false)
        guiEditSetMasked(passEdit, true)
        guiEditSetMaxLength(passEdit, 30)    
        guiSetVisible(passEdit, false)
        
        exports["br_blur"]:setBlurIntensity(1.3)
        blur = exports["br_blur"]:createBlurBox(0, 0, sW, sH, 255, 255, 255, 255, false)
            
        moveCamera(1936, 1628, 80, 1606.15, -1595.12, 103.31, 150)
        setFarClipDistance(1250)
        
        showChat(false)
            
        fadeCamera(false, 0)
        setTimer(fadeCamera, 1000, 1, true, 1.5)
            
        music = playSound("s/music.mp3")
        setSoundVolume(music, 0.7)
        
        addEventHandler("onClientRender", root, renderLogin)
        addEventHandler("onClientKey", root, handleKeys)
        
        showCursor(true)
        guiSetInputMode("no_binds")
        
        setPlayerHudComponentVisible("all", false)
    end
)

addEventHandler("onClientResourceStop", resourceRoot,
    function()
        destroy()
    end
)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-28, 22:38


Kalizman







Wiek: 24
Na forum: 3793 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Funkcja SPAWNPLAYER dzia?a tylko po stronie SERVERA, a nie po stronie CLIENTA, dlatego masz b??dy. Dlatego zr?b trigger na stron? SERVER i w nim umie?? funkcj? SPAWNPLAYER.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 12:45


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
Po zrobieniu wszystkiego mam taki b??d
ERROR: br_login/c.lua:184: attempt to call global 'callServerFunction' (a nil value)
C.lua
local sW, sH = guiGetScreenSize()
local sx, sy = (sW/1366), (sH/768)

local selectedLanguage = false 
local dxfont0_roboto = dxCreateFont(":br_font/roboto.ttf", 35, false, "antialiased")

function isCursorOnElement(x,y,w,h)
    local mx,my = getCursorPosition ()
    local fullx,fully = guiGetScreenSize()
    cursorx,cursory = mx*fullx,my*fully
    if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
        return true
    else
        return false
    end
end


function moveCamera(x, y, z, x2, y2, z2, time)
    obj1=createObject(1337, x,y,z)
    setElementAlpha(obj1, 0)
    setObjectScale(obj1, 0.01)
    moveObject(obj1, time*1000, x2, y2, z2, 0,0,0, "InOutQuad")
    
    setElementPosition(getCamera(), 0, 0, 0)
    attachElements(getCamera(), obj1)
end 

function fadeMusic()
    if isElement(music) then 
        local vol = getSoundVolume(music)
        if vol <= 0.05 then
            stopSound(music)
        else
            setSoundVolume(music, vol-0.05)
            setTimer(fadeMusic, 100, 1)
        end 
    end 
end 

function handleKeys(key, press)
    if key == "mouse1" then 
        if press then 
            if selectedLanguage then 
                if isCursorOnElement(504*sx, 444*sy, 155*sx, 37*sy) then 
                    triggerEvent("onPlayerTryLogin", localPlayer, guiGetText(loginEdit), guiGetText(passEdit))
                elseif isCursorOnElement(701*sx, 444*sy, 155*sx, 37*sy) then 
                    triggerEvent("onPlayerTryRegister", localPlayer, guiGetText(loginEdit), guiGetText(passEdit))
                end
            end
        end
    end
end 

function renderLogin()
    local localization = exports["br_localization"]
    
    if not selectedLanguage then 
        dxDrawRectangle(381*sx, 268*sy, 604*sx, 235*sy, tocolor(0, 0, 0, 202), false)
        if isCursorOnElement(405*sx, 313*sy, 254*sx, 143*sy) then 
            dxDrawImage(405*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/english.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            if getKeyState("mouse1") then 
                selectedLanguage = "english"
                localization:setPlayerLocalization(localPlayer, "english")
                guiSetVisible(loginEdit, true)
                guiSetVisible(passEdit, true)
                guiSetInputEnabled(true)
                guiBringToFront(loginEdit)
            end
        else 
            dxDrawImage(405*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/english.png", 0, 0, 0, tocolor(255, 255, 255, 155), false)
        end 
        
        if isCursorOnElement(705*sx, 313*sy, 254*sx, 143*sy) then 
            dxDrawImage(705*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/polish.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
            if getKeyState("mouse1") then 
                selectedLanguage = "polish"
                localization:setPlayerLocalization(localPlayer, "polish")
                guiSetVisible(loginEdit, true)
                guiSetVisible(passEdit, true)
                guiSetInputEnabled(true)
                guiBringToFront(loginEdit)
            end
        else 
            dxDrawImage(705*sx, 313*sy, 254*sx, 143*sy, ":br_login/i/polish.png", 0, 0, 0, tocolor(255, 255, 255, 155), false)
        end
        dxDrawText(localization:getText(localPlayer, "login-title2"), 465*sx, 218*sy, 727*sx, 276*sy, tocolor(255, 255, 255, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        dxDrawLine(381*sx, 267*sy, 984*sx, 267*sy, tocolor(140, 0, 0), 4*sx, false)
    else 
        -- login
        dxDrawRectangle(465*sx, 266*sy, 437*sx, 237*sy, tocolor(0, 0, 0, 202), false)
        dxDrawText(localization:getText(localPlayer, "login-title"), (465 + 1)*sx, (218 + 1)*sy, (727 + 1)*sx, (276 + 1)*sy, tocolor(0, 0, 0, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-title"), 465*sx, 218*sy, 727*sx, 276*sy, tocolor(255, 255, 255, 255), 0.7*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
        if isCursorOnElement(504*sx, 444*sy, 155*sx, 37*sy) then 
            dxDrawRectangle(504*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0), false)
        else 
            dxDrawRectangle(504*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0, 150), false)
        end 
        
        if isCursorOnElement(701*sx, 444*sy, 155*sx, 37*sy) then 
            dxDrawRectangle(701*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0), false)
        else 
            dxDrawRectangle(701*sx, 444*sy, 155*sx, 37*sy, tocolor(140, 0, 0, 150), false)
        end 
        
        dxDrawText(localization:getText(localPlayer, "login-login_btn"), 541*sx, 449*sy, 620*sx, 481*sy, tocolor(255, 255, 255, 255), 0.45*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-register_btn"), 724*sx, 449*sy, 830*sx, 481*sy, tocolor(255, 255, 255, 255), 0.45*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-login_info"), 480*sx, 294*sy, 562*sx, 326*sy, tocolor(255, 255, 255, 255), 0.4*sx, dxfont0_roboto, "right", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-pass_info"), 480*sx, 354*sy, 562*sx, 386*sy, tocolor(255, 255, 255, 255), 0.4*sx, dxfont0_roboto, "right", "top", false, false, false, false, false)
        --dxDrawText(localization:getText(localPlayer, "login-remember"), 541*sx, 404*sy, 681*sx, 422*sy, tocolor(255, 255, 255, 255), 0.35*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawLine(465*sx, 266*sy, 901*sx, 266*sy, tocolor(140, 0, 0), 4*sx, false)
        
        local postepZDJ = math.sin((getTickCount()/360)*4)
                dxDrawImage(914*sx, 0*sy, 379*sx, 209*sy, "i/logo.png",postepZDJ ,tocolor(255, 255, 255, 255))
      
        -- changelog
    dxDrawRectangle(957*sx, 179*sy, 283*sx, 299*sy, tocolor(0, 0, 0, 160), false)
         dxDrawLine(958*sx, 178*sy, 1238*sx, 178*sy, tocolor(140, 0, 0, 255), 4*sx, false)
        dxDrawText("Changelog", 1030*sx, 180*sy, 1186*sx, 226*sy, tocolor(255, 255, 255, 255), .50*sx, dxfont0_roboto, "center", "top", false, false, false, false, false)
        dxDrawText(localization:getText(localPlayer, "login-changelog"), 957*sx, 241*sy, 1240*sx, 478*sy, tocolor(255, 255, 255, 255), 0.30*sx, dxfont0_roboto, "left", "top", false, false, false, false, false)
    end
end 

function destroy()
    removeEventHandler("onClientRender", root, renderLogin)
    removeEventHandler("onClientKey", root, handleKeys)
    exports["br_blur"]:destroyBlurBox(blur)
    
    destroyElement(loginEdit)
    destroyElement(passEdit)
    destroyElement(dxfont0_roboto)
    
    detachElements(getCamera(), obj1)
    destroyElement(obj1)
    
    showCursor(false)
    guiSetInputMode("allow_binds")
    
    showChat(true)
    
    fadeMusic()
end 

addEvent("onPlayerTryLogin", true)
addEventHandler("onPlayerTryLogin", root, 
    function(login, password)
        if #login < 3 then 
            exports["br_notifications"]:addNotification("Tw?j login musi wynosi? conajmniej 3 znaki.", "error")
            return 
        end 
        
        if #password < 6 then 
            exports["br_notifications"]:addNotification("Twoje has?o musi mie? conajmniej 6 znak?w.", "error")
            return 
        end 
        
        fadeCamera(false, 1.5)
        triggerServerEvent("onPlayerEnterAccount", localPlayer, login, password)
    end 
)

addEvent("onPlayerTryRegister", true)
addEventHandler("onPlayerTryRegister", root, 
    function(login, password)
        if #login < 3 then 
            exports["br_notifications"]:addNotification("Tw?j login musi wynosi? conajmniej 3 znaki.", "error")
            return 
        end 
        
        if #password < 6 then 
            exports["br_notifications"]:addNotification("Twoje has?o musi mie? conajmniej 6 znak?w.", "error")
            return 
        end 
        
        fadeCamera(false, 1.5)
        triggerServerEvent("onPlayerCreateAccount", localPlayer, login, password)
    end 
)

addEvent("onPlayerLoginSuccess", true) 
addEventHandler("onPlayerLoginSuccess", root, 
function() 
destroy() 
callServerFunction("spawnik", localPlayer)
setTimer(triggerServerEvent, 1500, 1, "onPlayerEnterGame", localPlayer, localPlayer) 
end 
)    
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        --if getElementData(localPlayer, "player:uid") then return end -- gracz jest zalogowany 
        loginEdit = guiCreateEdit(572*sx, 289*sy, 284*sx, 37*sy, "", false)
        guiEditSetMaxLength(loginEdit, 40)
        guiSetVisible(loginEdit, false)
        
        passEdit =  guiCreateEdit(572*sx, 349*sy, 284*sx, 37*sy, "", false)
        guiEditSetMasked(passEdit, true)
        guiEditSetMaxLength(passEdit, 30)    
        guiSetVisible(passEdit, false)
        
        exports["br_blur"]:setBlurIntensity(1.3)
        blur = exports["br_blur"]:createBlurBox(0, 0, sW, sH, 255, 255, 255, 255, false)
            
        moveCamera(1936, 1628, 80, 1606.15, -1595.12, 103.31, 150)
        setFarClipDistance(1250)
        
        showChat(false)
            
        fadeCamera(false, 0)
        setTimer(fadeCamera, 1000, 1, true, 1.5)
            
        music = playSound("s/music.mp3")
        setSoundVolume(music, 0.7)
        
        addEventHandler("onClientRender", root, renderLogin)
        addEventHandler("onClientKey", root, handleKeys)
        
        showCursor(true)
        guiSetInputMode("no_binds")
        
        setPlayerHudComponentVisible("all", false)
    end
)

addEventHandler("onClientResourceStop", resourceRoot,
    function()
        destroy()
    end
)

linijka 184:
callServerFunction("spawnik", localPlayer)

s.lua:
function spawnik()
spawnPlayer (thePlayer,-2413.15,-559.67,132.56,90,0)
end
addEvent("spawnik", true)
addEventHandler("spawnik",getRootElement(),spawnik)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 13:32


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3213 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

B??d le?y po zerowej warto?ci, czyli nie mo?e okre?li? kim jest thePlayer

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 13:44


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
w S czy C side le?y ten b??d?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 13:44


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3213 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

Po stronie clienta

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 13:50


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
Dziwne bo mi si? wydaje ?e to w s side jest k?opot,m?g?by? powiedzie? co jest nie tak z t? linijk? 184?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 14:07


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3213 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"WolvesDrift" napisał/a:

Dziwne bo mi si? wydaje ?e to w s side jest k?opot,m?g?by? powiedzie? co jest nie tak z t? linijk? 184?


My?l?, ?e chodzi o okre?lenie gracza, kt?rego ma przenie?? ...

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 15:04


WolvesDrift







Wiek: 26
Na forum: 3101 dni
Posty: 14



Respekt: 50

Ostrzeżeń: 100%
M?g?by? mi to wykona?? ponad 4h pr?buje to naprawi? i nic ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-29, 20:57


Kalizman







Wiek: 24
Na forum: 3793 dni
Posty: 1394

Piwa: 4624

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Po stronie CLIENT-SIDE, gdy si? zalogujemy tworzysz trigger na SERVER-SIDE:

triggerServerEvent("spawnik", localPlayer)


Po stronie SERVER-SIDE:

function spawnik()
    local player = source
    
    spawnPlayer (player,-2413.15,-559.67,132.56,90,0)
end
addEvent("spawnik", true)
addEventHandler("spawnik",getRootElement(),spawnik)


Powinno dzia?a? jak w banku.

Postaw piwo autorowi tego posta
 

 
Tagi: panellogowania
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » PanelLogowania 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