iFoReX Posted September 4, 2012 Share Posted September 4, 2012 que argumento debo usar en : lugares = { { -2473.7883300781, 1553.5477294922, 33.234375 }, { -2473.7021484375, 1552.2395019531, 33.227333068848 }, { -2473.7443847656, 1550.9230957031, 33.227333068848 }, { -2473.7253417969, 1549.1356201172, 33.227333068848 }, { -2473.6928710938, 1547.2581787109, 33.227333068848 }, { -2473.4963378906, 1545.0604248047, 33.227333068848 }, } function setCameraOnPlayerJoin() fadeCamera( source, true ) setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) ------------Aqui fadeCamera( thePlayer, true ) addEventHandler("onPlayerWasted",root,function() skin = getElementModel(source) end ) spawnPlayer(thePlayer,x,y,z,0,skin) end function stopCameraOnPlayerLogin() fadeCamera( source, false ) setTimer(fadeOn,2000,1) end addEventHandler("onPlayerLogin", getRootElement(), stopCameraOnPlayerLogin) Link to comment
Soren Posted September 4, 2012 Share Posted September 4, 2012 Es algo muy molesto de ti quieres que te ayudemos pero no dices nada, quieres que te leeamos la mente. Si explicaras tu problema podriamos ayudarte Link to comment
iFoReX Posted September 4, 2012 Author Share Posted September 4, 2012 Ook, el problema es que necesito un argumento para obtener el player en estas lineas : function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) fadeCamera( thePlayer, true ) addEventHandler("onPlayerWasted",root,function() skin = getElementModel(source) end ) spawnPlayer(thePlayer,x,y,z,0,skin) end source no sirve porque esta con un timer, y con thePlayer tampoco porque me aparece bad argument Link to comment
Soren Posted September 4, 2012 Share Posted September 4, 2012 Ook, el problema es que necesito un argumento para obtener el player en estas lineas : function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) fadeCamera( thePlayer, true ) addEventHandler("onPlayerWasted",root,function() skin = getElementModel(source) end ) spawnPlayer(thePlayer,x,y,z,0,skin) end source no sirve porque esta con un timer, y con thePlayer tampoco porque me aparece bad argument intentaste con player ??? Link to comment
BorderLine Posted September 4, 2012 Share Posted September 4, 2012 function fadeOn(thePlayer) local x,y,z = unpack ( lugares [ math.random ( #lugares ) ] ) fadeCamera( thePlayer, true ) skin = getElementModel(thePlayer) setTimer(spawnPlayer,1000,1,thePlayer,x,y,z,0,skin) end addEventHandler("onPlayerWasted",root,fadeon ) aunque no entiendo bien a que quieres llegar Link to comment
iFoReX Posted September 4, 2012 Author Share Posted September 4, 2012 es que tengo un timer que al logearse, se spawnea en 2 segundos, pero esto lo hara solo cuando muera ? Link to comment
BorderLine Posted September 4, 2012 Share Posted September 4, 2012 el code que te di yo, Si. pero puedes detallar mas de que necesitas? y que errores tienes? aun no te comprendo mucho. Link to comment
iFoReX Posted September 4, 2012 Author Share Posted September 4, 2012 solo el error de argumento. Link to comment
BorderLine Posted September 4, 2012 Share Posted September 4, 2012 intentaste el codigo ke puse? Link to comment
Recommended Posts