KaLu17

[pawno.pl] -> #24754

Mar 17th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.49 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnFilterScriptInit()
  4. {
  5.  
  6.     return 1;
  7. }
  8.  
  9. public OnPlayerDeath(playerid, killerid, reason)
  10. {
  11.         new str[128];    
  12.     new Float:pos[3];
  13.         GetPlayerPos(killerid, pos[0], pos[1], pos[2]);
  14.  
  15.         format(str, 128, "~b~~h~Zabity przez:~w~%s ~b~~h~z odleglosci: ~w~%dm~n~~y~~h~Bron: ~w~%s", PlayerName(killerid),                           GetPlayerDistanceToPointEx(playerid, pos[0], pos[1], pos[2]) , NazwaBroni[GetPlayerWeapon(killerid)]);
  16.         TextDrawSetString(DeathDraw[playerid], str);
  17.         TextDrawShowForPlayer(playerid, DeathDraw[playerid]);
  18.         SetTimerEx("DeathDrawOff", 5000, 0, "d", playerid);
  19.  
  20.         format(str, 128, "~b~~h~Zabiles: ~w~%s ~b~~h~z odleglosci: ~w~%dm~n~~y~~h~Bron: ~w~%s", PlayerName(playerid), GetPlayerDistanceToPointEx(playerid, pos[0], pos[1], pos[2]) , NazwaBroni[GetPlayerWeapon(killerid)]);
  21.         TextDrawSetString(DeathDraw[killerid], str);
  22.         TextDrawShowForPlayer(killerid, DeathDraw[killerid]);
  23.         SetTimerEx("DeathDrawOff", 5000, 0, "d", killerid);
  24.         return 1;
  25. }
  26.  
  27. stock PlayerName(playerid)
  28. {
  29.     new pname[MAX_PLAYER_NAME];
  30.     GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  31.     return pname;
  32. }
  33.  
  34. stock GetPlayerDistanceToPointEx(playerid,Float:sx,Float:sy,Float:sz) //By Sacky
  35. {
  36.     new Float:x1,Float:y1,Float:z1;
  37.     new Float:tmpdis;
  38.     GetPlayerPos(playerid,x1,y1,z1);
  39.     tmpdis = floatsqroot(floatpower(floatabs(floatsub(sx,x1)),2)+floatpower(floatabs(floatsub(sy,y1)),2)+floatpower(floatabs(floatsub(sz,z1)),2));
  40.     return floatround(tmpdis);
  41. }
Advertisement
Add Comment
Please, Sign In to add comment