//i hope you guys liked my previous scripts,for we shall be coding in GML. if you experince errors in the compiler
//like, “PROGRAM ENDS BEFORE END OF CODE” it means you have one too many programs. other than that lets get
//started shall we? this script is about players and handling with them. because its soo short we will
//throw in some more commands on messages.
//to see how many players are on a session,along with a certian name, you would do the following:
//note that in order to do this you MUST use mplay_player_find(),else it will not work.
//to find the ID of that certian player,use the following code
//now onto messages.messages are pre-programmed strings the will be sent to a player instance.
//but enough of that! lets get programming! lets start on a personal message sent to a player.
//it would look like this: (use 0 to send it to all players)
//to make sure its sent to it,you would use the following code:
//this next code will have you “recive” messages from other players: (use 0 for any message)
//now we can tinker with this abit.the next following code can be used to do diffrent things with the message:
mplay_message_id(); Returns the identifier of the last received message.
mplay_message_value(); Returns the value of the last received message.
mplay_message_player(); Returns the player who sent the last received message.
mplay_message_name(); Returns the name of the player who sent the last received message.
mplay_message_count(player); Returns the number of messages left in the queue from the player (use 0 to count all message).
mplay_message_clear(player); Removes all messages left in the queue from the player (use 0 to remove all message).
//there you have it! if your eager to see more code ill be happy to show you just simply post a comment
//down below and ill see how it goes!