21.07.2013, 19:09
Ok, So when my player's talk and if the player is in the range of where a different one talked from in a different virtual world he gets the text? I have this on my proxditator type thing and onplayertext / talk.
I am wanting it so that when a player speak's in a different virtual world it won't show up for all virtual worlds, and it will only show up for player's around him.
pawn Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(IsPlayerInRangeOfPoint(i,radi,x,y,z) && WorldInfo[i][pWorld] == 1)
{
SendClientMessage(i,color,string);
}
}
}
public OnPlayerText(playerid, text[])
{
if(Playerlogged(playerid) == 1)
{
new
message[128],
name[258];
name = GetName(playerid);
GiveNameSpace(name);
format(message, sizeof(message), "%s says: %s", name, text);
ProxDetector(30.0, playerid, message, -1);
return 0;
}
return 1;
}