Problemas ao Dar GMX -
shadauer - 03.05.2013
Problema Enfrentado: Apуs GMX, Some os Lнderes Da Lista /Orgs
Comando /GMX:
pawn Код:
if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3000)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 3000) { return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); }
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{ OnPlayerSave(i); }
ShowPlayerDialog(i, 156, DIALOG_STYLE_MSGBOX, "{FF8000}Servidor Reiniciando", "{00FF00}O servidor estб sendo Reiniciado(GMX).\n\n{8080FF}Nгo saia do Servidor!!!\n\n{FFFF00}Por Favor Aguarde...", "OK", "");
}
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string,sizeof(string), "AdmCmd: %s Reiniciou o servidor (GMX), AGUARDE!.",sendername);
SendClientMessageToAll(CORS, string);
format(string,sizeof(string), "Brasil {FFD700}New {1E90FF}City{FFFF00} Servidor reiniciando, Nгo saia do servidor!.");
SendClientMessageToAll(0x00FF00FF, string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerDialog(i, 156, DIALOG_STYLE_MSGBOX, "{FF8000}Servidor Reiniciando", "{00FF00}O servidor estб sendo Reiniciado(GMX).\n\n{8080FF}Nгo saia do Servidor!!!\n\n{FFFF00}Por Favor Aguarde...", "OK", "");
}
GameModeExitFunc();
}
else
{
Comando /Orgs:
pawn Код:
if (strcmp("/infolider", cmdtext, true, 10) == 0 || strcmp(cmd, "/orgs", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new DialogVinny[1500];
//SendClientMessage(playerid, 0xFF00FFAA, "[BNC] Lideres das Organizaзхes:");
format(string,sizeof(string), "{FF9000} 1 - {FFFFFF}Policia Militar:{FF9000} %s\n", InfoOrg[1][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 2 - {FFFFFF}ROTA:{FF9000} %s\n", InfoOrg[2][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 3 - {FFFFFF}Exйrcito:{FF9000} %s\n", InfoOrg[3][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 4 - {FFFFFF}Mйdicos:{FF9000} %s\n", InfoOrg[4][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 5 - {FFFFFF}Aztecas:{FF9000} %s\n", InfoOrg[5][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 6 - {FFFFFF}Taliban:{FF9000} %s\n", InfoOrg[6][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 7 - {FFFFFF}Prefeitura: {FF9000}%s\n", InfoOrg[7][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 8 - {FFFFFF}Hitmans:{FF9000} %s\n", InfoOrg[8][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 9 - {FFFFFF}Reporteres:{FF9000} %s\n", InfoOrg[9][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 10 - {FFFFFF}Taxistas:{FF9000} %s\n", InfoOrg[10][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 11 - {FFFFFF}Policia Federal:{FF9000} %s\n", InfoOrg[11][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 12 - {FFFFFF}Cosa Nostra:{FF9000} %s\n", InfoOrg[12][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 13 - {FFFFFF}Yakuza:{FF9000} %s\n", InfoOrg[13][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 14 - {FFFFFF}Groove:{FF9000} %s\n", InfoOrg[14][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 15 - {FFFFFF}Al'qaeda:{FF9000} %s\n", InfoOrg[15][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 16 - {FFFFFF}Polнcia Rodoviбria: {FF9000}%s\n", InfoOrg[16][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 17 - {FFFFFF}Ballas: {FF9000}%s\n", InfoOrg[17][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 18 - {FFFFFF}Vagos:{FF9000} %s\n", InfoOrg[18][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 19 - {FFFFFF}Comando Vermelho:{FF9000} %s\n", InfoOrg[19][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 20 - {FFFFFF}PCC: {FF9000}%s\n", InfoOrg[20][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 21 - {FFFFFF}Hells Angels:{FF9000} %s\n", InfoOrg[21][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 22 - {FFFFFF}Mongols:{FF9000} %s\n", InfoOrg[22][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 23 - {FFFFFF}Sons Of Anarchy:{FF9000} %s\n", InfoOrg[23][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 24 - {FFFFFF}Triads:{FF9000} %s\n", InfoOrg[24][Lider]);
strcat(DialogVinny,string);
format(string,sizeof(string), " 25 - {FFFFFF}Drifters:{FF9000} %s\n\n", InfoOrg[25][Lider]);
strcat(DialogVinny,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{00ECEC}Lнderes das Organizaзхes", DialogVinny, "Fechar", "");
}
return true;
}
Help?
Re: Problemas ao Dar GMX -
FixSkuL - 03.05.2013
Esse InfoOrg, verifica se o valor esta sendo obtido corretamente.
Faзa um debug.
Re: Problemas ao Dar GMX -
mau.tito - 03.05.2013
Faзa salvar o infolider .
Re: Problemas ao Dar GMX -
shadauer - 03.05.2013
Como assim
FixSkuL ?
Re: Problemas ao Dar GMX -
FixSkuL - 03.05.2013
Depois do gmx vocк esta obtendo as informaзхes da org do arquivo da scriptfiles ?
Pois se nгo me engano, as variбveis sгo resetadas ao dar gmx.
Re: Problemas ao Dar GMX -
shadauer - 03.05.2013
Nгo ... Nгo vi nada no Server.log Relativo :/
Caso seje Ъtil Para Nosso Problema, Analiza :
CMD De Dar Lider.
pawn Код:
if(strcmp(cmd, "/lider", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [id] [Numero(1-21)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level == 0) { SendClientMessage(playerid, COLOR_GREY, "Para tirar o lider de uma organizaзгo vocк deve usar /limparlider"); return 1; }
if(level > 25 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Lнder de 1 a 22"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 3000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
if(PlayerInfo[para1][pLider] != 0 || PlayerInfo[para1][pMembro] != 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Este player jб participa de uma organizaзгo!");
return 1;
}
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(strcmp(InfoOrg[level][Lider],"Ninguem",true)==0)
{
ConviteInfoOrg(PlayerName(para1), level, 6);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Jб tem lнder nessa ORG, use /limparlider antes de colocar outro lider");
return 1;
}
if(level == 1) { PlayerInfo[para1][pSkin] = 283; }//Policia Militar
else if(level == 2) { PlayerInfo[para1][pSkin] = 285; }//ROTA
else if(level == 3) { PlayerInfo[para1][pSkin] = 287; }//Exйrcito
else if(level == 4) { PlayerInfo[para1][pSkin] = 70; }//Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pSkin] = 115; }//Varrios Los Aztecas
else if(level == 6) { PlayerInfo[para1][pSkin] = 249; }//Taliban
else if(level == 7) { PlayerInfo[para1][pSkin] = 147; }//Prefeito
else if(level == 8) { PlayerInfo[para1][pSkin] = 294; }//Hitmans
else if(level == 9) { PlayerInfo[para1][pSkin] = 227; }//Repуrters
else if(level == 10) { PlayerInfo[para1][pSkin] = 61; }//Taxistas
else if(level == 11) { PlayerInfo[para1][pSkin] = 295; }//Policia Federal
else if(level == 12) { PlayerInfo[para1][pSkin] = 113; }//Mбfia Cosa Nostra
else if(level == 13) { PlayerInfo[para1][pSkin] = 120; }//Mбfia Yakuza
else if(level == 14) { PlayerInfo[para1][pSkin] = 270; }//Groove
else if(level == 15) { PlayerInfo[para1][pSkin] = 123; }//ALQaeda
else if(level == 16) { PlayerInfo[para1][pSkin] = 186; }//Polнcia Rodoviбria Federal
else if(level == 17) { PlayerInfo[para1][pSkin] = 104; }//Ballas
else if(level == 18) { PlayerInfo[para1][pSkin] = 108; }//Vagos
else if(level == 19) { PlayerInfo[para1][pSkin] = 19; }//CV
else if(level == 20) { PlayerInfo[para1][pSkin] = 143; }//PCC
else if(level == 21) { PlayerInfo[para1][pSkin] = 247; }//Hells Angels
else if(level == 22) { PlayerInfo[para1][pSkin] = 181; }//Mongols
else if(level == 23) { PlayerInfo[para1][pSkin] = 101; }//son
else if(level == 24) { PlayerInfo[para1][pSkin] = 112; }//triads
else if(level == 25) { PlayerInfo[para1][pSkin] = 29; }//triads
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLider] = level;
format(string, sizeof(string), " Vocк foi promovido a lider pelo admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE," Promovido Com sucesso !!");
format(string, sizeof(string), " Vocк promoveu %s a Lider.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
MedicBill[para1] = 0;
gTeam[para1] = 11;
PlayerInfo[para1][pTeam] = 11;
PlayerInfo[para1][pCargo] = 6;
//SendClientMessageToAll(0x80FF80AA,"***.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•[ {0080FF}Brasil PlayCity Notнcias{80FF80} ]•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•.•***");
format(gstring, sizeof(gstring), "[BNC]{80E3FF} %s{FFFFFF} Novo lider da ORG: {00ECEC}%s{FFFFFF} para mais informaзхes /infolideres.", giveplayer, NomeORG(para1));// se num funfa NomeORG(GetPlayerOrg(para1))
SendClientMessageToAll(0xFF8080FF, gstring);
SetPlayerSkin(para1, PlayerInfo[para1][pSkin]);
SetPlayerSpawn(para1);
Atualizar3Dtexts();
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
Re: Problemas ao Dar GMX -
FixSkuL - 03.05.2013
Provavelmente й isso, Tenta salvar o InfoOrg ( se ja й salvo), faзa carregar apуs o gmx.
Tipo:
Variбvel = DOF2_GetInt.........
Re: Problemas ao Dar GMX -
shadauer - 03.05.2013
Desculpe minha Ignorвncia, Atй pq Ja to a Quase 2 Anos Parados Mas ...
Como tu queres que eu Salve A
Infoorg ?
Re: Problemas ao Dar GMX -
FixSkuL - 03.05.2013
Sim, salve e apуs o gmx da um Get do arquivo para a Variбvel
InfoOrg[idorg][lider].
Re: Problemas ao Dar GMX -
shadauer - 03.05.2013
entendi mas vc ta dizendo pra editar no gm sempre q mudar o lider