[PROBLEM] SendDeathMessage
#1

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.
Reply
#2

Can I see the OnPlayerDeath CallBack?
Reply
#3

Код:
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;
    }
Reply
#4

It sends the message as SendDeathMessage? ( kill list )
If yes.. I have no idea what to do - sorry.
Reply
#5

filterscripts.
Reply
#6

Nope, I saw all the filterscripts, and nothing..
Reply
#7

Where do u put SendDeathMessage at the top of OnPlayerDeath or the bottom also have you tried killing someone without putting SendDeathMessage and still show the death list?
Reply
#8

I tried it, I deleted SendDeathMessage from the gamemode, and when I killed other player the kill appears 2 times..
Reply
#9

can you show us the WHOLE OnPlayerDeath? cause what you showed above doesnt appear that it's the whole one...
Reply
#10

This is all..

Код:
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;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)