Drawing Custom images?

I have an idea of a modern warfare 2 server. Anyone who has played MW2 would know that when you kill an enemy it shows “50+” or “10+”.

http://img705.imageshack.us/i/mw2200.png/

I would appreciate if someone could explain how i could show this animation or if i would have to make my own font and print it on the screen. Thanks!

WAIT one more question :stuck_out_tongue:

how can i change the material of a weapon? thanks in advance

You don’t need an image, just use **[Draw.DrawText

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

how do i make it stay on the screen for like 2 seconds?

you can use a timer to stop the display of the drawtext, but you need to put your timer out of the drawhud function, otherwise the timer will run on every frames.

Use usermessages to hook it to when you kill someone.

CLIENT-SIDE
[lua]
function DrawKillShit(um)
local amount = um:ReadShort()
hook.Add(“HUDPaint”,“drawthekill”,function() draw.DrawText("+"…amount,“ScoreboardText”,ScrW() / 2,ScrH() / 2,Color(255,255,255,255),1) end) //change the color to yellow, i’m too lazy to do that :slight_smile:
timer.Simple(2,function() hook.Remove(“HUDPaint”,“drawthekill”) end)
end
usermessage.Hook(“drawKillShit”,DrawKillShit)
[/lua]

SERVER-SIDE
[lua]
function SendKillShit(victim,weapon,killer)
umsg.Start(“drawKillShit”,killer)
umsg.Short(100)
umsg.End()
end
hook.Add(“PlayerDeath”,“SendKillShit”,SendKillShit)
[/lua]