SA-MP Forums Archive
Show Killer Name - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Show Killer Name (/showthread.php?tid=373175)



Show Killer Name - kbalor - 29.08.2012

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;
}



Re: Show Killer Name - Shetch - 29.08.2012

Everything seems fine. It should be working.


Re: Show Killer Name - [HK]Ryder[AN] - 29.08.2012

As i see it...its working.


Re: Show Killer Name - Lordzy - 29.08.2012

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;
}



Re: Show Killer Name - pasha97 - 29.08.2012

It must work good, hmm...


Re: Show Killer Name - kbalor - 29.08.2012

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..


Re: Show Killer Name - kbalor - 29.08.2012

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...


Re: Show Killer Name - HuSs3n - 29.08.2012

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?


Re: Show Killer Name - kbalor - 29.08.2012

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?