<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dev.playonset.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Justus</id>
	<title>Onset Developer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dev.playonset.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Justus"/>
	<link rel="alternate" type="text/html" href="https://dev.playonset.com/wiki/Special:Contributions/Justus"/>
	<updated>2026-04-24T06:56:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetPlayerEquippedWeaponSlot&amp;diff=3356</id>
		<title>GetPlayerEquippedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetPlayerEquippedWeaponSlot&amp;diff=3356"/>
		<updated>2019-12-22T16:47:56Z</updated>

		<summary type="html">&lt;p&gt;Justus: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client &amp;amp; Server|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Returns the slot the player currently has equiped}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetPlayerEquippedWeaponSlot(player)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The player identifier}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|The weapon slot the player currently has equipped}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetTimeSeconds&amp;diff=3355</id>
		<title>GetTimeSeconds</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetTimeSeconds&amp;diff=3355"/>
		<updated>2019-12-22T16:46:51Z</updated>

		<summary type="html">&lt;p&gt;Justus: GetTimeSeconds edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server &amp;amp; Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Returns the amount of time since the game started up}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetTimeSeconds()}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncNoParam}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns a float value of the amount of time passed since the game strarted}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetPlayerEquippedWeaponSlot&amp;diff=3354</id>
		<title>GetPlayerEquippedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetPlayerEquippedWeaponSlot&amp;diff=3354"/>
		<updated>2019-12-22T16:46:01Z</updated>

		<summary type="html">&lt;p&gt;Justus: info fill for GetPlayerEquippedWeaponSlot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client &amp;amp; Server|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Returns the slot the playeer currently has equiped}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetPlayerEquippedWeaponSlot(player)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The player identifier}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|The weapon slot the player currently has equipped}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetTerrainHeight&amp;diff=3353</id>
		<title>GetTerrainHeight</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetTerrainHeight&amp;diff=3353"/>
		<updated>2019-12-22T16:44:58Z</updated>

		<summary type="html">&lt;p&gt;Justus: terriain heiught edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Creates a linetrace from the given coordiantes facing downwards and returns the Z value of the first hit object.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetTerrainHeight(sX, sY, sZ)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|sX|X float value}}&lt;br /&gt;
{{FuncParam|sY|Y float value}}&lt;br /&gt;
{{FuncParam|sZ|Z float value}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns Z value of first hit object, else returns false}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=SetPlayerRotationRate&amp;diff=3352</id>
		<title>SetPlayerRotationRate</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=SetPlayerRotationRate&amp;diff=3352"/>
		<updated>2019-12-22T16:43:15Z</updated>

		<summary type="html">&lt;p&gt;Justus: minor adjustment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Sets the speed of the players rotation.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|SetPlayerRotationRate(RotationRate)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|RotationRate|Float value between -720.0 and 720.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|True on success}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=IsFloatNearlyZero&amp;diff=3346</id>
		<title>IsFloatNearlyZero</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=IsFloatNearlyZero&amp;diff=3346"/>
		<updated>2019-12-21T17:50:34Z</updated>

		<summary type="html">&lt;p&gt;Justus: more see also links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Checks if a float value is nearly zero.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|IsFloatNearlyZero(Value)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|Value|The float value}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; if success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
if IsFloatNearlyZero(GetPlayerHealth()) then&lt;br /&gt;
	AddPlayerChat(&amp;quot;You are about to die&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[RandomFloat]]&lt;br /&gt;
* [[Base64Encode]]&lt;br /&gt;
* [[Base64Decode]]&lt;br /&gt;
* [[GetPlayerHealth]]&lt;br /&gt;
* [[SetPlayerHealth]]&lt;br /&gt;
* [[GetPlayerArmor]]&lt;br /&gt;
* [[SetPlayerArmor]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=IsFloatNearlyZero&amp;diff=3345</id>
		<title>IsFloatNearlyZero</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=IsFloatNearlyZero&amp;diff=3345"/>
		<updated>2019-12-21T17:48:08Z</updated>

		<summary type="html">&lt;p&gt;Justus: basic example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Checks if a float value is nearly zero.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|IsFloatNearlyZero(Value)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|Value|The float value}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; if success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
