Squirrel/Client/Functions/Players/RemoveLimb
From Liberty Unleashed Wiki
(Difference between revisions)
(→Arguments) |
(→Arguments) |
||
Line 5: | Line 5: | ||
<code>g_LocalPlayer.RemoveLimb( int Bodypart )</code> | <code>g_LocalPlayer.RemoveLimb( int Bodypart )</code> | ||
− | == | + | == Example == |
+ | <code lang="squirrel"> | ||
g_LocalPlayer <- FindLocalPlayer(); | g_LocalPlayer <- FindLocalPlayer(); | ||
Line 25: | Line 26: | ||
return 1; | return 1; | ||
} | } | ||
+ | </code> |
Revision as of 13:48, 10 August 2013
This function allows you to remove one of the client's limbs.
Syntax
g_LocalPlayer.RemoveLimb( int Bodypart )
Example
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; }