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;
}
}
new CargoTerrorista[MAX_PLAYERS];
COMMAND:meucargo(playerid, params[])
{
new String[24];
format(String, sizeof(String),"Seu Cargo: %d", CargoTerrorista[playerid]);
SendClientMessage(playerid, 0x1E90FFAA,String);
return true;
}
stock GetCargoTerrorista(playerid)
{
new CargoNomeT[100];
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;
}
new CargoTerrorista[MAX_PLAYERS]; CMD:myrank(playerid, params[]) { new String[30]; format(String, sizeof(String),"Seu Cargo: %s", CargoTerrorista[playerid]); SendClientMessage(playerid, 0x1E90FFAA,String); return true; } stock GetCargoTerrorista(playerid) { new CargoNomeT[100]; 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 1; }
Uma dъvida, utilizando desta forma que vocк me passou ai Tito, eu poderia adicionar no cmd /meucargo a var CargoNomeT?
|
new CargoTerrorista[MAX_PLAYERS];
CMD:myrank(playerid) {
new String[30];
format(String, sizeof(String),"Seu Cargo: %d [%s]", CargoTerrorista[playerid], GetCargoTerrorista(playerid));
SendClientMessage(playerid, 0x1E90FFAA,String);
return true;
}
stock GetCargoTerrorista(playerid) {
new CargoNomeT[100];
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;
}
pawn Код:
|