https://dev.playonset.com/index.php?title=IsServer&feed=atom&action=historyIsServer - Revision history2024-03-28T18:00:40ZRevision history for this page on the wikiMediaWiki 1.41.0https://dev.playonset.com/index.php?title=IsServer&diff=4550&oldid=prevBlueMountains: Created page with "{{Info|Function|Client & Server|1.4.0}} {{FuncDescription|Used to check if a script currently runs on the server.}} {{FuncSyntax|IsServer()}} {{FuncParameters}} {{FuncNoPar..."2020-12-14T19:38:56Z<p>Created page with "{{Info|Function|Client & Server|1.4.0}} {{FuncDescription|Used to check if a script currently runs on the server.}} {{FuncSyntax|IsServer()}} {{FuncParameters}} {{FuncNoPar..."</p>
<p><b>New page</b></p><div>{{Info|Function|Client & Server|1.4.0}}<br />
<br />
{{FuncDescription|Used to check if a script currently runs on the server.}}<br />
<br />
{{FuncSyntax|IsServer()}}<br />
<br />
{{FuncParameters}}<br />
{{FuncNoParam}}<br />
<br />
{{FuncReturnValue|Returns '''true''' on the server and '''false''' on the client.}}<br />
<br />
== Example ==<br />
<syntaxhighlight lang="Lua"><br />
AddEvent("OnPackageStart", function()<br />
if IsServer() then<br />
print("This is printed to the server console.")<br />
end<br />
<br />
if IsClient() then<br />
print("This is printed to the game devlog.")<br />
end<br />
end)<br />
</syntaxhighlight><br />
<br />
{{RelatedFunctions}}<br />
*[[GetServerTickRate]]<br />
*[[ServerExit]]<br />
*[[SetServerName]]<br />
*[[GetServerName]]<br />
*[[GetMaxPlayers]]</div>BlueMountains