02.07.2011, 21:54
Arrumei pra vocк, isto deve resolver o seu problema :
Coloque :
Espero ter ajudado .
Coloque :
pawn Код:
//Na public OnPlayerCommandText:
if(strcmp(cmd, "/darlider", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /darlider [playerid/Parte-do-Nick] [Number(1-17)]");
return 1;
}
new para1;
new level;
new nome[24];
new OrgDefinition[23][28] =
{
"Policia Militar", "Policia Federal", "Forзas Armadas",
"Medicos", "Ballas", "Groove Street", "Prefeitura", "Hitmans", "Rede Globo",
"Lowriders", "San Fierro Riffa", "Los Vagos", "Asphalt Kings", "Policia Rodoviaria Federal",
"Los Aztecas", "Mafia Triads", "Mafia Yakuza", "Drifters", "Comando Vermelho",
"PCC", "Al Qaeda", "Swat", "Policia Civil"
};
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 23 || level < 0) return SendClientMessage(playerid, COLOR_GREY, " Nъmeros entre 1 e 23");
GetPlayerName(playerid, nome, sizeof nome);
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(IsPlayerConnected(para1) && (para1 != INVALID_PLAYER_ID))
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "%s lhe deu o direito administraзгo profissional, digite /rg.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
if(level == 0) PlayerInfo[para1][pChar] = 23;
format(string, sizeof(string), "%s й o novo lнder da Organizaзгo %s.", giveplayer,OrgDefinition[(PlayerInfo[para1][pLeader]-1)]);
SendClientMessageToAll(COLOR_WHITE, string);
if(level == 1) { PlayerInfo[para1][pChar] = 265; gTeam[para1] = 2;} //Police Militar
else if(level == 2) { PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2;}//FBI
else if(level == 3) { PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2;} //Forзas Armadas
else if(level == 4) { PlayerInfo[para1][pChar] = 70; gTeam[para1] = 4;}//Medicos
else if(level == 5) { PlayerInfo[para1][pChar] = 104; gTeam[para1] = 7;} //Ballas
else if(level == 6) { PlayerInfo[para1][pChar] = 270; gTeam[para1] = 7;} //Grove
else if(level == 7) { PlayerInfo[para1][pChar] = 147; gTeam[para1] = 8;} //prefeito
else if(level == 8) { PlayerInfo[para1][pChar] = 165; gTeam[para1] = 8;} //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 295; gTeam[para1] = 9;} //Rede Globo
else if(level == 10) { PlayerInfo[para1][pChar] = 47; gTeam[para1] = 47;} //Lowriders
else if(level == 11) { PlayerInfo[para1][pChar] = 174; gTeam[para1] = 174;} //San Fierro riffa
else if(level == 12) { PlayerInfo[para1][pChar] = 108; gTeam[para1] = 7;} //Los Santos Vagos
else if(level == 13) { PlayerInfo[para1][pChar] = 181; gTeam[para1] = 7;} //Asphalt kings
else if(level == 14) { PlayerInfo[para1][pChar] = 283; gTeam[para1] = 14;} //PRF
else if(level == 15) { PlayerInfo[para1][pChar] = 115; gTeam[para1] = 7;} //Aztecas
else if(level == 16) { PlayerInfo[para1][pChar] = 118; gTeam[para1] = 16;} //Mafia Triads
else if(level == 17) { PlayerInfo[para1][pChar] = 294; gTeam[para1] = 16;} //Mafia Yakuza
else if(level == 18) { PlayerInfo[para1][pChar] = 292; gTeam[para1] = 16;} //Drifters
else if(level == 19) { PlayerInfo[para1][pChar] = 19; gTeam[para1] = 16;} //C.V
else if(level == 20) { PlayerInfo[para1][pChar] = 293; gTeam[para1] = 16;} //PCC
else if(level == 21) { PlayerInfo[para1][pChar] = 285; gTeam[para1] = 21;} //Al qaeda
else if(level == 22) { PlayerInfo[para1][pChar] = 290; gTeam[para1] = 22;} //swat
else if(level == 23) { PlayerInfo[para1][pChar] = 235; gTeam[para1] = 7;} //Policia Civil
PlayerInfo[para1][pMember] = level;
PlayerInfo[para1][pRank] = 6;
PlayerInfo[para1][pTeam] = gTeam[para1];
PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar];
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Sem Autorizaзгo.");
}
return true;
}
Espero ter ajudado .