Determining the locality of an object

By Spooner and Mandoble

Using the local comand:

? local unit :
if (local unit) then

Examples:

? local player : hint "There is a player here, I might be a non-dedicated server or just a client"
? !local player : hint "No here player, I'm a dedicated server"
? !local vehiclename : hint "This vehicle is not local to this machine, so don't use setVelocity, setVectorDir or setVectorUp commands here"
? local vehiclename : hint "This vehicle is local to this machine, so we may use setVelocity, setVectorDir or setVectorUp commands here"
? local server : hint "I'm the server, dedicated or not"; (note that a gamelogic named "server" is not needed anymore, since the introduction of the isServer command)
? !local server : hint "I'm a multi-player client"
if (local player) then {hint "There is a player here, I might be a non-dedicated server or just a client";};
if (!local player) then {hint "No here player, I'm a dedicated server";};
if (!local vehiclename) then {hint "This vehicle is not local to this machine, do don't use setVelocity, setVectorDir or setVectorUp commands here";};
if (local vehiclename) then {hint "This vehicle is local to this machine, so we may use setVelocity, setVectorDir or setVectorUp commands here";};
if (local server) then {hint "I'm the server, dedicated or not";}; (note that a gamelogic named "server" is not needed anymore, since the introduction of the isServer command)
if (!local server) then {hint "I'm a client";};