проблема с дальностью чата
#2

PHP код:
public OnPlayerText(playeridtext[])
{
new 
stringtome[256];
new 
stringtoall[256];
new 
Float:PlayerToPlayerDistance;
GetPlayerPos(playeridPlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
if(
GetPVarInt(playerid"pLogged") == 0) return 0;
       
format(stringtomesizeof(stringtome), " > Вы сказали: {ff6600}%s"text);
format(stringtoallsizeof(stringtoall), "%s говорит: {ff6600}%s"playername(playerid), text);
SetPlayerChatBubble(playeridtext0xff6600ff30.06000);
SendClientMessage(playerid, -1stringtome);
for(new 
0MAX_PLAYERSi++)
{
 if((
!= playerid) && IsPlayerStreamedIn(playeridi))
{
PlayerToPlayerDistance GetPlayerDistanceFromPoint(iPlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
if(
PlayerToPlayerDistance <= 30.0)
{
SendClientMessage(i, -1stringtoall);
}
}
}
return 
0;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)