SA-MP Forums Archive
Text OnPlayerDeath - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text OnPlayerDeath (/showthread.php?tid=230008)



Text OnPlayerDeath - Shoko Lacho - 22.02.2011

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


Re: Text OnPlayerDeath - maramizo - 22.02.2011

And you want it to show?


Re : Re: Text OnPlayerDeath - Shoko Lacho - 22.02.2011

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.


Re: Text OnPlayerDeath - maramizo - 22.02.2011

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



Re : Text OnPlayerDeath - Shoko Lacho - 22.02.2011

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