[FilterScript] [FS] Killer Info
#1

Shows info of the murderer :nick/xp/armour/with of the weapon has killed / from what distance



pawn Code:
#include <a_samp>
#define FILTERSCRIPT
#define DIALOG_RULES 2
#pragma tabsize 0
forward Float:GetDistanceBetweenPlayers(p1,p2);
stock Float:GetDistanceBetweenPlayers(p1,p2)
{
new Float:x11,Float:y11,Float:z11,Float:x3,Float:y3,Float:z3;
if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
{
return -1.00;
}
GetPlayerPos(p1,x11,y11,z11);
GetPlayerPos(p2,x3,y3,z3);
return floatsqroot(floatpower(floatabs(floatsub(x3,x11)),2)+floatpower(floatabs(floatsub(y3,y11)),2)+floatpower(floatabs(floatsub(z3,z11)),2));
}
public OnPlayerDeath(playerid, killerid, reason)
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && i != playerid)
{
new deathreason[20];
new PlayerNamea[30];
new string[256];
new Float:h;
new Float:a;
new n[30];
new msg[150];
GetPlayerHealth(killerid,h);
GetPlayerArmour(killerid,a);
GetPlayerName(killerid,n,30);
GetWeaponName(reason,deathreason, 20);
//if(killerid != INVALID_PLAYER_ID && reason != 255)
//{
//}
//else{
format(PlayerNamea,sizeof PlayerNamea," Info ",PlayerNamea);
msg="At your murderer [%s] \nremains [%d] XP \n and [%d] AR\n has killed you with [%s]\nfrom distance [%d].";
format(string,sizeof string,msg,n,floatround(h),floatround(a),deathreason,floatround(GetDistanceBetweenPlayers(i,playerid)));
ShowPlayerDialog(playerid,DIALOG_RULES,0,PlayerNamea,string,"OK","Exit");
//}
}
}
return 1;
}
To whom it is necessary on SendClientMessage replace =)
Reply
#2

i tested it and its work fine to me very nice thank you.
Reply
#3

cool good FS ill use it Thanks and KEEP UP THE GOOD WORK
Reply
#4

screens please?
Reply
#5

Seems nice.
Reply
#6

Hmmm.. Look's good and yeah,
some screen shots would be good
Reply
#7

Later ...
Reply
#8

nice
Reply
#9

Quote:
Originally Posted by ikarus
Hy all my hungarys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)