12.01.2013, 18:43
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
static
Float: szHealth
;
GetPlayerHealth(playerid,szHealth);
if(StrategyArmy == 1)
{
switch(weaponid)
{
case 31: SetPlayerHealth(playerid,szHealth-30);
case 24: SetPlayerHealth(playerid,szHealth-30);
case 35: SetPlayerHealth(playerid,szHealth-40);
}
}
if(StrategyArmy == 2)
{
switch(weaponid)
{
case 34: SetPlayerHealth(playerid,szHealth-60);
case 25: SetPlayerHealth(playerid,szHealth-30);
case 16: SetPlayerHealth(playerid,szHealth-70);
}
}
if(StrategyTerror == 1)
{
switch(weaponid)
{
case 31: SetPlayerHealth(playerid,szHealth-30);
case 24: SetPlayerHealth(playerid,szHealth-30);
case 35: SetPlayerHealth(playerid,szHealth-40);
}
}
if(StrategyTerror == 2)
{
switch(weaponid)
{
case 34: SetPlayerHealth(playerid,szHealth-60);
case 25: SetPlayerHealth(playerid,szHealth-30);
case 16: SetPlayerHealth(playerid,szHealth-70);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 4)
{
//One shot to kill with knife
SetPlayerHealth(playerid, 0.0);
}
return 1;
}