06.07.2014, 21:25
Ola gostaria de pedir ajuda! pois o comando /contaslider do meu gm ta bugado!
quando o lider digita /contaslider para sair de lider. la em /orgs ele ainda fica como lider! ele sу sai do /orgs se algum admin digita /limparlider (id org)
Comando /contaslider
Comando /orgs
OBS: quando ele digita /contaslider ele sai de lider. sу que la em /orgs deveria ficar assim
Exemplo: Policia militar: Ninguem sу que fica com o nome do lider e nao sai! sу sai digitando /limparlider
quando o lider digita /contaslider para sair de lider. la em /orgs ele ainda fica como lider! ele sу sai do /orgs se algum admin digita /limparlider (id org)
Comando /contaslider
PHP Code:
if(!strcmp("/contaslider", cmdtext, true))
{
if(PlayerInfo[playerid][pLider] == 0)
{
SendClientMessage(playerid,COLOR_GREY," Vocк nгo й lнder de nenhuma organizaзгo!");
return 1;
}
format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
LideresLog(string);
DemitirInfoOrg(PlayerName(playerid));
gTeam[playerid] = 3;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pMembro] = 0;
PlayerInfo[playerid][pLider] = 0;
PlayerInfo[playerid][pCargo] = 0;
PlayerInfo[playerid][pSpawn] = 0;
ResetPlayerWeapons(playerid);
RemoveGangue(playerid);
PlayerInfo[playerid][pEmprego] = 0;
if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid, 119); } else { SetPlayerSkin(playerid, 216); }
SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
MedicBill[playerid] = 0;
SpawnPlayer(playerid);
MedicBill[playerid] = 0;
liderhide[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
return 1;
}
PHP Code:
if (strcmp("/orgs", cmdtext, true, 10) == 0 || strcmp("/organizacoes", cmdtext, true, 10) == 0 && PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playerid))
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1340)
{
SendClientMessage(playerid, 0xB4B5B7FF, "Vocк nгo й um Admin, ou nгo estб em modo (/trabalhar)");
return 1;
}
new DialogNGL[1600];
format(string,sizeof(string), "{FFFFFF} 1 - {9999FF}Policia Militar:{FF9000} %s\n", InfoOrg[1][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 2 - {3155C6}B.O.P.E:{FF9000} %s\n", InfoOrg[2][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 3 - {31AA31}Exercito:{FF9000} %s\n", InfoOrg[3][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 4 - {AD3031}Mйdicos:{FF9000} %s\n", InfoOrg[4][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 5 - {3333FF}Aztecas:{FF9000} %s\n", InfoOrg[5][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 6 - {FF0066}Taliban:{FF9000} %s\n", InfoOrg[6][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 7 - {0099FF}Presidente: {FF9000}%s\n", InfoOrg[7][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 8 - {A9A9A9}Hitmans:{FF9000} %s\n", InfoOrg[8][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 9 - {FFC1C1}Reporteres:{FF9000} %s\n", InfoOrg[9][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 10 - {F68E00}Taxistas:{FF9000} %s\n", InfoOrg[10][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 11 - {363636}Policia Federal:{FF9000} %s\n", InfoOrg[11][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 12 - {00E7C6}Mafia Cosa Nostra:{FF9000} %s\n", InfoOrg[12][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 13 - {00659C}Mafia Yakuza:{FF9000} %s\n", InfoOrg[13][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 14 - {33FF00}Groove Street:{FF9000} %s\n", InfoOrg[14][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 15 - {FFCC99}Al'Qaeda:{FF9000} %s\n", InfoOrg[15][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 16 - {93833E}Polнcia Civil: {FF9000}%s\n", InfoOrg[16][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 17 - {6B00D8}Ballas: {FF9000}%s\n", InfoOrg[17][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 18 - {FFFF33}Los Vagos:{FF9000} %s\n", InfoOrg[18][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 19 - {E10000}Comando Vermelho:{FF9000} %s\n", InfoOrg[19][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 20 - {8CBE8C}PCC: {FF9000}%s\n", InfoOrg[20][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 21 - {660000}Sons Of Anarchy:{FF9000} %s\n", InfoOrg[21][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 22 - {A774E2}Mayans:{FF9000} %s\n", InfoOrg[22][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 23 - {FF6142}Interpol:{FF9000} %s\n", InfoOrg[23][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 24 - {CCCCFF}Mecanico:{FF9000} %s\n", InfoOrg[24][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 25 - {00660C}GATE:{FF9000} %s\n", InfoOrg[25][Lider]);
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 26 - {FF8000}D.E.T.R.A.N:{FF9000} Desativada\n");
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 27 - {008040}P.Rodoviaria Federal:{FF9000} Desativada\n");
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 28 - {878787}Guarda Municipal:{FF9000} Desativada\n");
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 29 - {A7A5C7}Mafia Russa:{FF9000} Desativada\n");
strcat(DialogNGL,string);
format(string,sizeof(string), "{FFFFFF} 30 - {FF8040}Mafia Inglesa:{FF9000} Desativada\n\n");
strcat(DialogNGL,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{00ECEC}Lнderes das Organizaзхes", DialogNGL, "Fechar", "");
}
return true;
}
OBS: quando ele digita /contaslider ele sai de lider. sу que la em /orgs deveria ficar assim
Exemplo: Policia militar: Ninguem sу que fica com o nome do lider e nao sai! sу sai digitando /limparlider