06.09.2012, 21:02
pawn Код:
stock GetPlayerOrg(playerid)
{
new Nomes[50],Org[20],String[128];
INI_Open(arquivo);
if(PlayerInfo[playerid][Organizacao] == 0) Nomes = "Desempregado";
else if(PlayerInfo[playerid][Organizacao] == 1)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Recruta";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Soldado";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Cabo";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Sargento";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Tenente";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "General de Brigada";
return 1;
}
else if(PlayerInfo[playerid][Organizacao] == 2)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Recruta";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Soldado";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Cabo";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Sargento";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Major";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "Capitao";
return 1;
}
else if(PlayerInfo[playerid][Organizacao] == 3)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Aviaozinho";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Cobrador";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Guarda-Costa";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Administrador-Boca";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Gerente";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "Dono-Boca";
return 1;
}
else if(PlayerInfo[playerid][Organizacao] == 4)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Aviaozinho";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Cobrador";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Guarda-Costa";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Administrador-Boca";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Gerente";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "Dono-Boca";
return 1;
}
else if(PlayerInfo[playerid][Organizacao] == 5)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Aviaozinho";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Cobrador";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Vendedor";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Administrador-Boca";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Gerente";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "Dono-Boca";
return 1;
}
else if(PlayerInfo[playerid][Organizacao] == 6)
{
if(PlayerInfo[playerid][Cargo] == 1) Nomes = "Aviaozinho";
else if(PlayerInfo[playerid][Cargo] == 2) Nomes = "Cobrador";
else if(PlayerInfo[playerid][Cargo] == 3) Nomes = "Vendedor";
else if(PlayerInfo[playerid][Cargo] == 4) Nomes = "Administrador-Boca";
else if(PlayerInfo[playerid][Cargo] == 5) Nomes = "Gerente";
else if(PlayerInfo[playerid][Cargo] == 6) Nomes = "Dono-Boca";
return 1;
}
INI_Close();
format(String,sizeof(String),"Org: %s Cargo: %s",PlayerInfo[playerid][Organizacao],Nomes);
SendClientMessage(playerid,-1,String);
return 1;
}
eu fiz um comando para testar a org.
pawn Код:
CMD:org(playerid)
{
GetPlayerOrg(playerid);
return 1;
}