K4stic Posted May 26, 2013 Posted May 26, 2013 how connect time with this? dxDrawText ( "Viewing Kill Cam of " .. getPlayerName(k) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false) Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 What do you mean by connect time with that? it doesn't make any sense to me. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 like setTimer(dxDrawText ( "Viewing Kill Cam of " .. getPlayerName(k) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false),6000,1) Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 You want to hide it after certain time? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 i wonna to show it for that time Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 Post the whole script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 addEventHandler("onClientPlayerWasted", localPlayer, function(k) local rx, ry = guiGetScreenSize () if source ~= localPlayer then return end if isElement(k) and getElementType(k) == "player" then setCameraTarget(k) setTimer(dxDrawText ( "Viewing Kill Cam of " .. getPlayerName(k) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false),6000,1) end end ) Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 dxDrawText requires of onClientRender in order to be drawn, you must create a function to draw it, then the timer can add the event handler after 6 seconds. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 like this? addEventHandler("onClientPlayerWasted", localPlayer, function(k) local rx, ry = guiGetScreenSize () if source ~= localPlayer then return end if isElement(k) and getElementType(k) == "player" then setCameraTarget(k) andEventHandler("onClientRender", root, killcam) setTimer(removeEventHandler("onClientRender",6000,1,root,killcam) end end ) function killcam() dxDrawText ( "Viewing Kill Cam of " .. getPlayerName(k) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false) end Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 local player local rx, ry = guiGetScreenSize ( ) addEventHandler ( "onClientPlayerWasted", localPlayer, function ( k ) if ( source ~= localPlayer ) then return end if ( isElement ( k ) and getElementType ( k ) == "player" ) then player = k setCameraTarget ( k ) addEventHandler ( "onClientRender", root, killcam ) setTimer ( removeEventHandler, 6000, 1, "onClientRender", root, killcam ) end end ) function killcam ( ) if isElement ( player ) then dxDrawText ( "Viewing Kill Cam of " .. getPlayerName ( player ) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false ) end end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 dxDrawText not removing :3 Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 local player local rx, ry = guiGetScreenSize ( ) addEventHandler ( "onClientPlayerWasted", localPlayer, function ( k ) if ( source ~= localPlayer ) then return end if ( isElement ( k ) and getElementType ( k ) == "player" ) then player = k setCameraTarget ( k ) addEventHandler ( "onClientRender", root, killcam ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, killcam ) end ,6000, 1 ) end end ) function killcam ( ) if isElement ( player ) then dxDrawText ( "Viewing Kill Cam of " .. getPlayerName ( player ) .. "!", 0, 0, rx, ry, tocolor ( 255, 0, 0, 255 ), 5, "default", "center", "center", false, false, false ) end end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
K4stic Posted May 26, 2013 Author Posted May 26, 2013 Thx now works Giving a Fuck? Nope, That isn't in My Skill Set
Castillo Posted May 26, 2013 Posted May 26, 2013 You're welcome. 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