Show Killer Name
#1

If I killed 6 players it says Deathmatch: Blablah (ID: 4) is on Wanted Level 6!

But Killer name won't show after he got killed.

Код:
"Deathmatch: Revenge (ID: 2) has ended Killern (ID: 4) 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 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);
    }
pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#2

Everything seems fine. It should be working.
Reply
#3

As i see it...its working.
Reply
#4

Try this stock
pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return 1;
}
If that doesnt works,try this
pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(killerid, name, sizeof(name));
    return name;
}
Reply
#5

It must work good, hmm...
Reply
#6

I'm sorry it's not coz I tried it with another laptop. Tried to Kill 6 times and Kill the killer and nothing...
You could try it ingame. Just read my signature..
Reply
#7

Quote:
Originally Posted by [xB]Lordz
Посмотреть сообщение
Try this stock
pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return 1;
}
If that doesnt works,try this
pawn Код:
stock GetPName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(killerid, name, sizeof(name));
    return name;
}
Код:
undefined symbol "killerid"
symbol is never used: "playerid"
I guess there is something wrong...
Reply
#8

You used
pawn Код:
if(GetPlayerWantedLevel(killerid) >= 6)
inside
pawn Код:
if(GetPlayerWantedLevel(killerid) < 6)
this will not work
How could his wanted level be higher than 6 and lower than 6 at same time?
Reply
#9

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
You used
pawn Код:
if(GetPlayerWantedLevel(killerid) >= 6)
inside
pawn Код:
if(GetPlayerWantedLevel(killerid) < 6)
this will not work
How could his wanted level be higher than 6 and lower than 6 at same time?
Ohh.. I just realized that. Then What should I do next?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)