public OnPlayerText(playerid, text[])
{
if(Player[playerid][pAdminLevel] > 0)
{
new string[180], Float: pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
format(string, sizeof(string), "%s %s[%d]: %s", GetPlayerAdminLevel(playerid), GetPlayerNameEx(playerid), playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, pPos[0], pPos[1], pPos[2]))
{
SendClientMessage(i ,-1, string);
return 0;
}
}
}
return 1;
}
|
No RangeOfPoint, vocк substitui playerid por i.
E retira return 0; no final do SendClientMessage. |
public OnPlayerText(playerid, text[])
{
if(Player[playerid][pAdminLevel] > 0)
{
new string[180], Float: pPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
format(string, sizeof(string), "%s %s[%d]: %s", GetPlayerAdminLevel(playerid), GetPlayerNameEx(playerid), playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10.0, pPos[0], pPos[1], pPos[2]))
{
SendClientMessage(i ,-1, string);
}
}
}
return 0;
}
|
PHP Code:
|