You have killed (playername) Distance : __m Weapon :-
#2

PHP код:
new Float:LastShotDis[MAX_PLAYERS];
UName(p){
    new 
s[24];
    
GetPlayerName(p,s,24);
    return 
s;
}
WName(wid){
    new 
s[32];
    
GetWeaponName(wid,s,32);
    return 
s;
}
#define scm     SendClientMessage
public OnPlayerDeath(playeridkilleridreason){
    if(
killerid != INVALID_PLAYER_ID){
        new 
s[128];
        
format(s,sizeof(s),"You killed %s from distance %.2f with weapon %s.",UName(playerid),LastShotDis[killerid],WName(reason));
        
scm(killerid,-1,s);
format(s,sizeof(s),"You were killed by %s from distance %.2f with weapon %s.",UName(killerid),LastShotDis[killerid],WName(reason));
        
scm(playerid,-1,s);
    }
    return 
1;
}
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ){
    if(
hittype==BULLET_HIT_TYPE_PLAYER){
        
LastShotDis[playerid]=GetPlayerDistanceFromPoint(playerid,fX,fY,fZ);
    }
    return 
1;

EDITED
EDITED
Reply


Messages In This Thread
You have killed (playername) Distance : __m Weapon :- - by Rohit12 - 01.08.2017, 13:29
Re: You have killed (playername) Distance : __m Weapon :- - by CodeStyle175 - 01.08.2017, 14:22
Re: You have killed (playername) Distance : __m Weapon :- - by Rohit12 - 01.08.2017, 15:03
Re: You have killed (playername) Distance : __m Weapon :- - by CodeStyle175 - 01.08.2017, 15:19
Re: You have killed (playername) Distance : __m Weapon :- - by Rohit12 - 01.08.2017, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)