Jump to content

Spawn GUI StaticImage


xbenny2506x

Recommended Posts

HI!

I have add in my Spwan menu the Spawn name as a guiCreateStaticImage.

But the problem is when the player Spawn from one point to a other one he see the new and the old Image.

Here is my script:

Client:

function HighJump ( HighJumptext )
 
if ( HighJumptext ) then
destroyElement ( HighJumptext )
end
 
       HighJumptext = guiCreateStaticImage(0.22,0.88,0.30,0.08,"menupic/HighJump.png",true)
setTimer ( destroyElement, 3000, 1, HighJumptext, source )
 
end
 
addEvent( "HighJumpasend", true )
addEventHandler( "HighJumpasend", getRootElement(), HighJump )
 
 
 
function WaterJump ( WaterJumptext )
 
if ( WaterJumptext ) then
destroyElement ( WaterJumptext )
end
 
    WaterJumptext = guiCreateStaticImage(0.22,0.88,0.30,0.08,"menupic/WaterJump.png",true)
setTimer ( destroyElement, 3000, 1, WaterJumptext, source )
 
end
 
addEvent( "WaterJumpsend", true )
addEventHandler( "WaterJumpsend", getRootElement(), WaterJump )

Server:

...
if ( check ) == 999 then
triggerClientEvent ( source,"HighJumpasend", getRootElement())
...
 
if ( check ) == 9999 then
triggerClientEvent ( source,"WaterJumpsend", getRootElement())
...

Can somone Help me with that problem? THX :D

Link to comment

assuming i understand you correctly, could you not just check for other images when you show one, eg:

function HighJump ( HighJumptext )
 
   CheckOnScreenText()
 
   HighJumptext = guiCreateStaticImage(0.22,0.88,0.30,0.08,"menupic/HighJump.png",true)
   HighJumpTimer = setTimer ( destroyElement, 3000, 1, HighJumptext, source )
 
end
addEvent( "HighJumpasend", true )
addEventHandler( "HighJumpasend", getRootElement(), HighJump )
 
 
 
function WaterJump ( WaterJumptext )
 
   CheckOnScreenText()
 
   WaterJumptext = guiCreateStaticImage(0.22,0.88,0.30,0.08,"menupic/WaterJump.png",true)
   WaterJumpTimer = setTimer ( destroyElement, 3000, 1, WaterJumptext, source )
 
end
addEvent( "WaterJumpsend", true )
addEventHandler( "WaterJumpsend", getRootElement(), WaterJump )
 
function CheckOnScreenText()
 
if ( WaterJumpText ) then
destroyElement ( WaterJumpText )
       WaterJumpText = nil
if WaterJumpTimer then
killTimer(WaterJumpTimer)
           WaterJumpTimer = nil
end
end
 
if ( HighJumptext ) then
destroyElement ( HighJumptext )
       HighJumptext = nil
if HighJumpTimer then
killTimer(HighJumpTimer)
           HighJumpTimer = nil
end
end
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...