23.01.2015, 00:15
Here's The Code.
I Cant Make SendDeathMessage Work.
I Cant Make SendDeathMessage Work.
pawn Код:
// OnPlayerSpawn
SetPlayerTeam(playerid, 5)
// OnPlayerDeath
if(pKillID[playerid] != INVALID_PLAYER_ID)
{
killerid = pKillID[playerid]; // 0
SendDeathMessage(killerid,playerid,GetPlayerWeapon(killerid)),
pKillID[playerid] = INVALID_PLAYER_ID;
}
// OnPlayerGiveDamage
if(damagedid != INVALID_PLAYER_ID)
{
new Float:health, Float:armour;
GetPlayerHealth(damagedid, health);
GetPlayerArmour(damagedid, armour);
if(armour > 0.0)
{
armour -= amount;
if(armour < 0.0) {
SetPlayerArmour(damagedid, 0.0);
if(health+(armour) <= 0.0) pKillID[damagedid] = playerid;
SetPlayerHealth(damagedid, health+(armour));
return true;
}
SetPlayerArmour(damagedid, armour);
}
else{
health -= amount;
if(health <= 0.0) pKillID[damagedid] = playerid;
SetPlayerHealth(damagedid, health);
}
}