02.01.2011, 22:32
(
Последний раз редактировалось [BFT]eagles22; 02.01.2011 в 23:19.
Причина: problem solved
)
I need help with OnPlayerText. I am trying to limit the globalchatradius and then send a message to the player who typed if nobody is within range. It works good except when i type something i get a message saying that i typed Eagle
i will include a screenshot
i will include a screenshot
Код:
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(text, 128, "%s : %s", name, text);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for (new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,200.0,x,y,z))
{
SendClientMessage(i, GetPlayerColor(playerid), text);
}
}
else
{
return SendClientMessage(playerid, COLOR_WHITE, "[SERVER] : Nobody heard you, please use /shout or /me!");
}
}
return 0;
}


