27.02.2012, 15:40
Bom to com o gm do bps e quando eu dou /lider ele pega o lider normal mas quando dou gmx ou desligo o servidor o lider sai ! alguem ajuda ae please
Comando /lider
Comando /lider
Код:
if(strcmp(cmd, "/lider", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [ID/Nome] [Numero(1-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, Maximo 21!"); return 1; } if (PlayerInfo[playerid][pAdminBMC] >= 1337) { if(modoadmin[playerid] < 1) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб em modo de trabalho!"); return 1; } if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(PlayerInfo[para1][pMembro] > 0) { SendClientMessage(playerid, COLOR_GREY, " Esse jogador ja possui uma ORG!"); return 1; } new ttext[100]; if(level == 0) { ttext = "Civil"; } else if(level == 1) { ttext = "Policia Militar"; } else if(level == 2) { ttext = "BOPE"; } else if(level == 3) { ttext = "Exйrcito"; } else if(level == 4) { ttext = "Mйdico"; } else if(level == 5) { ttext = "Mafia Yakuza"; } else if(level == 6) { ttext = "Al'Qaeda"; } else if(level == 7) { ttext = "Prefeitura"; } else if(level == 8) { ttext = "Hitmans"; } else if(level == 9) { ttext = "Repуrteres"; } else if(level == 10) { ttext = "Taxistas"; } else if(level == 11) { ttext = "Cosa Nostra"; } else if(level == 12) { ttext = "Groove Street"; } else if(level == 13) { ttext = "Ballas"; } else if(level == 14) { ttext = "Los Santos Vagos"; } else if(level == 15) { ttext = "Varrio Los Aztecas"; } else if(level == 16) { ttext = "Policia Federal"; } else if(level == 17) { ttext = "Comando Vermelho"; } else if(level == 18) { ttext = "PCC"; } else if(level == 19) { ttext = "The Killers"; } else if(level == 20) { ttext = "Guerrilheiros Israelitas"; } else if(level == 21) { ttext = "Fast Furious"; } else if(level == 22) { ttext = "Hells Angels"; } 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", ttext,sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Vocк promoveu %s a lider da organizaзгo %d (%s).", giveplayer,level,ttext); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); if(level == 0) { PlayerInfo[para1][pSkin] = 23; } else if(level == 1) { PlayerInfo[para1][pSkin] = 265; } //Police Force else if(level == 2) { PlayerInfo[para1][pSkin] = 285; } //PF/ATF else if(level == 3) { PlayerInfo[para1][pSkin] = 287; } //Exйrcito else if(level == 4) { PlayerInfo[para1][pSkin] = 228; } //Fire/Ambulance else if(level == 5) { PlayerInfo[para1][pSkin] = 294; } //Hamas else if(level == 6) { PlayerInfo[para1][pSkin] = 123; } //FARC else if(level == 7) { PlayerInfo[para1][pSkin] = 186; } //MaYou else if(level == 8) { PlayerInfo[para1][pSkin] = 294; } //Hitmans else if(level == 9) { PlayerInfo[para1][pSkin] = 227; } //noticias Reporters else if(level == 10) { PlayerInfo[para1][pSkin] = 61; } //Taxi Cab Company else if(level == 11) { PlayerInfo[para1][pSkin] = 120; } //Driving/Flying School else if(level == 12) { PlayerInfo[para1][pSkin] = 270; } //Groove else if(level == 13) { PlayerInfo[para1][pSkin] = 102; } //Ballas else if(level == 14) { PlayerInfo[para1][pSkin] = 108; } //Vagos else if(level == 15) { PlayerInfo[para1][pSkin] = 114; } //Varrios Los Aztecas else if(level == 16) { PlayerInfo[para1][pSkin] = 59; } //Policia Federal else if(level == 17) { PlayerInfo[para1][pSkin] = 170; } //CV else if(level == 18) { PlayerInfo[para1][pSkin] = 47; } //PCC else if(level == 19) { PlayerInfo[para1][pSkin] = 173; } //The Killers else if(level == 20) { PlayerInfo[para1][pSkin] = 113; } //GI else if(level == 21) { PlayerInfo[para1][pSkin] = 30; } //Fast Furious else if(level == 22) { PlayerInfo[para1][pSkin] = 248; } //Hells Angels gTeam[para1] = 11; SetPlayerSpawn(para1); PlayerInfo[para1][pCargo] = 6; PlayerInfo[para1][pTeam] = 11; SetPlayerSkin(para1, PlayerInfo[para1][pSkin]); if(level >= 1) { format(string, sizeof(string), "•{FF0000} Existe um novo lнder da Org %s, use /lideres para mais informaзхes. •",NomeORG(para1)); SendClientMessageToAll(GetPlayerColor(para1), string); } if(PlayerInfo[playerid][pMembro] > 0) { DemitirInfoOrg(para1); } if(PlayerInfo[playerid][pLider] > 0) { DemitirInfoOrg(para1); } ConviteInfoOrg(para1, level, 6); } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem permissao para usar esse comando!"); } } return 1; }