07.07.2012, 23:20
Bom galera eu to com um problema no meu gm tipo eu do lider pro cara e talz ae ele vira lider mais quando ele vai usar alguns cmds fala q ele nao e cargo 5+ e talz pq sera tem como me ajudar.
if(strcmp(cmd, "/darlider", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darlider [ID/Nome] [Numero de 1 a 22]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 22 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Lider minimo 0, Mбximo 22!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMembro] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador jб possui uma organizaзгo!");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLider] = level;
format(string, sizeof(string), "Vocк foi promovido a lider da organizaзгo %s pelo admin %s", GetOrg(strval(tmp)),sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк promoveu %s a lider da organizaзгo %d (%s).", giveplayer,level,GetOrg(strval(tmp)));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 73; SetPlayerSpawn(para1); }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; SetPlayerSpawn(para1); } //Policia Militar
else if(level == 2) { PlayerInfo[para1][pChar] = 285; SetPlayerSpawn(para1); } //Rotam
else if(level == 3) { PlayerInfo[para1][pChar] = 287; SetPlayerSpawn(para1); } //Exercito
else if(level == 4) { PlayerInfo[para1][pChar] = 228; SetPlayerSpawn(para1); } //Medico
else if(level == 5) { PlayerInfo[para1][pChar] = 113; SetPlayerSpawn(para1); } //Guerrilheiros Israelitas
else if(level == 6) { PlayerInfo[para1][pChar] = 120; SetPlayerSpawn(para1); } //Asfarc
else if(level == 7) { PlayerInfo[para1][pChar] = 147; SetPlayerSpawn(para1); } //Prefeito
else if(level == 8) { PlayerInfo[para1][pChar] = 294; SetPlayerSpawn(para1); } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; SetPlayerSpawn(para1); } //San News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; SetPlayerSpawn(para1); } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 171; SetPlayerSpawn(para1); } //Driving/Flying School
else if(level == 12) { PlayerInfo[para1][pChar] = 270; SetPlayerSpawn(para1); } //Grove Street
else if(level == 13) { PlayerInfo[para1][pChar] = 103; SetPlayerSpawn(para1); } // Ballas
else if(level == 14) { PlayerInfo[para1][pChar] = 108; SetPlayerSpawn(para1); } //Los Santos Vagos
else if(level == 15) { PlayerInfo[para1][pChar] = 115; SetPlayerSpawn(para1); } // Varrio Los Aztecas
else if(level == 16) { PlayerInfo[para1][pChar] = 143; SetPlayerSpawn(para1); } // Comando Vermelho
else if(level == 17) { PlayerInfo[para1][pChar] = 98; SetPlayerSpawn(para1); } // PCC
else if(level == 18) { PlayerInfo[para1][pChar] = 117; SetPlayerSpawn(para1); } // Mafia Yakuza
else if(level == 19) { PlayerInfo[para1][pChar] = 112; SetPlayerSpawn(para1); } // Mafia La Hermandad
else if(level == 20) { PlayerInfo[para1][pChar] = 292; SetPlayerSpawn(para1); } // Corredores
else if(level == 21) { PlayerInfo[para1][pChar] = 100; SetPlayerSpawn(para1); } // Sons Of Anarchy
else if(level == 22) { PlayerInfo[para1][pChar] = 59; SetPlayerSpawn(para1); } // Policia Civil
format(string, sizeof(string),"**A Org/GG %s Tem Um Novo Lider: %s**", GetOrg(strval(tmp)),sendername);
SendClientMessageToAll(COLOR_YELLOW2, string);
gTeam[para1] = 11;
PlayerInfo[para1][pTeam] = 11;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
if(PlayerInfo[playerid][pMembro] > 0)
{
DemitirInfoOrg(pNome(para1));
}
if(PlayerInfo[playerid][pLider] > 0)
{
DemitirInfoOrg(pNome(para1));
}
ConviteInfoOrg(pNome(para1), level, 6);
OnPlayerUpdate(para1);
SpawnPlayer(para1);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem permissгo para usar esse comando!");
}
}
return 1;
pawn Код:
|
ConviteInfoOrg(pNome(para1), level, 6);
PlayerInfo[para1][pRank] = 6;
PlayerInfo[para1][pLider] = level;