• I need help with variables
    2 replies, posted
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 () end hook.add ("PlayerDeath" "HookLazzy" killer_strike) end If (CLIENT) then function other_thing () Msg (killer_STR) end end[/LUA] 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
You need to network the data. Use usermessages to do this.
Wooow, Correct me if I'm wrong The server and client are 2 things apart, which, I need to send things to the server to the client section, through these "usmsg"? Packages like? Thanks for your help people [editline]11th February 2012[/editline] [QUOTE=_nonSENSE;34641454]You need to network the data. Use usermessages to do this.[/QUOTE] OMG ITS WORKS! Thanks so very much!
Sorry, you need to Log In to post a reply to this thread.