sckatchof Posted March 1, 2012 Posted March 1, 2012 (edited) hello i have a problem when i spawn is left as it is in Tabel Like this pic : ---------------------------------------- Server side : local Table = { {1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288} } function Show(player) local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) fadeCamera(player, true, 5) setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) setTimer(fadeCamera, 1000, 1, player, true) end addEventHandler("onPlayerWasted", root, function() Show(source) end) Edited March 1, 2012 by Guest
Kenix Posted March 1, 2012 Posted March 1, 2012 Can you explain better? http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted March 1, 2012 Posted March 1, 2012 If I'm right, he's talking about the camera, he want's it to be watching the hospital, not the side of it. @sckatchof: Just move the camera positions. This position is the one I've used on one of my scripts: local Table = { {1214.7238769531, -1323.6098632813, 31.14349937439, 1213.8430175781, -1323.6158447266, 30.670255661011, 0, 70} } function Show(player) fadeCamera(player, true, 5) setTimer(setCameraMatrix, 1000, 1, player, unpack(Table[math.random(#Table)])) setTimer(fadeCamera, 1000, 1, player, true) end addEventHandler("onPlayerWasted", root, function() Show(source) end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted March 1, 2012 Posted March 1, 2012 Maybe he want animation camera? http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
sckatchof Posted March 1, 2012 Author Posted March 1, 2012 sorry for bad english guys but i don't understand english that's why i want when the dose not stay at this postion {1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288}
Castillo Posted March 1, 2012 Posted March 1, 2012 You want to set the camera back to the player? if so use setCameraTarget San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
sckatchof Posted March 1, 2012 Author Posted March 1, 2012 You want to set the camera back to the player? if so use setCameraTarget My problem is when i spawn at hospitale the camera stay can't play the camera stay at this Table pos !! that is my problem.
Kenix Posted March 1, 2012 Posted March 1, 2012 (edited) local uTimers = { } local tPos = { { 1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288 } } function fShow( uPlayer ) local x, y, z, lx, ly, lz = unpack( tPos [ math.random( #tPos ) ] ) fadeCamera( uPlayer, true, 5 ) toggleAllControls( uPlayer,false ) setCameraMatrix( uPlayer, x, y, z, lx, ly, lz ) uTimers[ uPlayer ] = setTimer( function( uPlayer ) setCameraTarget( uPlayer, uPlayer ) fadeCamera( uPlayer, true ) toggleAllControls( uPlayer, true ) end, 1000, -- Change this if you want. 1, uPlayer ) end addEventHandler( 'onPlayerQuit', root, function( ) uTimers[ source ] = nil end ) addEventHandler( 'onPlayerWasted', root, function( ) fShow( source ) end ) Updated. Edited March 1, 2012 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted March 1, 2012 Posted March 1, 2012 local Table = { {1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288} } function Show(player) local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) fadeCamera(player, false, 5) setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) setTimer(fadeCamera, 1000, 1, player, true) setTimer(setCameraTarget, 3000, 1, player) end addEventHandler("onPlayerWasted", root, function() Show(source) end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted March 1, 2012 Posted March 1, 2012 Better Solidsnake14 create all in one timer. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Kenix Posted March 1, 2012 Posted March 1, 2012 No problem http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted March 1, 2012 Posted March 1, 2012 Better Solidsnake14 create all in one timer. Yes, I know, but as he was doing it that way, I didn't want to change it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now