<?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=REDRUM</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=REDRUM"/>
	<link rel="alternate" type="text/html" href="https://dev.playonset.com/wiki/Special:Contributions/REDRUM"/>
	<updated>2026-04-24T09:05:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://dev.playonset.com/index.php?title=mariadb_async_query&amp;diff=3760</id>
		<title>mariadb async query</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=mariadb_async_query&amp;diff=3760"/>
		<updated>2020-01-26T15:53:13Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0}}&lt;br /&gt;
{{Notice|This function is provided by the official [[MariaDB]] plugin.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Executes a query in different parallel threads. Execution of order can not be guaranteed. Better use [[mariadb_query]] if you are unsure about it.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|mariadb_async_query(handle, query_str [, callback_func, callback_args...])}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|handle|Connection handle.}}&lt;br /&gt;
{{FuncParam|query_str |The query to be executed.}}&lt;br /&gt;
{{FuncParamOptional|callback_func|The function that will be called when the query was executed.}}&lt;br /&gt;
{{FuncParamOptional|callback_args|Multiple arguments to pass to the callback_func.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; if the query was successfully queued.}}&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 GetCurrentPlayTime(player)&lt;br /&gt;
   CreateTimer(function(player)&lt;br /&gt;
       for k, v in pairs (GetAllPlayers()) do&lt;br /&gt;
           if GetAllPlayers() == true then&lt;br /&gt;
              local query = mariadb_prepare(sql, &amp;quot;SELECT * FROM accounts WHERE id = &#039;?&#039;;&amp;quot;,&lt;br /&gt;
              PlayerData[v].accountid)&lt;br /&gt;
              mariadb_async_query(sql, query, GetPlayerTime, v) &lt;br /&gt;
           end&lt;br /&gt;
       end &lt;br /&gt;
   end, 15000, player)&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPackageStart&amp;quot;, GetCurrentPlayTime)&lt;br /&gt;
&lt;br /&gt;
function GetPlayerTime(player)&lt;br /&gt;
   local result = mariadb_get_assoc(1)&lt;br /&gt;
   local playtime = math.tointeger(result[&#039;time&#039;]) -- total time played on the server without session time.&lt;br /&gt;
   PlayerData[player].time = math.floor(PlayerData[player].time + (GetTimeSeconds() - PlayerData[player].play_time)) -- session play time.&lt;br /&gt;
   PlayerData[player].play_time = GetTimeSeconds()&lt;br /&gt;
   return PlayerData[player].time + playtime -- returns the total play time on the server.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=mariadb_async_query&amp;diff=3759</id>
		<title>mariadb async query</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=mariadb_async_query&amp;diff=3759"/>
		<updated>2020-01-26T15:44:19Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0}}&lt;br /&gt;
{{Notice|This function is provided by the official [[MariaDB]] plugin.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Executes a query in different parallel threads. Execution of order can not be guaranteed. Better use [[mariadb_query]] if you are unsure about it.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|mariadb_async_query(handle, query_str [, callback_func, callback_args...])}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|handle|Connection handle.}}&lt;br /&gt;
{{FuncParam|query_str |The query to be executed.}}&lt;br /&gt;
{{FuncParamOptional|callback_func|The function that will be called when the query was executed.}}&lt;br /&gt;
{{FuncParamOptional|callback_args|Multiple arguments to pass to the callback_func.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns &#039;&#039;&#039;true&#039;&#039;&#039; if the query was successfully queued.}}&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 GetCurrentPlayTime(player)&lt;br /&gt;
   CreateTimer(function(player)&lt;br /&gt;
       for k, v in pairs (GetAllPlayers()) do&lt;br /&gt;
           if GetAllPlayers() == true then&lt;br /&gt;
           local query = mariadb_prepare(sql, &amp;quot;SELECT * FROM accounts WHERE id = &#039;?&#039;;&amp;quot;,&lt;br /&gt;
           PlayerData[v].accountid)&lt;br /&gt;
           mariadb_async_query(sql, query, GetPlayerTime, v) &lt;br /&gt;
           end&lt;br /&gt;
       end &lt;br /&gt;
   end, 15000, player)&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPackageStart&amp;quot;, GetCurrentPlayTime)&lt;br /&gt;
&lt;br /&gt;
function GetPlayerTime(player)&lt;br /&gt;
	local result = mariadb_get_assoc(1)&lt;br /&gt;
	local playtime = math.tointeger(result[&#039;time&#039;]) -- total time played on the server without session time.&lt;br /&gt;
	PlayerData[player].time = math.floor(PlayerData[player].time + (GetTimeSeconds() - PlayerData[player].play_time)) -- session play time.&lt;br /&gt;
	PlayerData[player].play_time = GetTimeSeconds()&lt;br /&gt;
	return PlayerData[player].time + playtime -- returns the total play time on the server.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetTime&amp;diff=3757</id>
		<title>GetTime</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetTime&amp;diff=3757"/>
		<updated>2020-01-25T01:33:03Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Get the client game time.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|GetTime()}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncNoParam}}&lt;br /&gt;
