Community Forum

Local mode Single- or Multiplayer State

Forum Overview >> Scripting

Created21.08.2012 05:51

Dirk Buck (Unknown) 21.08.2012 05:55

i need to know the way how i could get if the game is in a singlegame or the host or client in a multiplayer game.

I have tried something but it seems wrong.

This are some variables i have found

if not connection:getIsServer() then
print("Server Aktiv");
print("Client Aktiv");

if self.isServer then print("Server Aktiv"); end;
if self.isClient then print("Server Aktiv"); end;

But there comes no output or some errors. Only with the g_server i have get some results, this is a very big array.

D. Ecker (Decker_MMIV) 23.08.2012 14:01
I'm not sure, but there are these variables, which is probably of use for you - they are located in the object: g_currentMission.missionDynamicInfo

autoAccept = false (boolean)
autoSave = false (boolean)
capacity = 2 (number)
isClient = false (boolean)
isMultiplayer = true (boolean)

So I guess what you're looking for, would be:


[edit 2012-08-23 16:11 CET]

Dirk Buck (Unknown) 23.08.2012 23:21
One Big Thank to you.

This is the info i have searched for.


Note: Log in to post. Create a new account here.