SA-MP Forums Archive
how to add this feature - 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: how to add this feature (/showthread.php?tid=539711)



how to add this feature - Ryz - 29.09.2014

hey

anyone know how to add this feature

example

Noob has Killed you from 150 Meters

how to get this meters?

any tutorials?


Re: how to add this feature - YanLanger - 29.09.2014

Idk if it's possible maybe it is.


Re: how to add this feature - Kane_Phoenix - 29.09.2014

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
killerid != playerid)
    {
        new 
killername[MAX_PLAYER_NAME],Float:X,Float:Y,Float:Z;
        
GetPlayerName(killerid,killername,sizeof(killername));
        
GetPlayerPos(killerid,X,Y,Z);
        new 
FloatfDistance GetPlayerDistanceFromPoint(playeridX,Y,Z), szMessage[128];
        
format(szMessagesizeof(szMessage), "%s has Killed you from %0.2f Meters",killernamefDistance);
        
SendClientMessage(playerid0xA9C4E4FFszMessage);
    }
    return 
1;




Re: how to add this feature - Ryz - 30.09.2014

i got this two errors

pawn Код:
C:\Users\Ryz\Desktop\codww2.pwn(5303) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Ryz\Desktop\codww2.pwn(5561) : warning 219: local variable "PlayerName" shadows a variable at a preceding level



Re: how to add this feature - Ryz - 30.09.2014

but script is works .thanks