if IsFloatNearlyZero(GetPlayerHealth()) then&lt;br /&gt;
	AddPlayerChat(&amp;quot;You are about to die&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[RandomFloat]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=SetNearClipPlane&amp;diff=3341</id>
		<title>SetNearClipPlane</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=SetNearClipPlane&amp;diff=3341"/>
		<updated>2019-12-20T18:01:47Z</updated>

		<summary type="html">&lt;p&gt;Justus: Minor addition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|This function culls triangles in a certain distance. Useful for the first person mode to hide head attachments.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|SetNearClipPlane(distance)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|distance|The distance in which you have to cull the objects. Set to zero (0) to reset back to defaults.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|__EDIT_ME__}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnKeyPress(key)&lt;br /&gt;
	if key == &amp;quot;P&amp;quot; then&lt;br /&gt;
		local bEnable = not IsFirstPersonCamera()&lt;br /&gt;
		EnableFirstPersonCamera(bEnable)&lt;br /&gt;
		SetNearClipPlane(15)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnKeyPress&amp;quot;, OnKeyPress)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{ClientPlayerFunctions}}&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=DestroyDoor&amp;diff=3309</id>
		<title>DestroyDoor</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=DestroyDoor&amp;diff=3309"/>
		<updated>2019-12-19T23:38:01Z</updated>

		<summary type="html">&lt;p&gt;Justus: Simple destroydoor example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Destroys a door that was earlier created by [[CreateDoor]].}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|DestroyDoor(door)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|door|The door to destroy.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; on success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
