Theres a framework called cout which you could use: <a href="https://github.com/NS2-Modding-Collective/Cout-class" target="_blank">https://github.com/NS2-Modding-Collective/Cout-class</a>
Or if you just want to print it in the chat from the player:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> function Player:BuildAndSendDirectMessage(message)
//Sending Msg only to the Player local playerName = self:GetName() local playerLocationId = -1 local playerTeamNumber = kTeamReadyRoom local playerTeamType = kNeutralTeamType
Regarding the framework; the level I'm making is currently using your Extra Entities Mod. Does that mean I can only use one or the other? or can I use both? If I can use both; how do I go about doing that?
I'm thinking of going with your second option.
What I have done is made a new lua file and placed it into the ExtraEntitesMod\lua directory. I'm then calling it using the logic_lua entity. Am I doing it right?
I'm after a function to send a message to all players on the server; is this still the best function to use?
Comments
<a href="https://github.com/NS2-Modding-Collective/Cout-class" target="_blank">https://github.com/NS2-Modding-Collective/Cout-class</a>
Or if you just want to print it in the chat from the player:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> function Player:BuildAndSendDirectMessage(message)
//Sending Msg only to the Player
local playerName = self:GetName()
local playerLocationId = -1
local playerTeamNumber = kTeamReadyRoom
local playerTeamType = kNeutralTeamType
Server.SendNetworkMessage(self, "Chat", BuildChatMessage(true, playerName, playerLocationId, playerTeamNumber, playerTeamType, message), true)
end<!--c2--></div><!--ec2-->
Regarding the framework; the level I'm making is currently using your Extra Entities Mod. Does that mean I can only use one or the other? or can I use both? If I can use both; how do I go about doing that?
I'm thinking of going with your second option.
What I have done is made a new lua file and placed it into the ExtraEntitesMod\lua directory. I'm then calling it using the logic_lua entity. Am I doing it right?
I'm after a function to send a message to all players on the server; is this still the best function to use?
Thanks