Guest User

Untitled

a guest
May 17th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Server: When a player has logged in
  2. nick = user;//sets the nick
  3. temp = nick + ' joined the game.';//sets the chat message
  4. say();//says it
  5. //Server: Say()
  6. {
  7.     with obj_player//message to all players
  8.     {
  9.         clearbuffer();
  10.         writebyte( CHAT );//this is a chat message
  11.         writestring( temp );//sends the chat message contained in temp
  12.         sendmessage( socket );//send
  13.     }
  14. }
  15. //Client:When it receives a CHAT message.
  16. {
  17.     with obj_chat_client
  18.     {
  19.         addChat( readstring() );//Add chat just adds a message to the chat console
  20.     }
  21. }
Add Comment
Please, Sign In to add comment