Hi folks, I found a problem which was bothering me all my life as lua coder and I can not use a fixed variable for all the code … Do I mean?
I define a variable …
[LUA]if (SERVER) then
function killer_strike (ply, wep, killer)
killer_STR = killer: GetName ()
hook.add (“PlayerDeath” “HookLazzy” killer_strike)
If (CLIENT) then
function other_thing ()
This returns a “Nil” which I can not go or my code or variables
I just need to get details of who is the murderer and use it for a hud, but do not see how, when I do this, I get a “string expected, got nil” which is obvious what is going on e.e
So I wonder … How to use “killer_STR” for future actions and use it as a text?
For example in the “HUDPaint” hook