<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.vc-mp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Umar4911</id>
	<title>Vice City Multiplayer - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.vc-mp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Umar4911"/>
	<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/wiki/Special:Contributions/Umar4911"/>
	<updated>2026-05-23T18:34:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.IsSpawned&amp;diff=20246</id>
		<title>Scripting/Squirrel/Functions/Player.IsSpawned</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.IsSpawned&amp;diff=20246"/>
		<updated>2019-05-21T10:05:19Z</updated>

		<summary type="html">&lt;p&gt;Umar4911: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is used to check if the player is spawned or not.&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;player.IsSpawned&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=squirrel&amp;gt;&lt;br /&gt;
function onPlayerCommand( player, cmd, text ); &lt;br /&gt;
    if ( cmd == &amp;quot;checkspawn&amp;quot; )&lt;br /&gt;
    {&lt;br /&gt;
          local plr = FindPlayer( text );&lt;br /&gt;
 &lt;br /&gt;
          if ( !plr ) PrivMessage( &amp;quot;Player: &#039;&amp;quot; + text + &amp;quot;&#039; not online&amp;quot;, player );&lt;br /&gt;
          else if ( plr.IsSpawned ) PrivMessage( plr.Name + &amp;quot; has already chosen skin.&amp;quot;, player );&lt;br /&gt;
          else PrivMessage( plr.Name + &amp;quot; He did not choose this skin.&amp;quot;, player );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Functions ==&lt;br /&gt;
&lt;br /&gt;
{{Scripting/Squirrel/Functions/Player_Functions}}&lt;br /&gt;
[[Category:Scripting/Squirrel/Functions/Player_Functions]]&lt;/div&gt;</summary>
		<author><name>Umar4911</name></author>
	</entry>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.Ammo&amp;diff=20245</id>
		<title>Scripting/Squirrel/Functions/Player.Ammo</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.Ammo&amp;diff=20245"/>
		<updated>2019-05-21T10:03:35Z</updated>

		<summary type="html">&lt;p&gt;Umar4911: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is used to get the amount of ammo of the weapon the player is holding.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;player.Ammo&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=squirrel&amp;gt;&lt;br /&gt;
function onPlayerCommand( player, cmd, text );&lt;br /&gt;
	if ( cmd == &amp;quot;ammo&amp;quot; )&lt;br /&gt;
	{&lt;br /&gt;
	MessagePlayer( &amp;quot; Your Ammo &amp;quot; + player.Ammo , player );&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Functions ==&lt;br /&gt;
&lt;br /&gt;
{{Scripting/Squirrel/Functions/Player_Functions}}&lt;br /&gt;
[[Category:Scripting/Squirrel/Functions/Player_Functions]]&lt;/div&gt;</summary>
		<author><name>Umar4911</name></author>
	</entry>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Vehicle.Driver&amp;diff=20112</id>
		<title>Scripting/Squirrel/Functions/Vehicle.Driver</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Vehicle.Driver&amp;diff=20112"/>
		<updated>2017-11-24T09:36:42Z</updated>

		<summary type="html">&lt;p&gt;Umar4911: Created page with &amp;quot;This function will tell the name of the car driver.  == Syntax ==  &amp;lt;pre&amp;gt;Vehicle.Driver()&amp;lt;/pre&amp;gt;  == Example ==  &amp;lt;source lang=&amp;quot;squirrel&amp;quot;&amp;gt; function onPlayerCommand( player, cmd,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function will tell the name of the car driver.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Vehicle.Driver()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;squirrel&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerCommand( player, cmd, text )&lt;br /&gt;
{&lt;br /&gt;
	if(cmd == &amp;quot;driver&amp;quot;)&lt;br /&gt;
	{&lt;br /&gt;
		if(!text) MessagePlayer(&amp;quot;Syntax Error - Syntax: /driver &amp;lt;vehicle ID&amp;gt;&amp;quot;, player);&lt;br /&gt;
		else if(!IsNum(text)) MessagePlayer(&amp;quot;Error - ID must be integer&amp;quot;, player);&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			local veh = FindVehicle(text.tointeger());&lt;br /&gt;
			if(!veh) MessagePlayer(&amp;quot;Unknown Vehicle&amp;quot;, player);&lt;br /&gt;
			else if(!veh.Driver) MessagePlayer(&amp;quot;There is no driver in the vehicle&amp;quot;, player);&lt;br /&gt;
			else if(veh.Driver == player.Name) MessagePlayer(&amp;quot;You are the driver&amp;quot;, player);&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				MessagePlayer(veh.Driver + &amp;quot; is driving the vehicle&amp;quot;, player);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Call [[Scripting/Squirrel/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages.&lt;br /&gt;
&lt;br /&gt;
== Related Functions ==&lt;br /&gt;
{{Scripting/Squirrel/Functions/Vehicle_Functions}}&lt;br /&gt;
[[Category:Scripting/Squirrel/Functions/Vehicle_Functions]]&lt;/div&gt;</summary>
		<author><name>Umar4911</name></author>
	</entry>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.SetWeapon&amp;diff=20111</id>
		<title>Scripting/Squirrel/Functions/Player.SetWeapon</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Functions/Player.SetWeapon&amp;diff=20111"/>
		<updated>2017-11-24T09:06:20Z</updated>

		<summary type="html">&lt;p&gt;Umar4911: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;pre&amp;gt;player.SetWeapon( weaponID, Ammo );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;squirrel&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerCommand( player, cmd, text )&lt;br /&gt;
{&lt;br /&gt;
 if( cmd == &amp;quot;wep&amp;quot; || cmd == &amp;quot;we&amp;quot; )&lt;br /&gt;
{&lt;br /&gt;
 if( !text ) return MessagePlayer( &amp;quot;[#FF0000]/wep &amp;lt;wep 1&amp;gt; &amp;lt;wep 2&amp;gt; &amp;lt;...&amp;gt;&amp;quot;, player );&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
  local params = split( text, &amp;quot; &amp;quot; ); // Take out the space array&lt;br /&gt;
  local weapons; // Create a new null variable which will be holding the list of weapons player took.&lt;br /&gt;
  for( local i = 0; i &amp;lt;= params.len() - 1; i++ ) // since the &#039;len&#039; returns value from 1 and array&#039;s starting value point is 0, we will use len() - 1 otherwise we&#039;ll receive an error.&lt;br /&gt;
  {&lt;br /&gt;
   if( !IsNum( params[i] ) &amp;amp;&amp;amp; GetWeaponID( params[i] ) &amp;amp;&amp;amp; GetWeaponID( params[i] ) &amp;gt; 0 &amp;amp;&amp;amp; GetWeaponID( params[i] ) &amp;lt;= 32 ) // if Name was specified. &lt;br /&gt;
   {&lt;br /&gt;
    player.SetWeapon( GetWeaponID( params[i] ), 99999 ); // Get the weapon ID from its Name&lt;br /&gt;
    weapons = weapons + &amp;quot;, &amp;quot; + GetWeaponName( GetWeaponID( params[i] ) ); // Add the weapon name to given weapon list&lt;br /&gt;
   }&lt;br /&gt;
   else if( IsNum( params[i] ) &amp;amp;&amp;amp; params[i].tointeger() &amp;lt; 33 &amp;amp;&amp;amp; params[i].tointeger() &amp;gt; 0 ) // if ID was specified&lt;br /&gt;
   {&lt;br /&gt;
    player.SetWeapon( params[i].tointeger(), 99999 ); // Then just give player that weapon&lt;br /&gt;
    weapons = weapons + &amp;quot;, &amp;quot; + GetWeaponName( params[i].tointeger() ); // Get the weapon name from the ID and add it.&lt;br /&gt;
   }&lt;br /&gt;
   else MessagePlayer( &amp;quot;[#FF0000]Invalid Weapon Name/ID!&amp;quot;, player ); // if the invalid ID/Name was given&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  if( weapons != null ) MessagePlayer( &amp;quot;[#00FF00]Received weapons: [#FFFFFF]&amp;quot; + weapons );&lt;br /&gt;
  else MessagePlayer( &amp;quot;[#FF0000]No weapons specified&amp;quot;, player );&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related Functions ==&lt;br /&gt;
&lt;br /&gt;
{{Scripting/Squirrel/Functions/Player Functions}}&lt;br /&gt;
[[Category:Scripting/Squirrel/Functions/Player_Functions]]&lt;/div&gt;</summary>
		<author><name>Umar4911</name></author>
	</entry>
</feed>