29.01.2012, 02:43
Im making a script that, once somone shoots a person with the sniper, the persons health will be set to zero. I believe 0.3D has a function that lets me do so, if so, what is it?
/* Works only for 0.3d*/
public OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid )
{
if ( issuerid != INVALID_PLAYER_ID )
{
if ( GetPlayerWeapon( issuerid ) == 34 )
{
SetPlayerHealth( playerid, 0.0 );
SetPlayerArmour( playerid, 0.0 );
}
}
return 1;
}
Very simple!
pawn Код:
|