format(string, sizeof(string), "%s (%i) Killed %s (%i) - %s (%s) From %0.2fm Away.", KillerName, issuerid, VictimName, playerid, WeaponName, bodypart, PfPDistance);
SendClientMessageToAll(playerid, 0x9D000096, string); // here is the error
SendClientMessageToAll(0x9D000096, string);
public OnPlayerDeath(playerid, killerid, reason) { DeadPlayer[playerid] = 0; SetPlayerColor(playerid, COLOR_DEAD); PlayerInfo[killerid][pKills]++; PlayerInfo[playerid][pDeaths]++; TextDrawHideForPlayer(playerid,Clock); TextDrawHideForPlayer(playerid, DaysOfWeek); TextDrawHideForPlayer(playerid, FpsAndPing[playerid]); TextDrawHideForPlayer(playerid, ZoneName[playerid]); HideTDs(playerid); return 1; } |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { new Floatldhealth; // victim health before taking damage GetPlayerHealth(playerid,oldhealth); // victim health before taking damage new currenthp = oldhealth - amount; // calculating current health after taking damage if(currenthp == 0.0) { new Float:kx, Float:ky, Float:kz, string[156], WeaponName[24], VictimName[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME]; // killer coordinates variables GetPlayerPos(issuerid, kx, ky, kz); // their positions and distance between them new Float: PfPDistance = GetPlayerDistanceFromPoint(playerid, kx, ky, kz); GetPlayerName(playerid, VictimName, sizeof (VictimName)); GetPlayerName(issuerid, KillerName, sizeof (KillerName)); GetWeaponName(weaponid, WeaponName, sizeof (WeaponName)); format(string, sizeof(string), "%s (%i) Killed %s (%i) - %s (%s) From %0.2fm Away.", KillerName, issuerid, VictimName, playerid, WeaponName, bodypart, PfPDistance); SendClientMessageToAll(playerid, 0x9D000096, string); } return 1; } |
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new string[128], weapon[32], killerName[MAX_PLAYER_NAME], playerName[MAX_PLAYER_NAME],
Float:pX, Float:pY, Float:pZ, Float: PfPDistance;
GetPlayerName(killerid, killerName, sizeof(killerName));
GetPlayerName(playerid, playerName, sizeof(playerName));
GetWeaponName(reason, weapon, sizeof(weapon));
GetPlayerPos(playerid, pX, pY, pZ);
PfPDistance = GetPlayerDistanceFromPoint(killerid, pX, pY, pZ);
format(string, sizeof(string), "%s (%i) Killed %s (%i) - %s From %0.2fm Away.", killerName, killerid, playerName, playerid, weapon, PfPDistance);
SendClientMessageToAll(0x9D000096, string);
//
PlayerInfo[killerid][pKills]++;
}
DeadPlayer[playerid] = 0;
SetPlayerColor(playerid, COLOR_DEAD);
PlayerInfo[playerid][pDeaths]++;
TextDrawHideForPlayer(playerid,Clock);
TextDrawHideForPlayer(playerid, DaysOfWeek);
TextDrawHideForPlayer(playerid, FpsAndPing[playerid]);
TextDrawHideForPlayer(playerid, ZoneName[playerid]);
HideTDs(playerid);
return 1;
}