Killername not showing..
#1

The only works here is that when a Player reached wanted level 6 It shows
"Deathmatch: PlayerID (ID:2) is on Killing Spree Wanted Level 6!

But if someone Killed that wanted man or the dominating player
It doesn't show "Deathmatch: Playername (ID: 5) has ended PlayerID (ID: 2) Killing Spree!",

pawn Код:
if(GetPlayerWantedLevel(killerid) < 6)
    {
        SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
        if(GetPlayerWantedLevel(killerid) >= 6)
        {
            new str[128];
            format(str, sizeof(str), "Deathmatch: %s (ID: %d) is on Dominating with Wanted Level 6!", GetPName(killerid), killerid);
            SendClientMessageToAll(0xFF3300FF, str);
        }
    }
    if(GetPlayerWantedLevel(playerid) >= 6 && killerid != INVALID_PLAYER_ID)
    {
        new str[128];
        format(str, sizeof(str), "Deathmatch: %s (ID: %d) has ended %s (ID: %d) Killing Spree!", GetPName(killerid), killerid, GetPName(playerid), playerid);
        SendClientMessageToAll(0xFF3300FF, str);
    }
Reply
#2

Show us your GetPName
Reply
#3

I forgot

pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#4

Try:
pawn Код:
if(GetPlayerWantedLevel(playerid) >= 6 && IsPlayerConnected(killerid))
    {
        new str[128];
        format(str, sizeof(str), "Deathmatch: %s (ID: %d) has ended %s (ID: %d) Killing Spree!", GetPName(killerid), killerid, GetPName(playerid), playerid);
        SendClientMessageToAll(0xFF3300FF, str);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)