Naikrox Posted January 23, 2014 Share Posted January 23, 2014 Estoy usando ne mi servidor este sistema de login que me gusta mucho es de xXMADEXx :https://community.multitheftauto.com/index.php?p=resources&s=details&id=7970, pero probe a añadir tambien el resource https://community.multitheftauto.com/index.php?p= ... ls&id=8374 y el problema es que cuando me logeo la pantalla se me queda asi y no me lleva a mi personaje recién conectado: y esto se repite indefinidamente. Link to comment
Guest Posted January 23, 2014 Share Posted January 23, 2014 sin el 2 script, te respawnea o sigues teniendo el mismo problema? Link to comment
Renkon Posted January 23, 2014 Share Posted January 23, 2014 Bienvenido al foro de mtasa. Para comenzar, lo ideal sería que usted comente el log producido por el debugscript 3 al cual puede acceder estando loggeado al servidor con el mismo comando. De esa forma, será más fácil para nosotros ayudarlo. A su vez, por favor proceda a mostrarnos el código del script. Saludos. Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 sin el 2 script, te respawnea o sigues teniendo el mismo problema? Si, el resource del login funciona perfectamente, pero el problema viene al poner el segundo resource (el del movimiento) Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 Lo que me pedias renkon: Aqui van los del login: server.lua ------------------------------------------ -- Dx Login Panel -- ------------------------------------------ -- Developer: Braydon Davis (xXMADEXx) -- -- File: server.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ local cameras = { { 329.10980224609, -2117.2749023438, 50.161201477051, 329.65179443359, -2116.4926757813, 49.853763580322 }, { 1266.0053710938, -1965.7087402344, 114.59829711914, 1265.1549072266, -1966.1115722656, 114.25980377197 }, { 1514.0283203125, -1716.5743408203, 39.910701751709, 1514.5087890625, -1715.865234375, 39.394691467285 }, { 1338.7514648438, -875.66558837891, 99.84880065918, 1339.4935302734, -875.07824707031, 99.52579498291 }, { 1426.5421142578, -725.40289306641, 120.97090148926, 1427.3695068359, -725.00805664063, 120.571434021 }, { 1357.5914306641, -592.23327636719, 125.15190124512, 1357.1751708984, -593.02673339844, 124.70780944824 }, { 988.01123046875, -341.88409423828, 74.752601623535, 988.70251464844, -342.45135498047, 75.200187683105 }, { -224.32290649414, -153.71020507813, 35.085899353027, -223.61195373535, -153.04695129395, 34.852146148682 } } function openView( plr ) local theplr = nil if ( source and getElementType ( source ) == 'player' ) then theplr = source elseif ( plr and getElementType ( plr ) == 'player' ) then theplr = plr end setTimer ( function ( p ) local ind = math.random ( #cameras ) setCameraMatrix ( p, unpack ( cameras[ind] ) ) end, 700, 1, theplr ) end addEventHandler ( "onPlayerJoin", root, openView ) addEventHandler ( "onPlayerLogout", root, openView ) --addCommandHandler ( 'view', openView ) function attemptLogin ( user, pass ) if ( user and pass and type ( user ) == 'string' and type ( pass ) == 'string' ) then --local user = string.lower ( user ) --local pass = string.lower ( pass ) local account = getAccount ( user ) if ( account ) then if ( not logIn ( source, account, pass ) ) then message ( source, "Incorrect password." ) return false end setCameraTarget ( source, source ) triggerLogin ( source, user, pass ) else message ( source, "Unknown account." ) return false end end return false end addEvent ( "Login:onClientAttemptLogin", true ) addEventHandler ( "Login:onClientAttemptLogin", root, attemptLogin ) function attemptRegister ( user, pass ) if ( user and pass and type ( user ) == 'string' and type ( pass ) == 'string' ) then --local user = string.lower ( user ) --local pass = string.lower ( pass ) local account = getAccount ( user ) if ( not account ) then local account = addAccount ( user, pass ) if ( account ) then if ( not logIn ( source, account, pass ) ) then return message ( source, "Logging in has failed." ) end setCameraTarget ( source, source ) triggerLogin ( source, user, pass ) else message ( source, "Adding account failed.\nPlease report to an admin." ) end else message ( source, "This account already exists." ) end end return false end addEvent ( "Login:onClientAttemptRegistration", true ) addEventHandler ( "Login:onClientAttemptRegistration", root, attemptRegister ) function message ( source, msg ) triggerClientEvent ( source, "onPlayerLoginPanelError", source, msg ) end function triggerLogin ( source, user, pass ) triggerClientEvent ( source, "onClientPlayerLogin", source, user, pass ) end addEventHandler ( 'onPlayerLogout', root, function ( ) triggerClientEvent ( source, 'onClientPlayerLogout', source ) end ) addEvent ( 'Login:doClientGuestLogin', true ) addEventHandler ( 'Login:doClientGuestLogin', root, function ( ) setCameraTarget ( source ) end ) meta.lua <meta> <info author="xXMADEXx" name="RoS DX Login Panel" type="script" version="1.1" /> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> <export function="isClientLoggedin" type="client" /> <file src='final_script_from_ros_;(' /> </meta> client.lua ------------------------------------------ -- Dx Login Panel -- ------------------------------------------ -- Developer: Braydon Davis (xXMADEXx) -- -- File: client.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ local enableGuest = true; local sx, sy = guiGetScreenSize ( ) local pX, pY = ( sx / 2 - 485 / 2 ), ( sy / 2 - 231 / 2 ) local username = guiCreateEdit(pX+156, pY+61, 288, 33, "", false) guiSetVisible ( username, false ) local password = guiCreateEdit(pX+156, pY+121, 288, 33, "", false) guiSetVisible ( password, false ) guiEditSetMasked(password, true) local window = guiCreateWindow( ( sx / 2 - 266 / 2 ), ( sy / 2 - 208 / 2 ), 266, 208, "Login Panel Message", false) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible ( window, false ) guiSetAlpha ( window, 1 ) local exitBtn = guiCreateButton(155, 162, 101, 36, "Exit", false, window) local infoLbl = guiCreateLabel(18, 26, 228, 130, "Message", false, window) local isOpen = false; local isLoggedin = false; local data = { login = { hovering = false, alphaMode = false, loginTextAlpha = 235, colors = { 255, 255, 255 } }, reg = { hovering = false, alphaMode = false, loginTextAlpha = 235, colors = { 255, 255, 255 } }, guest = { hovering = false, alphaMode = false, loginTextAlpha = 235, colors = { 255, 255, 255 } } } function dxDrawLoginPanel( ) -- default: 350, 266 if ( isOpen ) then dxDrawRectangle(pX, pY, 485, 231, tocolor(0, 0, 0, 180), false) dxDrawText("Login", pX, pY, 870, 314, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "center", "top", false, false, false, false, false) dxDrawLine(pX, pY+48, pX+485, pY+48, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Username:", pX+10, pY+69, 506, 368, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Password:", pX+10, pY+129, 506, 428, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(pX+281, pY+168, pX+281, pY+168+34, tocolor(255, 255, 255, 255), 1, false) local r, g, b = unpack ( data.login.colors ) dxDrawText("Login", pX+166, pY+167, 600, 468, tocolor( r, g, b, data.login.loginTextAlpha), 1.00, "bankgothic", "left", "top", false, false, false, false, false) local r, g, b = unpack ( data.reg.colors ) dxDrawText("Register", pX+305, pY+167, 794, 468, tocolor(r, g, b, data.reg.loginTextAlpha), 1.00, "bankgothic", "left", "top", false, false, false, false, false) if ( enableGuest ) then local r, g, b = unpack ( data.guest.colors ) dxDrawText("Guest", pX+40, pY+167, 600, 468, tocolor( r, g, b, data.guest.loginTextAlpha), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(pX+155, pY+168, pX+155, pY+168+34, tocolor(255, 255, 255, 255), 1, false) end -- give fade effect if ( data.login.hovering ) then data.login.colors = { 255, 140, 0 } local alpha = data.login.loginTextAlpha if ( not data.login.alphaMode ) then data.login.loginTextAlpha = alpha - 5 if ( data.login.loginTextAlpha <= 50 ) then data.login.alphaMode = true end else data.login.loginTextAlpha = alpha + 5 if ( data.login.loginTextAlpha >= 235 ) then data.login.alphaMode = false end end elseif ( data.reg.hovering ) then data.reg.colors = { 255, 140, 0 } local alpha = data.reg.loginTextAlpha if ( not data.reg.alphaMode ) then data.reg.loginTextAlpha = alpha - 5 if ( data.reg.loginTextAlpha <= 50 ) then data.reg.alphaMode = true end else data.reg.loginTextAlpha = alpha + 5 if ( data.reg.loginTextAlpha >= 235 ) then data.reg.alphaMode = false end end elseif ( data.guest.hovering ) then data.guest.colors = { 255, 140, 0 } local alpha = data.guest.loginTextAlpha if ( not data.guest.alphaMode ) then data.guest.loginTextAlpha = alpha - 5 if ( data.guest.loginTextAlpha <= 50 ) then data.guest.alphaMode = true end else data.guest.loginTextAlpha = alpha + 5 if ( data.guest.loginTextAlpha >= 235 ) then data.guest.alphaMode = false end end else data.login.loginTextAlpha = 235 data.guest.loginTextAlpha = 235 data.reg.loginTextAlpha = 235 data.login.colors = { 255, 255, 255 } data.guest.colors = { 255, 255, 255 } data.reg.colors = { 255, 255, 255 } end end end function cursorMove ( _, _, x, y ) if ( isCursorShowing ( ) and not guiGetVisible ( window ) and isOpen) then if ( y >= pY+170 and y <= pY+200 ) then if ( x >= pX+161 and x <= pX+251 ) then data.login.hovering = true return elseif ( x >= pX+305 and x <= pX+445 ) then data.reg.hovering = true return elseif ( x >= pX+40 and x <= pX+135 ) then data.guest.hovering = true return end end end data.login.hovering = false data.reg.hovering = false data.guest.hovering = false end function openLogin ( ) addEventHandler ( "onClientPreRender", root, dxDrawLoginPanel ) addEventHandler ( 'onClientCursorMove', root, cursorMove ) addEventHandler ( "onClientClick", root, clientClicking ) guiSetInputMode ( "no_binds_when_editing" ) guiSetVisible ( password, true ) guiSetVisible ( username, true ) showCursor ( true ) addEventHandler ( 'onClientGUIClick', root, clientClosingErrorWindowEvent ) isOpen = true showChat(false) showPlayerHudComponent ( 'all', false ) end addEvent ( "onClientPlayerLogout", true ) addEventHandler ( 'onClientPlayerLogout', root, openLogin ) function closeLogin ( ) removeEventHandler ( "onClientPreRender", root, dxDrawLoginPanel ) removeEventHandler ( 'onClientCursorMove', root, cursorMove ) removeEventHandler ( "onClientClick", root, clientClicking ) guiSetVisible ( password, false ) guiSetVisible ( username, false ) showCursor ( false ) removeEventHandler ( 'onClientGUIClick', root, clientClosingErrorWindowEvent ) guiSetVisible ( window, false ) isOpen = false isLoggedin = true showChat(true) showPlayerHudComponent ( 'all', true ) end addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, closeLogin ) function sendError ( msg ) if ( not guiGetVisible ( window ) ) then guiSetVisible ( window, true ) guiSetText ( infoLbl, msg ) guiBringToFront ( window ) end end addEvent ( "onPlayerLoginPanelError", true ) addEventHandler ( "onPlayerLoginPanelError", root, sendError ) function clientClicking ( btn, state, x, y ) if ( btn == 'left' and not guiGetVisible ( window ) and state == 'down' and isOpen ) then if ( y >= pY+170 and y <= pY+200 ) then local user, pass = guiGetText ( username ), guiGetText ( password ) -- Login Button -- if ( x >= pX+156 and x <= pX+246 ) then if ( string.gsub ( user, ' ', '' ) ~= '' and string.gsub ( pass, ' ', '' ) ~= '' ) then if ( string.find ( user, '%s' ) ) then return sendError ( "Spaces (' ') are not allowed\nin the username." ) end if ( string.find ( pass, '%s' ) ) then return sendError ( "Spaces (' ') are not allowed\nin the password." ) end triggerServerEvent ( "Login:onClientAttemptLogin", localPlayer, user, pass ) else sendError ( "A username and password are\nrequired to access the server." ) end -- register button elseif ( x >= pX+300 and x <= pX+440 ) then if ( string.gsub ( user, ' ', '' ) ~= '' and string.gsub ( pass, ' ', '' ) ~= '' ) then if ( string.find ( user, '%s' ) ) then return sendError ( "Spaces are not allowed\nin the username." ) end if ( string.find ( pass, '%s' ) ) then return sendError ( "Spaces are not allowed\nin the password." ) end if ( string.len ( user ) < 5 ) then return sendError ( "You're username must be at\nleast 5 characters long." ) end if ( string.len ( pass ) < 6 ) then return sendError ( "You're password must be at\nleast 6 characters long." ) end triggerServerEvent ( "Login:onClientAttemptRegistration", localPlayer, user, pass ) else sendError ( "A username and password are\nrequired to access the server." ) end -- play as guest elseif ( x >= pX+40 and x <= pX+135 ) then closeLogin ( ) triggerServerEvent ( "Login:doClientGuestLogin", localPlayer ) end end end end function clientClosingErrorWindowEvent( ) if ( source == exitBtn ) then guiSetVisible ( window, false ) end end function isClientLoggedin ( ) return isLoggedin end setTimer ( function ( ) openLogin ( ) end, 700, 1 ) Los del resource que provoca el moviento esta encriptados creo moveCamera_c CORRUPTED moveCamera_s CORRUPTED Link to comment
Renkon Posted January 24, 2014 Share Posted January 24, 2014 ¿Y el log del debugscript 3? Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 ¿Y el log del debugscript 3? he probado pero me salta esto: Incorrect client type for this command Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 Yo tenia ese problema con ese resource. El problema esta, en que te rota la camara y todo, pero no la vuelve a su lugar cuando se loguea. Se puede solucionar usando algún tipo de spawn que te setee de nuevo la cámara a su lugar, al momento de dar spawn. EDIT: (Lo encontre aca https://www.mediafire.com/folder/h4kcbey50ld5z/scripts descompilado) Client setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) end ) Server: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 Yo tenia ese problema con ese resource.El problema esta, en que te rota la camara y todo, pero no la vuelve a su lugar cuando se loguea. Se puede solucionar usando algún tipo de spawn que te setee de nuevo la cámara a su lugar, al momento de dar spawn. EDIT: (Lo encontre aca https://www.mediafire.com/folder/h4kcbey50ld5z/scripts descompilado) Client setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) end ) Server: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) El spawn ese al que te refieres es solo para la camara? esque utilizo tambien un save_system no creo que tenga nada k ver. Y donde lo puedo encontrar, si hay alguno en la comunidad? Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 Usa esto haber si te va: setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) setTimer( function () removeEventHandler("onClientPreRender",root,moveCamara) triggerServerEvent("detenelo",localPlayer) end,5000,1) end ) Server: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) addEvent("detenelo",true) addEventHandler("detenelo",root, function () setCameraTarget(source) end ) Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 Usa esto haber si te va: setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) setTimer( function () removeEventHandler("onClientPreRender",root,moveCamara) triggerServerEvent("detenelo",localPlayer) end,5000,1) end ) Server: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) addEvent("detenelo",true) addEventHandler("detenelo",root, function () setCameraTarget(source) end ) Lo probe pero sigue igual. Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 Estas seguro que tu sistema hace que des spawn?.. Prueba esto en client-side: setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) triggerServerEvent("detenelo",localPlayer) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) end ) Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 Estas seguro que tu sistema hace que des spawn?..Prueba esto en client-side: setTimer ( function ( ) triggerServerEvent ( "login:onClientRequestMove", localPlayer ) end, 200, 1 ) addEvent ( "login:onPlayerClientLogin", true ) addEventHandler ( "login:onPlayerClientLogin", root, function ( ) fadeCamera ( false ) setTimer ( function ( ) removeEventHandler ( "onClientPreRender", root, moveCamera ) triggerServerEvent("detenelo",localPlayer) fadeCamera ( true ) end, 1500, 1 ) end ) addEvent ( "login:onClientGetMovementPermission", true ) addEventHandler ( "login:onClientGetMovementPermission", root, function ( ) local x, y, z = getCameraMatrix ( ) setCameraMatrix ( x, y, z + 50 ) local move = true function moveCamera( ) local x, y, z, x2, y2, z2 = getCameraMatrix ( ) if ( move ) then setCameraMatrix ( x+0.5, y, z, x2+0.25, y2, z2 ) if ( x > 2000 ) then move = false end else setCameraMatrix ( x-0.5, y, z, x2-0.25, y2, z2 ) if ( x < -1000 ) then move = true end end end addEventHandler ( 'onClientPreRender', root, moveCamera ) end ) Ya funciona perfecto pero lo unico es que cuando logeo este donde este mi personaje ya sea en lo alto de un edificio o en la calle , aparezco cayendo al vacio, probe a desactivar este resource y el personaje spawnea en el sitio sin caer al vacio Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 Puede que sea producido por la cámara fuera de lugar. Proba esto en server-side: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) addEvent("detenelo",true) addEventHandler("detenelo",root, function () fadeCamera(source,true) setCameraTarget(source) end ) Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 Puede que sea producido por la cámara fuera de lugar.Proba esto en server-side: addEventHandler ( "onPlayerLogin", root, function ( ) triggerClientEvent ( source, "login:onPlayerClientLogin", source ) end ) addEvent ( "login:onClientRequestMove", true ) addEventHandler ( "login:onClientRequestMove", root, function ( ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then triggerClientEvent ( source, "login:onClientGetMovementPermission", source ) end end ) addEvent("detenelo",true) addEventHandler("detenelo",root, function () fadeCamera(source,true) setCameraTarget(source) end ) Sigue igual Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 La verdad, no tengo idea porque es..Lo que podes hacer es no triggear el spawn del jugador hasta que no dejo de moverse la camara. Link to comment
Naikrox Posted January 24, 2014 Author Share Posted January 24, 2014 La verdad, no tengo idea porque es..Lo que podes hacer es no triggear el spawn del jugador hasta que no dejo de moverse la camara. Vale, muchas gracias.Pueden cerrar el post. Link to comment
MTA Team 0xCiBeR Posted January 24, 2014 MTA Team Share Posted January 24, 2014 De nada. Topic cerrado a petición del Usuario. Link to comment
Recommended Posts