28.06.2013, 13:24
Olб, estou tendo uns probleminhas para criar um sistema de patentes por gangue/score exemplo:
Player com 500 score й ranking 14 e sua patente й: General "Dentro da sua gangue"
gostaria de saber como fasso para exibir estes nъmeros e nomes no chat global e no cmd /meuranking ou se possнvel em uma textdraw exemplo:
Sua patente: General
Ranking: 14
poderiam me ajudar? Tentei fazer da seguinte maneira:
Poderiam me ajudar?
Player com 500 score й ranking 14 e sua patente й: General "Dentro da sua gangue"
gostaria de saber como fasso para exibir estes nъmeros e nomes no chat global e no cmd /meuranking ou se possнvel em uma textdraw exemplo:
Sua patente: General
Ranking: 14
poderiam me ajudar? Tentei fazer da seguinte maneira:
pawn Код:
new CargoTerrorista[MAX_PLAYERS];
COMMAND:meucargo(playerid, params[])
{
new String[24];
format(String, sizeof(String),"Seu Cargo: %d", CargoTerrorista);
SendClientMessage(playerid, 0x1E90FFAA,String);
return true;
}
new CargoTerrorista[MAX_PLAYERS];
stock GetCargoTerrorista(playerid)
{
new CargoNomeT[20];
if(CargoTerrorista[playerid] == 1) { CargoNomeT = "Lider Israelita"; }
if(CargoTerrorista[playerid] == 2) { CargoNomeT = "Sub-Lider Israelita"; }
if(CargoTerrorista[playerid] == 3) { CargoNomeT = "General Israelita"; }
if(CargoTerrorista[playerid] == 4) { CargoNomeT = "Comandante"; }
if(CargoTerrorista[playerid] == 5) { CargoNomeT = "Chefe de Armamento"; }
if(CargoTerrorista[playerid] == 6) { CargoNomeT = "Comandante da Tropa"; }
if(CargoTerrorista[playerid] == 7) { CargoNomeT = "Atirador Preciso"; }
if(CargoTerrorista[playerid] == 8) { CargoNomeT = "Bombardeador"; }
if(CargoTerrorista[playerid] == 9) { CargoNomeT = "Treinador Militar"; }
if(CargoTerrorista[playerid] == 10) { CargoNomeT = "Espiao Israelita"; }
if(CargoTerrorista[playerid] == 11) { CargoNomeT = "Homem-Bomba"; }
if(CargoTerrorista[playerid] == 12) { CargoNomeT = "Atirador Expert"; }
if(CargoTerrorista[playerid] == 13) { CargoNomeT = "Atirador"; }
if(CargoTerrorista[playerid] == 14) { CargoNomeT = "Atirador Novato"; }
if(CargoTerrorista[playerid] == 15) { CargoNomeT = "Terrorista Classe A"; }
if(CargoTerrorista[playerid] == 16) { CargoNomeT = "Terrorista Classe B"; }
if(CargoTerrorista[playerid] == 17) { CargoNomeT = "Terrorista Classe C"; }
return CargoNomeT;
}
if(PlayerInfo[playerid][gTeam] == Terrorista)
{
if(PlayerInfo[playerid][Score] >= 0 && PlayerInfo[playerid][Score] <= 5)
{
CargoTerrorista[playerid] = 17;
}
if(PlayerInfo[playerid][Score] >= 5 && PlayerInfo[playerid][Score] <= 25)
{
CargoTerrorista[playerid] = 16;
}
if(PlayerInfo[playerid][Score] >= 25 && PlayerInfo[playerid][Score] <= 50)
{
CargoTerrorista[playerid] = 15;
}
if(PlayerInfo[playerid][Score] >= 50 && PlayerInfo[playerid][Score] <= 100)
{
CargoTerrorista[playerid] = 14;
}
if(PlayerInfo[playerid][Score] >= 100 && PlayerInfo[playerid][Score] <= 200)
{
CargoTerrorista[playerid] = 13;
}
if(PlayerInfo[playerid][Score] >= 200 && PlayerInfo[playerid][Score] <= 300)
{
CargoTerrorista[playerid] = 12;
}
if(PlayerInfo[playerid][Score] >= 300 && PlayerInfo[playerid][Score] <= 400)
{
CargoTerrorista[playerid] = 11;
}
if(PlayerInfo[playerid][Score] >= 400 && PlayerInfo[playerid][Score] <= 500)
{
CargoTerrorista[playerid] = 10;
}
if(PlayerInfo[playerid][Score] >= 500 && PlayerInfo[playerid][Score] <= 600)
{
CargoTerrorista[playerid] = 9;
}
if(PlayerInfo[playerid][Score] >= 600 && PlayerInfo[playerid][Score] <= 700)
{
CargoTerrorista[playerid] = 8;
}
if(PlayerInfo[playerid][Score] >= 700 && PlayerInfo[playerid][Score] <= 800)
{
CargoTerrorista[playerid] = 7;
}
if(PlayerInfo[playerid][Score] >= 800 && PlayerInfo[playerid][Score] <= 900)
{
CargoTerrorista[playerid] = 6;
}
if(PlayerInfo[playerid][Score] >= 900 && PlayerInfo[playerid][Score] <= 1000)
{
CargoTerrorista[playerid] = 5;
}
if(PlayerInfo[playerid][Score] >= 1000 && PlayerInfo[playerid][Score] <= 1100)
{
CargoTerrorista[playerid] = 4;
}
if(PlayerInfo[playerid][Score] >= 1100 && PlayerInfo[playerid][Score] <= 1200)
{
CargoTerrorista[playerid] = 3;
}
if(PlayerInfo[playerid][Score] >= 1200 && PlayerInfo[playerid][Score] <= 1400)
{
CargoTerrorista[playerid] = 2;
}
if(PlayerInfo[playerid][Score] >= 1400)
{
CargoTerrorista[playerid] = 1;
}
}
Poderiam me ajudar?