Jump to content

Help in Gui Script


Evil-Cod3r

Recommended Posts

i have made this but if i killed some one the images dosnt show in the top and center on screen and they show to both of us

i need it show to the killer and show it center of the screen :)

local x,y = guiGetScreenSize() 
function headshot ( killer, weapon, bodypart ) 
if ( killer ) and ( killer ~= source ) then 
local image = guiCreateStaticImage ( x/5, y/5.8, 399,169, "SAMP"..math.random(1,4)..".png", false ) 
guiSetVisible ( image, false ) 
guiSetVisible ( image, true ) 
guiStaticImageLoadImage(image, "SAMP"..math.random(1,4)..".png") 
setTimer (guiSetVisible, 4000, 1, image, false ) 
end 
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), headshot ) 

Link to comment

Try.

local x,y = guiGetScreenSize( ) 
  
function headshot ( killer, weapon, bodypart ) 
    if ( killer ) and ( killer ~= source ) then 
        local image = guiCreateStaticImage ( x/5, y/5.8, 399,169, "SAMP"..tostring( math.random( 1,4 ) )..".png", false ) 
        guiStaticImageLoadImage( image, "SAMP"..tostring( math.random( 1,4 ) )..".png" ) 
        setTimer ( guiSetVisible, 4000, 1, image, false ) 
    end  
end 
addEventHandler ( "onClientPlayerWasted", localPlayer, headshot ) 

You forgot 'end'.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...