Wisam Posted April 22, 2014 Posted April 22, 2014 Hi.. I got here a killcam script my friend made and it works perfectly, i wanted to add a small thing in it i wish you help me with cause as i said before i suck at lua Anyway what i want to do is that the killcam will appear after 5 seconds of the player death, not instantly Script(Client): 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 ,10000, 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 ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
aintaro Posted April 22, 2014 Posted April 22, 2014 replace your setCameraTarget ( k ) addEventHandler ( "onClientRender", root, killcam ) by this setTimer ( function ( ) setCameraTarget ( k ) addEventHandler ( "onClientRender", root, killcam ) end ,5000, 1 ) None of us is as smart as all of us.
Wisam Posted April 22, 2014 Author Posted April 22, 2014 Fuckin Thank you man, God bless you ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
aintaro Posted April 22, 2014 Posted April 22, 2014 Thank you man, God bless you You're welcome None of us is as smart as all of us.
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