28.07.2018, 13:29
Код HTML:
public OnPlayerText(playerid, text[]) { if(realchat) { if(Player[playerid][pLogado] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб logado."), 0; new string[128], Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); format(string, sizeof(string), "%s diz: %s", Player[playerid][Nome], text); SetPlayerChatBubble(playerid, text, COLOR_WHITE, 35.0, 10000); for(new i = 0, total = GetPlayerPoolSize()+1; i < total; i++) //esse й um mйtodo simples de criar loop por players, mas recomendo usar foreach { if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 35.0, x, y, z)) SendClientMessage(i, -1, string); } } return false; }