Text OnPlayerDeath
#1

Hello, here something I don't understand

In my onplayerdeath callback, I got this :


Код:
if(GetPlayerWeapon(killerid)==34) return 0;
format(string, sizeof(string), ">> "COL_LIGHTBLUE"%s "COL_WHITE"Died", playername);
SendClientMessageToAll(COL_WHITE ,string);
But when the player is killed by a sniper, it show - "Player" Died.

I tryed some other things like "return 1;" and

Код:
if(GetPlayerWeapon(killerid)==34)
{
    "Text"
}
else
{
    "Text"
}
But still don't work : /

I don't know how to use GetPlayerWeapon -,-
Reply
#2

And you want it to show?
Reply
#3

Quote:
Originally Posted by maramizo
Посмотреть сообщение
And you want it to show?
Already got the part of code I wan't to use for snipers, I just ask how to not display the "died" message when killed by a sniper.
Reply
#4

Remove that line.
pawn Код:
SendClientMessageToAll(COL_WHITE ,string);
Reply
#5

Seriously, if it isnt a joke, get a brain.. -,-

I need to do something like this :


Код:
if(GetPlayerWeapon(killerid)==34)
{
    format(string, sizeof(string), ">> "COL_LIGHTBLUE"%s "COL_WHITE"Sniped "COL_LIGHTBLUE"%s", killername, playername);
    SendClientMessageToAll(COL_WHITE, string);
}
else
{
    format(string, sizeof(string), ">> "COL_LIGHTBLUE"%s "COL_WHITE"Died", playername);
    SendClientMessageToAll(COL_WHITE, string);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)