3 posts in this topic

Напишет в чат, кто кого убил и из какого оружия.

Спойлер

  new string[256],PlayerName[MAX_PLAYER_NAME],KillerName[MAX_PLAYER_NAME],gunname[32];
  GetPlayerName(killerid,KillerName,sizeof(KillerName));
  GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
  GetWeaponName(reason,gunname,sizeof(gunname));
  format(string,sizeof(string),"[Killer-Info]Игрок %s убил игрока %s с расстояния %0.f м. с оружия: %s ",KillerName,PlayerName,GetDistancePlayertoPlayer(playerid,killerid),gunname);
  SendClientMessageToAll(COLOR_DARKRED,string );

 

Спойлер

forward Float:GetDistancePlayertoPlayer(playerid,playerid2);
public Float:GetDistancePlayertoPlayer(playerid,playerid2)
{
  new Float:x1, Float:y1, Float:z1;
  new Float:x2, Float:y2, Float:z2;
  GetPlayerPos(playerid,x1,y1,z1);
  GetPlayerPos(playerid2,x2,y2,z2);
  return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2 )+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}

 

 

Edited by RASTAMAN

Share this post


Link to post
Share on other sites

Скрина бы не помешало

Share this post


Link to post
Share on other sites

@Developer Stravinskiy эм, просто сообщение в чат -_-

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content