Squirrel/Client/Functions/Players/RemoveLimb

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "This function allows you to remove one of the client's limbs. == Syntax == <code>g_LocalPlayer.RemoveLimb( int Bodypart )</code> == Arguments == * '''bodyPart''' - The [[S...")
 
(Arguments)
Line 7: Line 7:
 
== Arguments ==
 
== Arguments ==
  
* '''bodyPart''' - The [[Squirrel/Server/Constants#Body Parts|ID of the body part]] you want to remove.
+
g_LocalPlayer <- FindLocalPlayer();
 +
 
 +
function onClientShot( pPlayer, iWeapon, iBodypart )
 +
{
 +
if ( g_LocalPlayer.Immune == false )
 +
{
 +
if ( iWeapon == WEP_EXPLOSION )
 +
{
 +
        g_LocalPlayer.RemoveLimb( BODYPART_LEFTARM );
 +
g_LocalPlayer.RemoveLimb( BODYPART_RIGHTARM );
 +
        g_LocalPlayer.RemoveLimb( BODYPART_LEFTLEG );
 +
g_LocalPlayer.RemoveLimb( BODYPART_HEAD );
 +
        g_LocalPlayer.RemoveLimb( BODYPART_RIGHTLEG );
 +
}
 +
}
 +
 +
return 1;
 +
}

Revision as of 13:46, 10 August 2013

This function allows you to remove one of the client's limbs.

Syntax

  1. g_LocalPlayer.RemoveLimb( int Bodypart )

Arguments

g_LocalPlayer <- FindLocalPlayer();

function onClientShot( pPlayer, iWeapon, iBodypart ) { if ( g_LocalPlayer.Immune == false ) { if ( iWeapon == WEP_EXPLOSION ) {

       g_LocalPlayer.RemoveLimb( BODYPART_LEFTARM );

g_LocalPlayer.RemoveLimb( BODYPART_RIGHTARM );

       g_LocalPlayer.RemoveLimb( BODYPART_LEFTLEG );

g_LocalPlayer.RemoveLimb( BODYPART_HEAD );

       g_LocalPlayer.RemoveLimb( BODYPART_RIGHTLEG );

} }

return 1; }

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox