Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Server: When a player has logged in
- nick = user;//sets the nick
- temp = nick + ' joined the game.';//sets the chat message
- say();//says it
- //Server: Say()
- {
- with obj_player//message to all players
- {
- clearbuffer();
- writebyte( CHAT );//this is a chat message
- writestring( temp );//sends the chat message contained in temp
- sendmessage( socket );//send
- }
- }
- //Client:When it receives a CHAT message.
- {
- with obj_chat_client
- {
- addChat( readstring() );//Add chat just adds a message to the chat console
- }
- }
Add Comment
Please, Sign In to add comment