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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0