29.07.2018, 17:33
Sim,
PHP код:
#include a_samp
#include foreach
#define TEMPO 5000 // milisegundos
public OnGameModeInit() {
SetTimer("chamar", TEMPO, true);
return 1;
}
enum PlayerInfo {
bool:Ajudante, bool:Moderador, bool:Corregedor, bool:Administrador, bool:Master
};
new pInfo[MAX_PLAYERS][PlayerInfo];
forward chamar();
public chamar()
{
foreach(Player, i)
{
if(IsPlayerAdmin(i))
{
SetPlayerColor(i, 0xFF0000AA); // rcon
SetPlayerChatBubble(i, "Rcon", GetPlayerColor(i), 20.0, 10000);
}
else if(pInfo[i][Ajudante] == true)
{
SetPlayerColor(i, 0xFF00FFAA);
SetPlayerChatBubble(i, "Ajudante(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(pInfo[i][Moderador] == true)
{
SetPlayerColor(i, 0x008000AA);
SetPlayerChatBubble(i, "Moderador(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(pInfo[i][Corregedor] == true)
{
SetPlayerColor(i, 0x00FFFFAA);
SetPlayerChatBubble(i, "Corregedor(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(pInfo[i][Administrador] == true)
{
SetPlayerColor(i, 0xFF0000AA);
SetPlayerChatBubble(i, "Administrador(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(pInfo[i][Master] == true)
{
SetPlayerColor(i, 0x800000AA);
SetPlayerChatBubble(i, "Administrador(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(GetPlayerScore(i) < 5)
{
SetPlayerColor(i, 0xFF8000AA);
SetPlayerChatBubble(i, "Novato(a)", GetPlayerColor(i), 20.0, 10000);
}
else if(GetPlayerScore(i) >= 5) SetPlayerColor(i, 0xFFFFFFAA);
}
return 1;
}