Need help please


I’m trying to make blood stains appears on screen when the player is taking damage.
So first I tried to use hooks, I used PlayerHurt, and when I was getting damages a text in the chat was send.
So far, its working but how can I now make blood, or even a text appears on the screen ?
Because I can only draw in my HUD folder, and here I’ve got my hook things in autorun/server.

Thanks, and sorry for my really bad english.

(User was banned for this post ("Undescriptive thread title. You already selected the "HELP" thread icon, describe what you need help with in the title." - postal))

Send information to the client to draw.

You can use player_hurt game-event, you can network damage, or you could monitor health. Easiest would be to use a hook, set a var or create a temporary HUDPaint which handles drawing the spatter for as long as necessary before removing itself or you can have one HUDPaint that is there all the time.

If you use Player TakeDamage / TakeDamageInfo you can set damage-types which also have a screen effect…

Thanks for the answers :slight_smile:

I don’t really understand, how could I create a temporary HUDPaint ?
Like can I hook.Add on HUDPaint in my server file or do I need to like, create a function to do the work and call it in my hud replacement from the darkrpmodificiation ?

Sorry, I’m kinda new to “gmod coding” :wink:

I have a few examples:

Basically, in that… On Initial Spawn the clients will receive a net-message ( mind you the LocalPlayer entity won’t be initialized fully on the client so if you try running HUDPaint without IsValid then there will be errors )… The net message create the HUDPaint hook. The HUDPaint waits until the client is in game before “starting”… After x time elapsed from the time it started, the HUDPaint removes itself.

Simple and effective way of creating a temporary hook… If you were using my dev-base you could also use draw.This / render.This or hook.AddTemp which runs a hook for x duration…