I have just completed a chat program, and all that is missing is kicking players. I would really appreciate it if someone could tell me how to do this.
Thanks!
I have just completed a chat program, and all that is missing is kicking players. I would really appreciate it if someone could tell me how to do this.
Thanks!
If you have a list containing all of your players, make it so that it sends a message to that user, or even send a message to everyone and make the message their name. All you have to do is designate a certain subchannel or command to be especially for kicking. For example:
Server
+Button Clicked
-Set message username on subchannel 54
Client
+On Server Message
+Text of server message = my username
+Subchannel of server message = 54
-Kick
I can do that part. The only trouble I am having is getting the list in the server to show the people logged on. I tried having the command:
+ On Sign on
- send message username on subchannel 11
On the server:
+ On client message
- subchannel = 11 (however the code for that looks..)
- add username to list1
I thought this would work, but nothing is added to the list.
You are probably using the wrong subchannel command. There are 3 or 4 of them, one for receiving from server, one from the client, and several others. Make sure that yours says:
SC_OnClientMsg_GetSubchannel( "MooClick" )
and for adding the username to list:
Add SC_OnClientMsg_GetText$( "MooClick" ) to list1
If you use anything besides those, it won't work.
how do you get those commands...
In the expression editor, click retrieve data from object, right click the mooclick object, and those will be under there. But I posted them above, so you can just copy and paste that and it will work as long as you have a mooclick object with the name MooClick.
umm, where's the expression editor? What's the command I use to get there? Where it says New condition, what do I click?
The expression editor is the box where you type in the numbers and strings for actions.
Where it says New condition, what do I click to get there?
The expression editor is the box with two buttons on the right, one saying "Retrieve data from object" and the other saying "Check current expression". You must have seen this before, it is nearly impossible to make a game in MMF2 or TGF2 without it. If you still don't know what it is, it is the box you use to type in your subchannel for example.