<?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=CowTurbo</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=CowTurbo"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/CowTurbo"/>
	<updated>2026-05-02T09:33:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MakePedUseGun&amp;diff=24111</id>
		<title>MakePedUseGun</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MakePedUseGun&amp;diff=24111"/>
		<updated>2010-07-27T15:39:45Z</updated>

		<summary type="html">&lt;p&gt;CowTurbo: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to force a ped to use a gun.&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 makePedUseGun ( ped thePed, int useType, element target )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' The [[ped]] you wish to force the use of a gun upon.&lt;br /&gt;
*'''useType:''' How the weapon should be used, will accept the following values:&lt;br /&gt;
** '''0:''' Do nothing&lt;br /&gt;
** '''1:''' Aim weapon&lt;br /&gt;
** '''2:''' Fire&lt;br /&gt;
** '''3:''' Burst-fire&lt;br /&gt;
** '''4:''' Reload&lt;br /&gt;
** '''5:''' Pistolwhip (Weapon melee)&lt;br /&gt;
** '''6:''' Cancel use&lt;br /&gt;
** '''7:''' Cancel use immediately&lt;br /&gt;
*'''target:''' An [[element]] referring to the target that the ped will use its weapon against. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the command was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This Example creates a ped and target ped to map, and ped gonna kill target ped&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createPed ()&lt;br /&gt;
  ped = createPed ( 87, 0, 0, 5 ) -- Create our ped..&lt;br /&gt;
  givePlayerWeapon ( ped, 31, 200 ) -- guve our ped weapon&lt;br /&gt;
  pedtarget = createPed ( 88, 0, 3, 5 ) -- Create our target ped..&lt;br /&gt;
  makePedUseGun ( ped, 2, pedtarget ) -- and make ped to kill pedTarget&lt;br /&gt;
end -- end function createPed&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()), createPed ) -- attach event to function createped&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
[[Category:Needs_Example]]&lt;/div&gt;</summary>
		<author><name>CowTurbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MakePedUseGun&amp;diff=24110</id>
		<title>MakePedUseGun</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MakePedUseGun&amp;diff=24110"/>
		<updated>2010-07-27T15:38:34Z</updated>

		<summary type="html">&lt;p&gt;CowTurbo: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to force a ped to use a gun.&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 makePedUseGun ( ped thePed, int useType, element target )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' The [[ped]] you wish to force the use of a gun upon.&lt;br /&gt;
*'''useType:''' How the weapon should be used, will accept the following values:&lt;br /&gt;
** '''0:''' Do nothing&lt;br /&gt;
** '''1:''' Aim weapon&lt;br /&gt;
** '''2:''' Fire&lt;br /&gt;
** '''3:''' Burst-fire&lt;br /&gt;
** '''4:''' Reload&lt;br /&gt;
** '''5:''' Pistolwhip (Weapon melee)&lt;br /&gt;
** '''6:''' Cancel use&lt;br /&gt;
** '''7:''' Cancel use immediately&lt;br /&gt;
*'''target:''' An [[element]] referring to the target that the ped will use its weapon against. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the command was successful, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This page lacks an example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--add an example here&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function createPed ()&lt;br /&gt;
  ped = createPed ( 87, 0, 0, 5 ) -- Create our ped..&lt;br /&gt;
  givePlayerWeapon ( ped, 31, 200 ) -- guve our ped weapon&lt;br /&gt;
  pedtarget = createPed ( 88, 0, 3, 5 ) -- Create our target ped..&lt;br /&gt;
  makePedUseGun ( ped, 2, pedtarget ) -- and make ped to kill pedTarget&lt;br /&gt;
end -- end function createPed&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()), createPed ) -- attach event to function createped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
[[Category:Needs_Example]]&lt;/div&gt;</summary>
		<author><name>CowTurbo</name></author>
	</entry>
</feed>