Killername not showing.. - 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: Killername not showing.. (
/showthread.php?tid=371754)
Killername not showing.. -
kbalor - 24.08.2012
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);
}
Re: Killername not showing.. -
JaKe Elite - 24.08.2012
Show us your GetPName
Re: Killername not showing.. -
kbalor - 24.08.2012
I forgot
pawn Код:
stock GetPName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
Re: Killername not showing.. -
clarencecuzz - 24.08.2012
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);
}