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
No edit summary
No edit summary
 
(6 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" )
{
{
PrivMessage( player, "You've been disarmed");  
PrivMessage( player, "You've been disarmed");  
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.