10.10.2010, 16:30
coloquei como estб aqui
pawn Код:
if(strcmp(cmd, "/lider", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [ id ] [Number(1-10)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 30 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Lideres de 0 a 30"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMembro] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " O Player Ja tem uma Emprego/Lideranзa !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLider] = level;
format(string, sizeof(string), " Voce foi escolhido a lider pelo admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE,"Promovido Com suscesso !!");
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 265; SetPlayerSpawn(para1); } //Policia Militar
else if(level == 2) { PlayerInfo[para1][pChar] = 285; SetPlayerSpawn(para1); } //B.O.P.E
else if(level == 3) { PlayerInfo[para1][pChar] = 287; SetPlayerSpawn(para1); } //Exйrcito
else if(level == 4) { PlayerInfo[para1][pChar] = 228; SetPlayerSpawn(para1); } //S.A.M.U
else if(level == 5) { PlayerInfo[para1][pChar] = 115; SetPlayerSpawn(para1); } //Varrios Los Aztecas
else if(level == 6) { PlayerInfo[para1][pChar] = 221; SetPlayerSpawn(para1); } //Grupo Armado Islвmico Lнbio (LIFG)
else if(level == 7) { PlayerInfo[para1][pChar] = 17; SetPlayerSpawn(para1); } //Prefeito
else if(level == 8) { PlayerInfo[para1][pChar] = 294; SetPlayerSpawn(para1); } //Matador de Aluguel
else if(level == 9) { PlayerInfo[para1][pChar] = 227; SetPlayerSpawn(para1); } //Rede Globo
else if(level == 10) { PlayerInfo[para1][pChar] = 46; SetPlayerSpawn(para1); } //Vazio
else if(level == 11) { PlayerInfo[para1][pChar] = 171; SetPlayerSpawn(para1); } //Instrutores =*
else if(level == 12) { PlayerInfo[para1][pChar] = 279; SetPlayerSpawn(para1); } //Bombeiros
else if(level == 13) { PlayerInfo[para1][pChar] = 100; SetPlayerSpawn(para1); } //Mongols MC
else if(level == 14) { PlayerInfo[para1][pChar] = 61; SetPlayerSpawn(para1); } //Transnacional
else if(level == 15) { PlayerInfo[para1][pChar] = 270; SetPlayerSpawn(para1); } //Groove
else if(level == 16) { PlayerInfo[para1][pChar] = 128; SetPlayerSpawn(para1); } //FARC
else if(level == 17) { PlayerInfo[para1][pChar] = 185; SetPlayerSpawn(para1); } //Policia Civil
else if(level == 18) { PlayerInfo[para1][pChar] = 102; SetPlayerSpawn(para1); } //Ballas
else if(level == 19) { PlayerInfo[para1][pChar] = 108; SetPlayerSpawn(para1); } //Vagos
else if(level == 20) { PlayerInfo[para1][pChar] = 117; SetPlayerSpawn(para1); } //Mбfia Yakuza
else if(level == 21) { PlayerInfo[para1][pChar] = 22; SetPlayerSpawn(para1); } //Comando Vermelho
else if(level == 22) { PlayerInfo[para1][pChar] = 125; SetPlayerSpawn(para1); } //Mбfia La Hermandad
else if(level == 23) { PlayerInfo[para1][pChar] = 143; SetPlayerSpawn(para1); } //G-MOB
else if(level == 24) { PlayerInfo[para1][pChar] = 292; SetPlayerSpawn(para1); } //Drifters
else if(level == 25) { PlayerInfo[para1][pChar] = 59; SetPlayerSpawn(para1); }//Policia Federal
else if(level == 26) { PlayerInfo[para1][pChar] = 61; SetPlayerSpawn(para1); } //TransTaxi
else if(level == 27) { PlayerInfo[para1][pChar] = 227; SetPlayerSpawn(para1); } //SBT
else if(level == 28) { PlayerInfo[para1][pChar] = 266; SetPlayerSpawn(para1); } //Policia Rodoviaria
else if(level == 29) { PlayerInfo[para1][pChar] = 59; SetPlayerSpawn(para1); } //C.T.P
else if(level == 30) { PlayerInfo[para1][pChar] = 17; SetPlayerSpawn(para1); } //Governo Federal
gTeam[para1] = 11;
PlayerInfo[para1][pTeam] = 11;
PlayerInfo[para1][pCargo] = 6;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;