02.10.2018, 02:47
PHP код:
new RankClassNames[][] ={
"CONSCRITO" , "RECRUTA" , "SOLDADO" , "CABO" , "3є SARGENTO" ,
"2є SARGENTO" , "1є SARGENTO" , "SUB TENENTE" , "ASPIRANTE" , "2є TENENTE" ,
"1є TENENTE" , "CAPITГO" , "MAJOR" , "TENENTE CORONEL" , "CORONEL" ,
"GENERAL DE BRIGADA" , "GENERAL DE DIVISГO" , "GENERAL DE EXЙRCITO" , "MARECHAL" , "FORЗAS ESPECIAIS" ,
"LENDA" , "HEROI DE GUERRA"
};
new RankClassColors[] = {
0xFF8080AA, 0xFFFF80AA, 0x80FF80AA, 0x00FF80AA, 0x80FFFFAA,
0x0080FFAA, 0xFF80C0AA, 0xFF80FFAA, 0xFF0000AA, 0xC6C600AA,
0x57AE00AA, 0x00CECEAA, 0x0080C0AA, 0x8080C0AA, 0xFF00FFAA,
0x804040AA, 0xFF8040AA, 0x008080AA, 0x005BB7AA, 0x0000A0AA,
0x808080AA, 0x6000BFAA
};
public OnPlayerSpawn(playerid)
{
new string[128], aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(string, sizeof(string), "{4169E1}Olб {ffffff}%s {4169E1}seja bem vindo(a)%s{ffffff}%s", aname, (GetPlayerScore(playerid) == 0 ? (" ") : (" novamente ")), RankClassNames[GetPlayerScore(playerid)]);
SendClientMessage(playerid, -1, string);
SetPlayerColor(playerid, RankClassColors[GetPlayerScore(playerid)]);
return 1;
}