Scripting/Squirrel/Functions/Player.Disarm: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "if ( cmd == "disarm" ) { PrivMessage( player, "You've been disarmed"); player.Disarm(); }")
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function will disarm the player
== Syntax ==
<pre>player.Disarm();</pre>
== Example ==
<source lang=squirrel>
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "disarm" )
if ( cmd == "disarm" )
{
{
Line 4: Line 16:
player.Disarm();
player.Disarm();
}
}
}
</source>
== Related Functions ==
{{Scripting/Squirrel/Functions/Player_Functions}}
[[Category:Scripting/Squirrel/Functions/Player_Functions]]

Latest revision as of 18:47, 30 January 2017

This function will disarm the player


Syntax

player.Disarm();

Example

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "disarm" )
{
PrivMessage( player, "You've been disarmed"); 
player.Disarm();
}
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.