function cmd_destroydoor(player, door)&lt;br /&gt;
	if (IsValidDoor(door)) then&lt;br /&gt;
		return DestroyDoor(door)&lt;br /&gt;
	end&lt;br /&gt;
	AddPlayerChat(player, &amp;quot;Invalid door&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
AddCommand(&amp;quot;destroydoor&amp;quot;, cmd_destroydoor)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[IsValidDoor]]&lt;br /&gt;
* [[GetDoorCount]]&lt;br /&gt;
* [[GetDoorLocation]]&lt;br /&gt;
* [[GetStreamedDoors]]&lt;br /&gt;
* [[GetSoundCount]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=CreateFireworks&amp;diff=3305</id>
		<title>CreateFireworks</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=CreateFireworks&amp;diff=3305"/>
		<updated>2019-12-19T19:25:20Z</updated>

		<summary type="html">&lt;p&gt;Justus: Updated description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Creates fireworks that shoot upwards and explode. ModelId presets contain various shapes/styles of fireworks.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|CreateFireworks(modelid, x, y, z, rx, ry, rz)}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot; style=&amp;quot;float:right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:fireworks.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|modelid|Id for fireworks preset (1-13).}}&lt;br /&gt;
{{FuncParam|x|World X location.}}&lt;br /&gt;
{{FuncParam|y|World Y location.}}&lt;br /&gt;
{{FuncParam|z|World Z location.}}&lt;br /&gt;
{{FuncParam|rx|Pitch rotation. Should be 90.0 to have the fireworks shoot up.}}&lt;br /&gt;
{{FuncParam|ry|Yaw rotation.}}&lt;br /&gt;
{{FuncParam|rz|Roll rotation.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; on success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&#039;&#039;&#039;Client:&#039;&#039;&#039; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function ClientCreateFireworks(type)&lt;br /&gt;
	local x, y, z = GetPlayerLocation()&lt;br /&gt;
	CreateFireworks(type, x, y, z + 150, 90, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
AddRemoteEvent(&amp;quot;ClientCreateFireworks&amp;quot;, ClientCreateFireworks)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Server:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function cmd_fireworks(player, type)&lt;br /&gt;
	if (type == nil) then&lt;br /&gt;
		return AddPlayerChat(player, &amp;quot;Usage: /fireworks &amp;lt;type 1-13&amp;gt;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	type = tonumber(type)&lt;br /&gt;
&lt;br /&gt;
	if (type &amp;lt; 0 or type &amp;gt; 13) then&lt;br /&gt;
		return AddPlayerChat(player, &amp;quot;Parameter \&amp;quot;type\&amp;quot; 1-13&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	CallRemoteEvent(player, &amp;quot;ClientCreateFireworks&amp;quot;, type)&lt;br /&gt;
	AddPlayerChat(player, &amp;quot;Fireworks created!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
AddCommand(&amp;quot;fireworks&amp;quot;, cmd_fireworks)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
*[[CreateExplosion]]&lt;br /&gt;
*[[CreateFireworks]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=CreateFireworks&amp;diff=3304</id>
		<title>CreateFireworks</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=CreateFireworks&amp;diff=3304"/>
		<updated>2019-12-19T19:24:03Z</updated>

		<summary type="html">&lt;p&gt;Justus: Added a create firework command example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|__EDIT_ME__}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|CreateFireworks(modelid, x, y, z, rx, ry, rz)}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot; style=&amp;quot;float:right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:fireworks.png|400px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|modelid|Id for fireworks preset (1-13).}}&lt;br /&gt;
{{FuncParam|x|World X location.}}&lt;br /&gt;
{{FuncParam|y|World Y location.}}&lt;br /&gt;
{{FuncParam|z|World Z location.}}&lt;br /&gt;
{{FuncParam|rx|Pitch rotation. Should be 90.0 to have the fireworks shoot up.}}&lt;br /&gt;
{{FuncParam|ry|Yaw rotation.}}&lt;br /&gt;
{{FuncParam|rz|Roll rotation.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; on success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&#039;&#039;&#039;Client:&#039;&#039;&#039; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function ClientCreateFireworks(type)&lt;br /&gt;
	local x, y, z = GetPlayerLocation()&lt;br /&gt;
	CreateFireworks(type, x, y, z + 150, 90, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
AddRemoteEvent(&amp;quot;ClientCreateFireworks&amp;quot;, ClientCreateFireworks)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Server:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function cmd_fireworks(player, type)&lt;br /&gt;
	if (type == nil) then&lt;br /&gt;
		return AddPlayerChat(player, &amp;quot;Usage: /fireworks &amp;lt;type 1-13&amp;gt;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	type = tonumber(type)&lt;br /&gt;
&lt;br /&gt;
	if (type &amp;lt; 0 or type &amp;gt; 13) then&lt;br /&gt;
		return AddPlayerChat(player, &amp;quot;Parameter \&amp;quot;type\&amp;quot; 1-13&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	CallRemoteEvent(player, &amp;quot;ClientCreateFireworks&amp;quot;, type)&lt;br /&gt;
	AddPlayerChat(player, &amp;quot;Fireworks created!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
AddCommand(&amp;quot;fireworks&amp;quot;, cmd_fireworks)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
*[[CreateExplosion]]&lt;br /&gt;
*[[CreateFireworks]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=SetObjectEmissiveColor&amp;diff=3303</id>
		<title>SetObjectEmissiveColor</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=SetObjectEmissiveColor&amp;diff=3303"/>
		<updated>2019-12-19T19:02:43Z</updated>

		<summary type="html">&lt;p&gt;Justus: Added image of in game example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Makes an object glow with a specified hexadecimal value, intensity and material slot on the object}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|SetObjectEmissiveColor(object, ColorHex, EmissiveStrength [, MaterialSlot])}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot; style=&amp;quot;float:right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:glowing hat example.png|thumb|right|Glowing Hat Example (0x000FF)]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|object|The object identifier.}}&lt;br /&gt;
{{FuncParam|ColorHex|Hexadecimal color value}}&lt;br /&gt;
{{FuncParam|EmissiveStrength|The strength/brightness of the glow}}&lt;br /&gt;
{{FuncParamOptional|MaterialSlot|The material slot of the object model}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|__EDIT_ME__}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnObjectStreamIn(object)&lt;br /&gt;
	local glow = GetObjectPropertyValue(object, &amp;quot;glow&amp;quot;) -- 0x0000FF&lt;br /&gt;
&lt;br /&gt;
	if glow ~= nil then&lt;br /&gt;
		local intensity = 30&lt;br /&gt;
		SetObjectEmissiveColor(object, glow, intensity )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnObjectStreamIn&amp;quot;, OnObjectStreamIn)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[GetObjectCount]]&lt;br /&gt;
* [[GetObjectModelCount]]&lt;br /&gt;
* [[GetObjectModelGroup]]&lt;br /&gt;
* [[GetObjectModelName]]&lt;br /&gt;
* [[GetStreamedObjects]]&lt;br /&gt;
* [[GetObjectModel]]&lt;br /&gt;
* [[GetObjectLocation]]&lt;br /&gt;
* [[GetObjectRotation]]&lt;br /&gt;
* [[GetObjectScale]]&lt;br /&gt;
* [[GetObjectBoundingBox]]&lt;br /&gt;
* [[GetObjectSize]]&lt;br /&gt;
* [[EnableObjectHitEvents]]&lt;br /&gt;
* [[GetObjectMass]]&lt;br /&gt;
* [[SetObjectEditorSpeed]]&lt;br /&gt;
* [[SetObjectEditable]]&lt;br /&gt;
* [[SetObjectOutline]]&lt;br /&gt;
* [[SetObjectCastShadow]]&lt;br /&gt;
* [[SetObjectColor]]&lt;br /&gt;
* [[SetObjectTexture]]&lt;br /&gt;
* [[SetObjectAnimatedTexture]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=File:glowing_hat_example.png&amp;diff=3302</id>
		<title>File:glowing hat example.png</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=File:glowing_hat_example.png&amp;diff=3302"/>
		<updated>2019-12-19T19:01:33Z</updated>

		<summary type="html">&lt;p&gt;Justus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Setting the EmissiveColor of a hat object&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=SetObjectEmissiveColor&amp;diff=3300</id>
		<title>SetObjectEmissiveColor</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=SetObjectEmissiveColor&amp;diff=3300"/>
		<updated>2019-12-19T18:56:10Z</updated>

		<summary type="html">&lt;p&gt;Justus: Added more info regarding EmissiveColor with a barebones example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Makes an object glow with a specified hexadecimal value, intensity and material slot on the object}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|SetObjectEmissiveColor(object, ColorHex, EmissiveStrength [, MaterialSlot])}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|object|The object identifier.}}&lt;br /&gt;
{{FuncParam|ColorHex|Hexadecimal color value}}&lt;br /&gt;
{{FuncParam|EmissiveStrength|The strength/brightness of the glow}}&lt;br /&gt;
{{FuncParamOptional|MaterialSlot|The material slot of the object model}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|__EDIT_ME__}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
function OnObjectStreamIn(object)&lt;br /&gt;
	local glow = GetObjectPropertyValue(object, &amp;quot;glow&amp;quot;) -- 0x0000FF&lt;br /&gt;
