Jump to content

Wasted Image


SnoopCat

Recommended Posts

Posted

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 ) 
  
  
  
  

VISIT TSW RACING SERVER

http://tswracing.net/

Posted

Use guiCreateStaticImage or draw one with dxDrawImage.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 
  
  
  
  

VISIT TSW RACING SERVER

http://tswracing.net/

Posted

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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Your script must be set as client side in meta.xml.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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