How to add a kill icon for a SWEP

simple, killicon, i need, help, thanks XD

killicon.Add is the function. Look up arguments on wiki.

well yes i tried but it didnt come up, forget to mention i looked up in the wiki

What didn’t come up?

[editline]2nd October 2013[/editline]

Is it really something too hard to do?
There’s even an example.

This is what i added on the same .lua file of the swep it self so maybe i put it on the wrong place. this is it


And i understand how it works or anything so is not hard but i just came here to see what i did wrong…

What is wrong? Can you tell me? Or is it a super secret and I must guess it?

Are you sure that’s a correct path to the killicon? Any console errors about “No killicon for killed by blah”?

well im not sure whats worng! the kill icon seems to be fine but im wondering where am i seppuse to put this code and should it be server side or client side and in what file exactly. should it just be in the shared file?


Dont develop if youre not a developer, let alone if you cant even communicate in English on a English board.

If it’s a shared file, you must do

if CLIENT then /*killicon here*/ end

If it is a client file, you just put the function to the top or something.
There is no “valid” file or filename for this, it doesn’t matter, the only things that matters is that the function must be called CLIENTSIDE.

Usually, everyone puts it just on the top of the SWEP in a “if CLIENT then end”.