<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mabakoe</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mabakoe"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Mabakoe"/>
	<updated>2026-04-20T04:17:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=33715</id>
		<title>KickPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=33715"/>
		<updated>2012-10-07T01:38:30Z</updated>

		<summary type="html">&lt;p&gt;Mabakoe: removed the note about optional parameters, as this is exactly wrong for kickPlayer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will kick the specified player from the server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool kickPlayer ( player kickedPlayer, [ player responsiblePlayer, string reason = &amp;quot;&amp;quot; ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''or''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool kickPlayer ( player kickedPlayer, [ string reason = &amp;quot;&amp;quot; ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''kickedPlayer:''' The player that will be kicked from the server&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''responsiblePlayer:''' The player that is responsible for the event. '''Note''': If left out as in the second syntax, responsible player for the kick will be &amp;quot;Console&amp;quot; (Maximum 30 characters if using a string).&lt;br /&gt;
*'''reason:''' The reason for the kick.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was kicked succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example lets a player kick anyone who has a lower level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason )&lt;br /&gt;
	-- Get player element from the name&lt;br /&gt;
	local kicked = getPlayerFromName ( kickedname )&lt;br /&gt;
	-- If the client who sent the command has a higher level&lt;br /&gt;
	if ( hasObjectPermissionTo ( sourcePlayer, &amp;quot;function.kickPlayer&amp;quot; ) ) then&lt;br /&gt;
		-- Kick the player&lt;br /&gt;
		kickPlayer ( kicked, sourcePlayer, reason )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- Add the &amp;quot;kick&amp;quot; command handler&lt;br /&gt;
addCommandHandler ( &amp;quot;kick&amp;quot;, kickPlayerHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[es:kickPlayer]]&lt;br /&gt;
[[ru:kickPlayer]]&lt;/div&gt;</summary>
		<author><name>Mabakoe</name></author>
	</entry>
</feed>