OneShotOneKill
#1

public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)
{
SetPlayerHealth(Target,0);
SetPlayerArmour(Target,0);
return 1;
}

Hey guys I have this small script where making that 1 shot is enough to kill a player, but the problem is that it works for all guns can some one help me to make if only for gun id 33 and 34 please?
Reply
#2

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    if(GetPlayerWeapon(Shooter)==33||GetPlayerWeapon(Shooter)==34){
    SetPlayerHealth(Target,0);
    SetPlayerArmour(Target,0);
    }
    return 1;
}
Reply
#3

Just set their health to 1 when they spawn..
Reply
#4

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
        if(weaponid == 33 || weaponid == 34 )
            SetPlayerHealth( playerid, 0 );
    return 1;
}
Maybe?
Reply
#5

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
   
    if(weaponid == 33 || weaponid == 34) SetPlayerHealth(playerid, 0.0);
    return 1;
}
EDIT: Damn,too slow.
Reply


Forum Jump:


Users browsing this thread: