17.02.2018, 22:01
Quote:
Код:
new bool:Bloqueado[MAX_PLAYERS]; public OnPlayerText(playerid, text[]){ if(Bloqueado[playerid] == false){ new string[128]; format(string, 128, "%s disse: %s", playerName[playerid], text); SendPlayerMessageToAll(playerid, string); } return 0; } |
Quote:
PHP код:
|
Minha maneira:
Код:
new bool:Block[MAX_PLAYERS][MAX_PLAYERS]; public OnPlayerConnect(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { Block[playerid][i] = false; Block[i][playerid] = false; } return 1; } public OnPlayerDisconnect(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) { Block[playerid][i] = true; Block[i][playerid] = true; } return 1; } public OnPlayerText(playerid, text[]) { for(new i = 0; i < GetPlayerPoolSize(); i++) { if(Block[playerid][i] || Block[i][playerid]) continue; // Mensagem } return 0; } // Alйm disso, na бrea do comando que for criar, use: // Block[playerid][ID_DO_BLOQUEADO] = true; // Block[ID_DO_BLOQUEADO][playerid] = true;