One thing in gs2 that I have been trying off and on how to figure out is how to put variables in strings. After seeing some random examples and taking a closer look at the gscript wiki page that I have read many times, it finally occured to me. And since for me, the solution was so elusive, I will post it here so others can see how this rather simple thing is done.
The @ symbol is what combines strings, or strings and variables, in gs2.
If you want a gui box to show the player's name at the end, you could have the text line of the GuiTextCtrl box be
PHP Code:
text = "Welcome to some server that is crappy but I can't tell beacsue I am a noob with money who rented a spot and threw stuff together, "@player.nick;
So: You define a string by putting it in quotes "like this"
and the player.nick is a variable whose type is a string, so it does not need quotes. The @ does not read the contents of player.nick, it simply sticks the two together.
But what if you want to put more text after the player's name?
You use another @
PHP Code:
text = "Welcome to some server that is crappy but I can't tell becasue I am a noob with money who rented a spot and threw stuff together, "@player.nick@" , so have fun trying to figure out my obtuse customized player movement and swords that hit off target and graphics ripped from emulators, you know the drill. Enjoy it while your gold account lasts casue i r b 1337 baby!";
If, instead of the player's name, you want to put in a player variable or a server string, #s(client.whateveryoucalledthestring) and #s(serverr.thestringnameyougavefortheserverstring) still works.
Also, if you have a Gui box whose text you want updated, having any kind of setTimer(number) will casue the text to flash. .05 time casues the text to not show at all, if read from a server string, if I remember correctly the server's fastest response time is .1, so in the timeout, do a check that grabs the string value to a variable, sleep for .1, and check the variable against the current string value. If the values differ, then update the text attribute of whatever you called the box. The text attribute for GuiTextCtrl ("My_Text") would be My_Text.text and you can set it equal to whatever you like in a separate part of the npc.
I hope this helps someone, and please correct me where I am wrong. But what I did here (with different text of course) works on my server.