&lt;br /&gt;
{{FuncReturnValue|Returns the current game time as a floating point number.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
function OnPlayerSpawn()&lt;br /&gt;
	AddPlayerChat(&amp;quot;You loaded into the server in &amp;quot;..GetTime()..&amp;quot; seconds.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPlayerSpawn&amp;quot;, OnPlayerSpawn)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
* [[SetTime]]&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=GetTimeSeconds&amp;diff=3756</id>
		<title>GetTimeSeconds</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=GetTimeSeconds&amp;diff=3756"/>
		<updated>2020-01-25T00:29:33Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: &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 server 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 server started.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;gt;&lt;br /&gt;
AddCommand(&amp;quot;uptime&amp;quot;, function(player)&lt;br /&gt;
	if GetTimeSeconds() &amp;gt; 3600 then&lt;br /&gt;
		AddPlayerChat(player, &amp;quot;The server has been up for &amp;quot;..FormatTime(GetTimeSeconds())..&amp;quot; hours.&amp;quot;)&lt;br /&gt;
	elseif GetTimeSeconds() &amp;gt; 60 then&lt;br /&gt;
		AddPlayerChat(player, &amp;quot;The server has been up for &amp;quot;..FormatTime(GetTimeSeconds())..&amp;quot; minutes.&amp;quot;)&lt;br /&gt;
	else&lt;br /&gt;
		AddPlayerChat(player, &amp;quot;The server has been up for &amp;quot;..FormatTime(GetTimeSeconds())..&amp;quot; seconds.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function FormatTime(seconds)&lt;br /&gt;
	local seconds = tonumber(seconds)&lt;br /&gt;
  &lt;br /&gt;
	if seconds &amp;lt;= 0 then&lt;br /&gt;
		return &amp;quot;00:00:00&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		hours = string.format(&amp;quot;%02.f&amp;quot;, math.floor(seconds / 3600));&lt;br /&gt;
		mins = string.format(&amp;quot;%02.f&amp;quot;, math.floor(seconds / 60 - (hours * 60)));&lt;br /&gt;
		secs = string.format(&amp;quot;%02.f&amp;quot;, math.floor(seconds - hours * 3600 - mins * 60));&lt;br /&gt;
		return hours..&amp;quot;:&amp;quot;..mins..&amp;quot;:&amp;quot;..secs&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
__EDIT_ME__&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=OnPlayerDeath&amp;diff=3755</id>
		<title>OnPlayerDeath</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=OnPlayerDeath&amp;diff=3755"/>
		<updated>2020-01-24T22:46:40Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Event|Server &amp;amp; Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Calls when a player dies by any means possible. If the player wasn&#039;t killed by another player, instigator will be the same as the player.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|OnPlayerDeath(player, instigator)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|player|The player that has died.}}&lt;br /&gt;
{{FuncParam|instigator|The player who is responsible for the death.}}&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 OnPlayerDeath(player, instigator)&lt;br /&gt;
    if player == instigator then &lt;br /&gt;
	AddPlayerChat(player, &#039;&amp;lt;span color=&amp;quot;#ff0000&amp;quot;&amp;gt;You have killed yourself.&amp;lt;/&amp;gt;&#039;)&lt;br /&gt;
      else&lt;br /&gt;
        AddPlayerChat(player, &#039;&amp;lt;span color=&amp;quot;#ff0000&amp;quot;&amp;gt;You were killed by &#039;..GetPlayerName(instigator)..&#039;.&amp;lt;/&amp;gt;&#039;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
AddEvent(&amp;quot;OnPlayerDeath&amp;quot;, OnPlayerDeath)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{PlayerEvents}}&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=http_set_port&amp;diff=3754</id>
		<title>http set port</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=http_set_port&amp;diff=3754"/>
		<updated>2020-01-24T22:26:32Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0.3}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Sets the port of this request. For HTTP this should be 80, for HTTPS 443.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|http_set_port(http, port)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|http|The http identifier.}}&lt;br /&gt;
{{FuncParam|port|The port of the remote server.}}&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 test_post()&lt;br /&gt;
	local r = http_create()&lt;br /&gt;
	http_set_resolver_protocol(r, &amp;quot;ipv4&amp;quot;)&lt;br /&gt;
	http_set_protocol(r, &amp;quot;http&amp;quot;)&lt;br /&gt;
	http_set_host(r, &amp;quot;ptsv2.com&amp;quot;)&lt;br /&gt;
	http_set_port(r, 80)&lt;br /&gt;
	http_set_target(r, &amp;quot;/t/ozoab-1577627726/post&amp;quot;)&lt;br /&gt;
	http_set_verb(r, &amp;quot;post&amp;quot;)&lt;br /&gt;
	http_set_timeout(r, 30)&lt;br /&gt;
	http_set_version(r, 11)&lt;br /&gt;
	http_set_keepalive(r, true)&lt;br /&gt;
	http_set_field(r, &amp;quot;user-agent&amp;quot;, &amp;quot;Onset Server &amp;quot;..GetGameVersionString())&lt;br /&gt;
	&lt;br /&gt;
	local body = &amp;quot;&amp;quot;&lt;br /&gt;
	body = body..&amp;quot;foo1=&amp;quot;..url_encode(&amp;quot;bar?&amp;quot;)&lt;br /&gt;
	body = body..&amp;quot;foo2=&amp;quot;..url_encode(&amp;quot;?d,_:%bar2?&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	http_set_body(r, body)&lt;br /&gt;
	http_set_field(r, &amp;quot;content-length&amp;quot;, string.len(body))&lt;br /&gt;
	http_set_field(r, &amp;quot;content-type&amp;quot;, &amp;quot;application/x-www-form-urlencoded; charset=utf-8&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	if http_send(r, OnPostComplete, 1, 3.14, &amp;quot;OK s&amp;quot;) == false then&lt;br /&gt;
		print(&amp;quot;HTTP REQ NOT SENT :(&amp;quot;)&lt;br /&gt;
		http_destroy(r)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function OnPostComplete(a, b, c)&lt;br /&gt;
	print(&amp;quot;OnPostComplete&amp;quot;, a, b, c)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{HttpFunctions}}&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=http_set_host&amp;diff=3753</id>
		<title>http set host</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=http_set_host&amp;diff=3753"/>
		<updated>2020-01-24T22:24:53Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Function|Server|1.0.3}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|Sets the host of this request which is basically the domain or IP of the remote end.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|http_set_host(http, host)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|http|The http identifier.}}&lt;br /&gt;
{{FuncParam|host|The remote host.}}&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 test_post()&lt;br /&gt;
	local r = http_create()&lt;br /&gt;
	http_set_resolver_protocol(r, &amp;quot;ipv4&amp;quot;)&lt;br /&gt;
	http_set_protocol(r, &amp;quot;http&amp;quot;)&lt;br /&gt;
	http_set_host(r, &amp;quot;ptsv2.com&amp;quot;)&lt;br /&gt;
	http_set_port(r, 80)&lt;br /&gt;
	http_set_target(r, &amp;quot;/t/ozoab-1577627726/post&amp;quot;)&lt;br /&gt;
	http_set_verb(r, &amp;quot;post&amp;quot;)&lt;br /&gt;
	http_set_timeout(r, 30)&lt;br /&gt;
	http_set_version(r, 11)&lt;br /&gt;
	http_set_keepalive(r, true)&lt;br /&gt;
	http_set_field(r, &amp;quot;user-agent&amp;quot;, &amp;quot;Onset Server &amp;quot;..GetGameVersionString())&lt;br /&gt;
	&lt;br /&gt;
	local body = &amp;quot;&amp;quot;&lt;br /&gt;
	body = body..&amp;quot;foo1=&amp;quot;..url_encode(&amp;quot;bar?&amp;quot;)&lt;br /&gt;
	body = body..&amp;quot;foo2=&amp;quot;..url_encode(&amp;quot;?d,_:%bar2?&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	http_set_body(r, body)&lt;br /&gt;
	http_set_field(r, &amp;quot;content-length&amp;quot;, string.len(body))&lt;br /&gt;
	http_set_field(r, &amp;quot;content-type&amp;quot;, &amp;quot;application/x-www-form-urlencoded; charset=utf-8&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	if http_send(r, OnPostComplete, 1, 3.14, &amp;quot;OK s&amp;quot;) == false then&lt;br /&gt;
		print(&amp;quot;HTTP REQ NOT SENT :(&amp;quot;)&lt;br /&gt;
		http_destroy(r)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function OnPostComplete(a, b, c)&lt;br /&gt;
	print(&amp;quot;OnPostComplete&amp;quot;, a, b, c)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{HttpFunctions}}&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
	<entry>
		<id>https://dev.playonset.com/index.php?title=OnPlayWeaponHitEffects&amp;diff=3721</id>
		<title>OnPlayWeaponHitEffects</title>
		<link rel="alternate" type="text/html" href="https://dev.playonset.com/index.php?title=OnPlayWeaponHitEffects&amp;diff=3721"/>
		<updated>2020-01-24T16:43:26Z</updated>

		<summary type="html">&lt;p&gt;REDRUM: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Info|Event|Client|1.0}}&lt;br /&gt;
&lt;br /&gt;
{{FuncDescription|This event handles visual effects of weapons. The Weapons.lua contains a pre-configured event that shows the same visual hit effects as always. It is called for local and remote players. If it is called for remote players the parameters will contain the synced values from the other client.}}&lt;br /&gt;
&lt;br /&gt;
{{FuncSyntax|OnPlayWeaponHitEffects(PlayerId, Weapon, HitType, HitId, StartLocation, HitLocation, HitLocationRelative, HitNormal, HitResult)}}&lt;br /&gt;
&lt;br /&gt;
{{FuncParameters}}&lt;br /&gt;
{{FuncParam|PlayerId|The player identifier.}}&lt;br /&gt;
{{FuncParam|Weapon|The weapon instance.}}&lt;br /&gt;
{{FuncParam|HitType|https://dev.playonset.com/wiki/HitType}}&lt;br /&gt;
{{FuncParam|HitId|The identifier of the hit entity.}}&lt;br /&gt;
{{FuncParam|StartLocation|Trace start location of this bulet/hit.}}&lt;br /&gt;
{{FuncParam|HitLocation|Trace hit location.}}&lt;br /&gt;
{{FuncParam|HitLocationRelative|Hit location relative to the entity that was hit.}}&lt;br /&gt;
{{FuncParam|HitNormal|Bullet impact normal.}}&lt;br /&gt;
{{FuncParam|HitResult|Line trace result.}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Lua&amp;quot;&amp;gt;&lt;br /&gt;
AddEvent(&amp;quot;OnPlayWeaponHitEffects&amp;quot;, function (PlayerId, Weapon, HitType, HitId, StartLocation, HitLocation, HitLocationRelative, HitNormal, HitResult)&lt;br /&gt;
&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{RelatedFunctions}}&lt;br /&gt;
{{PlayerClientEvents}}&lt;/div&gt;</summary>
		<author><name>REDRUM</name></author>
	</entry>
</feed>