General > Off-Topic
[TTT] Show Number of Traitors/Innocents at the begin of the Round
DH1806:
Another question: I tried to add some colours to the chat message (which is obviously not that important, but I'll need it for some further things I'm going to script) and as this is not possible with PrintMessage (tell me if I'm wrong) I tried to use Add.Chat as it's also used for example in the killreval. But it does not work. In the console there appears the Error: attempt to call global ’chat’ (a nil Value). So he thinks Chat.Add is a function and not the TTT method. I've searched after it and found serval answers, but everyone was different and nothing really worked for me. Anyone here who could give me a tip? :)
Zmaster:
chat.AddText is a function? - http://wiki.garrysmod.com/page/chat/AddText
Also, it's client side code, so if you're trying to use it inside of the server if statement, it won't work
You could use a net message to tell all clients to put that message in their chat
DH1806:
Sorry, I think 'function' and 'method' are different in german :D My Bad.
I tried it in the client folder, and now no error appears any more, but also no message in the chat. I tried to add a chat.Add function right after the start of the function, but it didn't work too. But no error in the console. Really strange.
Zmaster:
Do you know how to use net messages?
I'll do this for you when I get home from school if nobody beats me to it
DH1806:
Yeah that would be great :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version