Making a picture show on the screen when a command is ran

Well basicly i have a picture which i want ALL players on the server to see when a special command is ran.

So i have my simple timer which runs a usermessage and that usermessage shuld activate the picture on the screen.

Another thing, i only want the picture to show for 5 seconds then it shuld disapear.

Anyone?

Simply use

**[Umsg.Bool

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Umsg.Bool)**

to tell the client when you want to draw the image and run a timer on the client to tell the client when to stop drawing it

If you wanted to know how to draw it use
**[Surface.DrawTexturedRect

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect)**

Sorry if i wasn’t clear enough. I know how to make a timer i need to know how to make the picture show on the screen. Basicly just like a HUD is showing but this shuld only show for 5 seconds. So how would i make a picture show on the screen when a command is run?

I saw this on second read and I have edited my post tell me if that its helpful, anything you don’t understand just ask.

Psuedo code



function receive_umsg()
     showtime=CurTime()+5
end

function drawmessage()
    if showtime > CurTime() then
        --draw message
    end
end


Thank you.
Im wondering one thing. When i stick this in client, wouldent it show all the time? Or would it only start when i run the function?

look at ralle105’s code just use a if statement to toggle it on and off