07.03.2013, 13:38
Well, first, when a player kills another player, the kill appears twice in the kill list, but I haven't got any SendDeathMessage in my gamemode.
public OnPlayerDeath(playerid, killerid, reason) { SetPlayerColor(playerid, 0x00000059); new killer_msg[200]; new Float:health, Float:armour; GetPlayerHealth(killerid,health); GetPlayerArmour(killerid,armour); if(gTeam[killerid] == 1) { format(killer_msg,200,"{0000FF}%s {FFFFFF}killed {DC143C}%s {FFFFFF}(HP: %d / %.1f ft / Weapon: %s)",GetName(killerid), GetName(playerid), floatround(health+armour),GetDistanceBetweenPlayers(killerid, playerid), GetWepName(reason)); SendClientMessageToAll(-1, killer_msg); } else if(gTeam[killerid] == 2) { format(killer_msg,200,"{DC143C}%s {FFFFFF}killed {0000FF}%s {FFFFFF}(HP: %d / %.1f ft / Weapon: %s)",GetName(killerid), GetName(playerid), floatround(health+armour),GetDistanceBetweenPlayers(killerid, playerid), GetWepName(reason)); SendClientMessageToAll(-1, killer_msg); } new playerid2; new string[100]; new name[MAX_PLAYER_NAME]; GivePlayerMoney(killerid, 1000); pInfo[playerid][pDeaths]++; pInfo[killerid][pKills]++; killsround[killerid]++; deathsround[playerid]++; if(IsBeingSpeced[playerid] == 1) { for(new i=0;i<MAX_PLAYERS;++i) { if(spectatorid[i] == playerid) { TogglePlayerSpectating(i,false); } } } if(gTeam[killerid] == TEAM1) { Team1Kills++; } else if(gTeam[killerid] == TEAM2) { Team2Kills++; } return 1; }
public OnPlayerDeath(playerid, killerid, reason) { SetPlayerColor(playerid, 0x00000059); new killer_msg[200]; new Float:health, Float:armour; GetPlayerHealth(killerid,health); GetPlayerArmour(killerid,armour); if(gTeam[killerid] == 1) { format(killer_msg,200,"{0000FF}%s {FFFFFF}killed {DC143C}%s {FFFFFF}(HP: %d / %.1f ft / Weapon: %s)",GetName(killerid), GetName(playerid), floatround(health+armour),GetDistanceBetweenPlayers(killerid, playerid), GetWepName(reason)); SendClientMessageToAll(-1, killer_msg); } else if(gTeam[killerid] == 2) { format(killer_msg,200,"{DC143C}%s {FFFFFF}killed {0000FF}%s {FFFFFF}(HP: %d / %.1f ft / Weapon: %s)",GetName(killerid), GetName(playerid), floatround(health+armour),GetDistanceBetweenPlayers(killerid, playerid), GetWepName(reason)); SendClientMessageToAll(-1, killer_msg); } new playerid2; new string[100]; new name[MAX_PLAYER_NAME]; GivePlayerMoney(killerid, 1000); pInfo[playerid][pDeaths]++; pInfo[killerid][pKills]++; killsround[killerid]++; deathsround[playerid]++; if(IsBeingSpeced[playerid] == 1) { for(new i=0;i<MAX_PLAYERS;++i) { if(spectatorid[i] == playerid) { TogglePlayerSpectating(i,false); } } } if(gTeam[killerid] == TEAM1) { Team1Kills++; } else if(gTeam[killerid] == TEAM2) { Team2Kills++; } return 1; }