PhantomDamn Posted January 10, 2014 Posted January 10, 2014 Hola.. me pueden ayudar en esto: es que quiero que a esta ventana le salga una imagen estatica pero esta no se elimina luego de dar spawn spawnGUI [ "spawn_window" ] = guiCreateWindow(0.62, 0.10, 0.38, 0.70, "SPAWN", true) esta es la funcion que le estoy agregando al spawn function showClientImage() guiCreateStaticImage( 0.62, 0.10, 0.38, 0.70, "images/fondo.png", true ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) Gracias de antemano
JesusAliso Posted January 10, 2014 Posted January 10, 2014 Solo crea la imagen sin ninguna función y le puedes agregar "guiSetEnabled". fondo = guiCreateStaticImage( 0.62, 0.10, 0.38, 0.70, "images/fondo.png", true ) guiSetEnabled ( fondo , false)
Bc# Posted January 10, 2014 Posted January 10, 2014 fondo = guiCreateStaticImage( 0.62, 0.10, 0.38, 0.70, "images/fondo.png", true ) function onSpawn () guiSetVisible (fondo,false) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn )
Sasu Posted January 10, 2014 Posted January 10, 2014 fondo = guiCreateStaticImage( 0.62, 0.10, 0.38, 0.70, "images/fondo.png", true ) function onSpawn () guiSetVisible (fondo,false) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn ) Linea 6 esta mal, pones un evento server - side. Tal vez quisiste poner: addEventHandler ( "onClientPlayerSpawn", localPlayer, onSpawn )
PhantomDamn Posted January 11, 2014 Author Posted January 11, 2014 ya habia solucionado eso pero de todas maneras gracias examine mejor el archivo y encontre que no era solamente eso
Bc# Posted January 11, 2014 Posted January 11, 2014 fondo = guiCreateStaticImage( 0.62, 0.10, 0.38, 0.70, "images/fondo.png", true ) function onSpawn () guiSetVisible (fondo,false) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn ) Linea 6 esta mal, pones un evento server - side. Tal vez quisiste poner: addEventHandler ( "onClientPlayerSpawn", localPlayer, onSpawn ) Me olvide de eso, gracias por corregir.
Bc# Posted January 11, 2014 Posted January 11, 2014 ya habia solucionado eso pero de todas maneras gracias examine mejor el archivo y encontre que no era solamente eso Trata de ver bien tu código antes de postear acá, así te podemos orientar mejor.
PDMTA Posted May 15, 2016 Posted May 15, 2016 Eso muestra el siguiente error: ERROR: Loading script failed: 2/spawn_client.lua:650 'end' expected( to closet 'function' at line 629 near 'endfondo'
Bc# Posted May 24, 2016 Posted May 24, 2016 Eso muestra el siguiente error:ERROR: Loading script failed: 2/spawn_client.lua:650 'end' expected( to closet 'function' at line 629 near 'endfondo' ¿No sabes ingles? Ahi dice claro que se esperaba paracentesis para cerrar la función de la linea indicada.
aka Blue Posted May 24, 2016 Posted May 24, 2016 Eso muestra el siguiente error:ERROR: Loading script failed: 2/spawn_client.lua:650 'end' expected( to closet 'function' at line 629 near 'endfondo' ¿No sabes ingles? Ahi dice claro que se esperaba paracentesis para cerrar la función de la linea indicada. Paréntesis.
Recommended Posts