Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Figuring out who is the host
Figuring out who is the host
2001-11-24, 6:14 PM #1
Hi again,

Does anyone know how i could make a cog reconize who the host of a game is?

thanks
2001-11-24, 6:34 PM #2

Blah:
If(Isserver() == 1) {
Print("Yes, you are the server."); }
Stop;


[http://forums.massassi.net/html/biggrin.gif]



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-11-24, 6:38 PM #3
[http://forums.massassi.net/html/biggrin.gif] thanks ill try it
2001-11-24, 6:43 PM #4
yup it works thanks [http://forums.massassi.net/html/smile.gif]
2001-11-24, 6:56 PM #5
That would only tell display the text locally to HOST. That wouldnt help a joining person figure out who the host is. I think he wants something like this:

Code:
symbols

message     join
message     timer
message     startup

end

#---------------------------

code

startup:
player = GetLocalPlayerThing();
Stop;

#---------------------------

join:
new = GetSenderRef();
SetTimerEx(2, new, 0, 0);
Stop;

#---------------------------

timer:
person = GetSenderID();
If(IsServer() == 1)
{
jkStringClear();
jkStringConcatAsciiString("Welcome");
jkStringConcatPlayerName(person); 
jkStringConcatAsciiString(". ");
jkStringConcatPlayerName(player); 
jkStringConcatAsciiString(" is the HOST.");
jkStringOutput(-3, -3);
}
Stop;

#---------------------------
end
- Wisdom is 99% experience, 1% knowledge. -
2001-11-24, 7:00 PM #6
DOH, I took too long in writing it and his problem is already solved. [http://forums.massassi.net/html/frown.gif]
- Wisdom is 99% experience, 1% knowledge. -
2001-11-24, 7:00 PM #7
oh im sorry yeah GBK was right i just needed it for my tournament cog so the host would only start it and not the clients, but thanks ill prbably be needing that later in the cog thanks [http://forums.massassi.net/html/biggrin.gif]
2001-11-24, 7:02 PM #8
lol sorry man im gonna use that too for poeple that want to know the host [http://forums.massassi.net/html/biggrin.gif]

↑ Up to the top!