Jump to content

Wasted Image


SnoopCat

Recommended Posts

hello i have a script that when u die it plays a sound like WASTED.... well the thing i want to add to this script is an image on the screen and idk how to do it , if anyone wants to help here is the code i have

function wasted (thePlayer) 
     local sound = playSound("wasted.mp3",false) 
     setSoundVolume(sound, 0.9) 
end 
   
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), wasted ) 
  
  
  
  

Link to comment

soo it must be like this?

function wasted (thePlayer) 
     local sound = playSound("wasted.mp3",false) 
     setSoundVolume(sound, 0.9) 
end 
  
function wasted (theplayer) 
guiCreateStaticImage( 20, 200, 100, 100, "imagename.png", false ) 
end 
   
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), wasted ) 
  
  
  
  

Link to comment

No, that's wrong.

function wasted (thePlayer) 
     local sound = playSound("wasted.mp3",false) 
     setSoundVolume(sound, 0.9) 
     image = guiCreateStaticImage( 20, 200, 100, 100, "imagename.png", false ) 
     setTimer(destroyElement, 5000, 1, image) 
end 
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), wasted ) 

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...