#Dv^ Posted June 14, 2016 Posted June 14, 2016 Hola! Tengo una duda, ¿cómo sacar el mapa cuando entras al servidor? Me refiero a este mapa No quiero eliminarlo del panel freeroam "F1", ni sacar el recurso "Freeroam.zip" Solo quiero que no aparezca cuando un player entre al servidor, por que cada vez que entras este mapa molesta y arruina el panel login. Gracias.
PDMTA Posted June 14, 2016 Posted June 14, 2016 Busca una linea que tenga onPlayerWasted o onClientPlayerWasted. Solo es una idea para que puedas comenzar por ahí. ------- Editado: Script "fr_server" Linea= 162 addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end )
#Dv^ Posted June 14, 2016 Author Posted June 14, 2016 Gracias! Ya pude solucionar ese problema, el otro es que se debe usar para que el panel f1 el player no lo pueda usar hasta que se loguee?
aka Blue Posted June 14, 2016 Posted June 14, 2016 Busca lo que bindea el 'F1' en el script y en la función, antes de hacer el show, es decir, triggear al cliente o como lo tenga ahí, pon la condicional para comprobar si está logueado.
PDMTA Posted June 14, 2016 Posted June 14, 2016 Agrega este evento onPlayerLogin junto con lo que dice Blue Pie.
#Dv^ Posted June 14, 2016 Author Posted June 14, 2016 Sería así, no? addEventHandler('onPlayerLogin', g_ResRoot, function() fadeCamera(true) setTimer(getPlayers, 1000, 1) bindKey('f1', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() guiCheckBoxSetSelected(getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me)) guiCheckBoxSetSelected(getControl(wndMain, 'falloff'), canPedBeKnockedOffBike(g_Me)) setJetpackMaxHeight ( 9001 ) triggerServerEvent('onLoadedAtClient', g_ResRoot) end )
aka Blue Posted June 14, 2016 Posted June 14, 2016 Busca la función que abre el panel y quitala del evento y ya está. Borra el createWindow ( wndMain ), creo que con eso lo solucionarías.
Tomas Posted June 14, 2016 Posted June 14, 2016 Sería así, no? addEventHandler('onPlayerLogin', g_ResRoot, function() fadeCamera(true) setTimer(getPlayers, 1000, 1) bindKey('f1', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() guiCheckBoxSetSelected(getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me)) guiCheckBoxSetSelected(getControl(wndMain, 'falloff'), canPedBeKnockedOffBike(g_Me)) setJetpackMaxHeight ( 9001 ) triggerServerEvent('onLoadedAtClient', g_ResRoot) end ) No, eso no funcionaría ya que la función del bindKey no tiene ni argumento de jugador, y la supuesta función que "llamaría" está en el client-side. Server: addEventHandler("onPlayerLogin", root, function () setElementData(source, "isLoggedIn", true) end ) Client: (1620~) function toggleFRWindow() if ( not getElementData(localPlayer, "isLoggedIn") ) then return false end if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else showCursor(true) showAllWindows() end end addCommandHandler('fr', toggleFRWindow)
#Dv^ Posted June 14, 2016 Author Posted June 14, 2016 Gracias Tomas! Ya me molestaba demasiado ese panel Gracias a todos por la ayuda, Podrían cerrar este tema
starksZ Posted June 15, 2016 Posted June 15, 2016 Me parece que en el panel de admin cuando le dabas a settings al recurso freeroam, podias desde alli desactivar eso..
Recommended Posts