28.03.2013, 20:56
Few braces with a different angle.
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && IsPlayerConnectedEx(issuerid))
{
if(tazer_out[issuerid])
{
if(GetPlayerWeapon(issuerid) == WEAPON_SILENCED)
{
if(GetDistanceBetweenPlayers(issuerid,playerid) < 10.0)
{
TazePlayer(issuerid,playerid);
}
}
}
}
if(issuerid != INVALID_PLAYER_ID)
{
if(amount > 5.0 && weaponid != 0)
{
new Float:armor;
GetPlayerArmour(playerid,armor);
if(armor <= 0.0)
{
//TextDrawShowForPlayer(playerid,crash_screen);
//SetTimerEx("HideCrash",250,0,"i",playerid);
//SetPlayerDrunkLevel(playerid,(GetPlayerDrunkLevel(playerid) + 4000));
}
}
}
if(issuerid == INVALID_PLAYER_ID) return 1;
new Float:health,Float:armour;
GetPlayerHealth(playerid,health);
GetPlayerArmour(playerid,armour);
new damage = 0;
switch(weaponid)
{
case 22: damage = 58;
case 24: damage = 96;
case 25:
{
if(amount < 45) damage = floatround(amount);
else damage = 100 + floatround(amount);
}
case 27:
{
if(amount < 35) damage = floatround(amount);
else damage = 100 + floatround(amount);
}
case 28: damage = 16;
case 29: damage = 26;
case 30: damage = 49;
case 31: damage = 44;
case 32: damage = 16;
case 33: damage = 59;
case 34: damage = 341;
default: damage = floatround(amount);
}
return 1;
}