&lt;br /&gt;
	if glow ~= nil then&lt;br /&gt;
		local intensity = 30&lt;br /&gt;
		SetObjectEmissiveColor(object, glow, intensity )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnObjectStreamIn&amp;quot;, OnObjectStreamIn)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[GetObjectCount]]&lt;br /&gt;
* [[GetObjectModelCount]]&lt;br /&gt;
* [[GetObjectModelGroup]]&lt;br /&gt;
* [[GetObjectModelName]]&lt;br /&gt;
* [[GetStreamedObjects]]&lt;br /&gt;
* [[GetObjectModel]]&lt;br /&gt;
* [[GetObjectLocation]]&lt;br /&gt;
* [[GetObjectRotation]]&lt;br /&gt;
* [[GetObjectScale]]&lt;br /&gt;
* [[GetObjectBoundingBox]]&lt;br /&gt;
* [[GetObjectSize]]&lt;br /&gt;
* [[EnableObjectHitEvents]]&lt;br /&gt;
* [[GetObjectMass]]&lt;br /&gt;
* [[SetObjectEditorSpeed]]&lt;br /&gt;
* [[SetObjectEditable]]&lt;br /&gt;
* [[SetObjectOutline]]&lt;br /&gt;
* [[SetObjectCastShadow]]&lt;br /&gt;
* [[SetObjectColor]]&lt;br /&gt;
* [[SetObjectTexture]]&lt;br /&gt;
* [[SetObjectAnimatedTexture]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=OnPlayerStreamIn&amp;diff=3299</id>
		<title>OnPlayerStreamIn</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=OnPlayerStreamIn&amp;diff=3299"/>
		<updated>2019-12-19T18:45:26Z</updated>

		<summary type="html">&lt;p&gt;Justus: /* Added an basic example of syncing clothing presets on stream in */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Event|Server &amp;amp; Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Called when another user is streamed in (rendered) for the player.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|OnPlayerStreamIn(player, otherplayer)}}&lt;br /&gt;
{{FuncSyntaxClient|OnPlayerStreamIn(player)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The player for the other player is streamed in.}}&lt;br /&gt;
{{FuncParam|otherplayer|The player that streams in for player.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&#039;&#039;&#039;A barebones example of syncing player clothing presets:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function OnPlayerStreamIn(player)&lt;br /&gt;
	-- Assuming `_modelPreset` is the player&#039;s clothing preset id,&lt;br /&gt;
	-- set their clothing so the client doesn&#039;t see them naked.&lt;br /&gt;
	local _modelPreset = GetPlayerPropertyValue(player, &amp;quot;_modelPreset&amp;quot;)&lt;br /&gt;
	if (_modelPreset ~= nil and _modelPreset &amp;gt; 0) then&lt;br /&gt;
		SetPlayerClothingPreset(player, _modelPreset)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPlayerStreamIn&amp;quot;, OnPlayerStreamIn)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{ServerEvents}}&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=OnPlayerStreamIn&amp;diff=3298</id>
		<title>OnPlayerStreamIn</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=OnPlayerStreamIn&amp;diff=3298"/>
		<updated>2019-12-19T18:39:27Z</updated>

		<summary type="html">&lt;p&gt;Justus: Updated description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Event|Server &amp;amp; Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Called when another user is streamed in (rendered) for the player.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|OnPlayerStreamIn(player, otherplayer)}}&lt;br /&gt;
{{FuncSyntaxClient|OnPlayerStreamIn(player)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The player for the other player is streamed in.}}&lt;br /&gt;
{{FuncParam|otherplayer|The player that streams in for player.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
__EDIT_ME__&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{ServerEvents}}&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetGameVersion&amp;diff=3297</id>
		<title>GetGameVersion</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetGameVersion&amp;diff=3297"/>
		<updated>2019-12-19T18:31:58Z</updated>

		<summary type="html">&lt;p&gt;Justus: /* GetGameVersion Client &amp;amp; Server examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server &amp;amp; Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Returns the server/ client&#039;s game version}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetGameVersion()}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncNoParam}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns the server/ client&#039;s game version}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&#039;&#039;&#039;Client:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
local function OnPackageStart()&lt;br /&gt;
    AddPlayerChat(&amp;quot;Your game version is: &amp;quot;..GetGameVersion())&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPackageStart&amp;quot;, OnPackageStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Server:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
local function OnPlayerJoin(player)&lt;br /&gt;
	AddPlayerChat(player, &amp;quot;This server runs on game version: &amp;quot;..GetGameVersion())&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPlayerJoin&amp;quot;, OnPlayerJoin)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[GetGameVersionString]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=SetPlayerLocation&amp;diff=3296</id>
		<title>SetPlayerLocation</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=SetPlayerLocation&amp;diff=3296"/>
		<updated>2019-12-19T18:19:55Z</updated>

		<summary type="html">&lt;p&gt;Justus: /* Added TeleportTo function example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Set the specified client&#039;s location.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|SetPlayerLocation(player, x, y, z)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The client identifier}}&lt;br /&gt;
{{FuncParam|x|The X coordinate of position to put the player at.}}&lt;br /&gt;
{{FuncParam|y|The Y coordinate of position to put the player at.}}&lt;br /&gt;
{{FuncParam|z|The Z coordinate of position to put the player at.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; on success.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
AddCommand(&amp;quot;town&amp;quot;, function(player)&lt;br /&gt;
	SetPlayerLocation(player, -182821.00, -41675.00, 1160.00)&lt;br /&gt;
	AddPlayerChat(player, &amp;quot;Teleported to town.&amp;quot;)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(server) &#039;&#039;&#039;Teleport function example:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
function TeleportTo(player, x, y, z, h)&lt;br /&gt;
	-- if the player is in a vehicle it will teleport the vehicle with them.&lt;br /&gt;
	-- h = player heading&lt;br /&gt;
	h = h or -1.0&lt;br /&gt;
&lt;br /&gt;
	if (GetPlayerVehicleSeat(player) == 1) then&lt;br /&gt;
		local vehicle = GetPlayerVehicle(player)&lt;br /&gt;
		SetVehicleLocation(vehicle, x, y, z)&lt;br /&gt;
		if (h ~= -1.0) then&lt;br /&gt;
			SetVehicleHeading(vehicle, h)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Reset velocity&lt;br /&gt;
		SetVehicleLinearVelocity(vehicle, 0.0, 0.0, 0.0, true)&lt;br /&gt;
		SetVehicleAngularVelocity(vehicle, 0.0, 0.0, 0.0, true)&lt;br /&gt;
		local rx, ry, rz = GetVehicleRotation(vehicle)&lt;br /&gt;
		-- Reset pitch and roll, leave yaw alone&lt;br /&gt;
		SetVehicleRotation(vehicle, 0.0, ry, 0.0)&lt;br /&gt;
	else&lt;br /&gt;
		SetPlayerLocation(player, x, y, z)&lt;br /&gt;
		if (h ~= -1.0) then&lt;br /&gt;
			SetPlayerHeading(player, h)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--ResetPlayerCamera(player)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[GetPlayerLocation]]&lt;/div&gt;</summary>
		<author><name>Justus</name></author>
	</entry>
</feed>