[Ajuda] Me ajuda os lideres sempre a zerar
#1

Me ajuda sempre que dou /gmx ou desligo e ligo o servidor, os /orgs fica sem nada como podem ver.



Me fala pq
Reply
#2

Scriptfiles ?
Reply
#3

Poste o cуdigo de /orgs e a public OnPlayerDisconnect
Reply
#4

Quote:

if(strcmp(cmd, "/orgs", true) == 0 || strcmp(cmd, "/profs", true) == 0)
{
new DialogThiago[1990];
if(IsPlayerConnected(playerid))
{
//SendClientMessage(playerid, VERDE2, "|__________________________ Orgs __________________________|");
format(string, 128, " {7AADFF}1 - 23Є BPM: {FFFFFF}%s\n", InfoOrg[1][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {ADC7D9}2 - Bope: {FFFFFF}%s\n", InfoOrg[2][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {6CD950}3 - Exercito: {FFFFFF}%s\n", InfoOrg[3][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {F7819A}4 - S.A.M.U: {FFFFFF}%s\n", InfoOrg[4][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {337EFF}5 - Los Astecas: {FFFFFF}%s\n", InfoOrg[5][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {48A3E0}6 - Taliban: {FFFFFF}%s\n", InfoOrg[6][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {6AB4E6}7 - Prefeito: {FFFFFF}%s\n", InfoOrg[7][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {C2CBD1}8 - Hitmans: {FFFFFF}%s\n", InfoOrg[8][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {EDD893}9 - Rede Globo: {FFFFFF}%s\n", InfoOrg[9][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {93EDDE}10 - Taxista: {FFFFFF}%s\n", InfoOrg[10][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {FFFF00}11 - Polнcia Rodoviбria Federal: {FFFFFF}%s\n", InfoOrg[11][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {BF9B47}12 - Mбfia Cosa Nostra: {FFFFFF}%s\n", InfoOrg[12][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {8136B3}13 - Mбfia Yakuza: {FFFFFF}%s\n", InfoOrg[13][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {00DB1D}14 - Groove Street: {FFFFFF}%s\n", InfoOrg[14][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {EDE187}15 - Al'qaeda: {FFFFFF}%s\n", InfoOrg[15][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {BDA34D}16 - Policia Civil: {FFFFFF}%s\n", InfoOrg[16][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {CB42E3}17 - Ballas: {FFFFFF}%s\n", InfoOrg[17][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {E1ED00}18 - Los Vagos: {FFFFFF}%s\n", InfoOrg[18][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {FF0000}19 - Comando Vermelho: {FFFFFF}%s\n", InfoOrg[19][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {C90000}20 - Sons of Anarchy: {FFFFFF}%s\n", InfoOrg[20][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {46F274}21 - Drifters: {FFFFFF}%s\n", InfoOrg[21][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {A87A31}22 - Triads: {FFFFFF}%s\n", InfoOrg[22][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {FF0066}23 - AsFarc: {FFFFFF}%s\n", InfoOrg[23][Lider]);
strcat(DialogThiago,string);
format(string, 128, " {8470FF}24 - Os Motoqueiros: {FFFFFF}%s\n", InfoOrg[24][Lider]);
strcat(DialogThiago,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{E1ED00}Organizaзхes E Lнderes", DialogThiago, "Ok", "Ok");
}
return true;
}

Public OnPlayerDisconnect

Quote:

public OnPlayerDisconnect(playerid, reason)
{
RemovePlayerAttachedObject(playerid,3);
SetPVarInt(playerid, "laser", 0);
glob000[playerid] = 0;
RemovePlayerAttachedObject(playerid, 0);
RemovePlayerAttachedObject(playerid, 3);
DisablePlayerCheckpoint(playerid);
TextDrawDestroy(Text:FilaAtendimentoText[playerid]);
TextDrawDestroy(Text:TempoAtendimento2Text[playerid]);
KillTimer(timer[playerid]);
FilaAtendimento[playerid] = 999;
TempoAtendimento2[playerid] = 0;
OnPlayerSave(playerid);
KillTimer(tempotd[playerid]);
new caller = Mobile[playerid];
OnPlayerSave(playerid);
if(usandolavacarro == playerid)
{
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
usandolavacarro = -1;
Update3DTextLabelText(textoentrada, COR_AZULZAO, "Ninguйm estб usando o Lava Rбpido agora, o preзo й de R$ 20,00\n(/lavarcarro)");
}
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, "A ligaзгo caiu...");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
if(HireCar[playerid] > 0)
{
VTrancado[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SetVehicleToRespawn(HireCar[playerid]);
HireCar[playerid] = 0;
}
if (PlayerInfo[playerid][pBarraca] != 0)
{
RemoveBarraca(playerid);
}
if (PlayerInfo[playerid][pParedao] != 0)
{
RemoveParedao(playerid);
}
if(pRoadblock[playerid] != 0)
{
RemoveRoadblock(playerid);
}
if(SpikeInfo[playerid][sCreated] != 0)
{
RemoveRoadPregos(playerid);
}
if(pRoadCones[playerid] != 0)
{
RemoveRoadCones(playerid);
}
switch(reason)
{
case 0: format(gstring, sizeof(gstring), "%s saiu do Servidor por erro de conexгo ou crash.", PlayerName(playerid));
case 1: format(gstring, sizeof(gstring), "%s saiu por vontade propria.", PlayerName(playerid));
case 2: format(gstring, sizeof(gstring), "%s Saiu do servidor kickado ou banido.", PlayerName(playerid));
}
ProxDetector(100.0, playerid, gstring,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGH TBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
gActivePlayers[playerid]--;
numplayers--;
if(MudarSenhaAceito[playerid] == 1)
{
MudarSenhaAceito[playerid] = 0;
}
if(MudarNickAceito[playerid] == 1)
{
MudarNickAceito[playerid] = 0;
}
if(ProvocoCasarao[playerid] == 1)
{
GangZoneStopFlashForAll(GZCasarao);
GangZoneShowForAll(GZCasarao, 0xFFFFFF96);
GuerranoCasarao = 0;
ProvocoCasarao[playerid] = 0;
donocasarao = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraCasarao);
}
if(ProvocoEstacao[playerid] == 1)
{
GangZoneStopFlashForAll(GZEstacao);
GangZoneShowForAll(GZEstacao, 0xFFFFFF96);
GuerranaEstacao = 0;
ProvocoEstacao[playerid] = 0;
donoestacao = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraEstacao);
}
if(ProvocoFavela[playerid] == 1)
{
GangZoneStopFlashForAll(GZFavela);
GangZoneShowForAll(GZFavela, 0xFFFFFF96);
GuerranaFavela = 0;
ProvocoFavela[playerid] = 0;
donoFavela = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraFavela);
}
if(ProvocoSkate[playerid] == 1)
{
GangZoneStopFlashForAll(GZSkate);
GangZoneShowForAll(GZSkate, 0xFFFFFF96);
GuerranoSkate = 0;
ProvocoSkate[playerid] = 0;
donoskate = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraSkate);
}
if(ProvocoAero[playerid] == 1)
{
GangZoneStopFlashForAll(GZAero);
GangZoneShowForAll(GZAero, 0xFFFFFF96);
GuerranoAero = 0;
ProvocoAero[playerid] = 0;
donoaero = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraAero);
}
if(ProvocoPark[playerid] == 1)
{
GangZoneStopFlashForAll(GZPark);
GangZoneShowForAll(GZPark, 0xFFFFFF96);
GuerranoPark = 0;
ProvocoPark[playerid] = 0;
donopark = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraPark);
}

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(TaxiAccepted[i] < 999)
{
if(TaxiAccepted[i] == playerid)
{
TaxiAccepted[i] = 999;
GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
TaxiCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(CopsrondaAccepted[i] < 999)
{
if(CopsrondaAccepted[i] == playerid)
{
CopsrondaAccepted[i] = 999;
GameTextForPlayer(i, "~w~Policial o player~n~~r~Deixou o jogo", 5000, 1);
CopsrondaCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(MedicAccepted[i] < 999)
{
if(MedicAccepted[i] == playerid)
{
MedicAccepted[i] = 999;
GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
MedicCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(MechanicAccepted[i] < 999)
{
if(MechanicAccepted[i] == playerid)
{
MechanicAccepted[i] = 999;
GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
MechanicCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(BusAccepted[i] < 999)
{
if(BusAccepted[i] == playerid)
{
BusAccepted[i] = 999;
GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
BusCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
}
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(gstring, sizeof(gstring), "~w~Passageiro saiu~n~~g~ganhou R$%d",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], gstring, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Seu contrato saiu do servidor.");
GoChase[GetChased[playerid]] = 999;
}
}
}

if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
VTrancado[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPHousekey] != gLastCar[playerid]-1)
{
VTrancado[gLastCar[playerid]] = 0;
UnLockCar(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
if(Boxer1 == playerid)
{
if(IsPlayerConnected(Boxer2))
{
PlayerBoxing[Boxer2] = 0;
SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer2, 5);
GameTextForPlayer(Boxer2, "~r~Luta interrompida", 5000, 1);
}
}
else if(Boxer2 == playerid)
{
if(IsPlayerConnected(Boxer1))
{
PlayerBoxing[Boxer1] = 0;
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5);
GameTextForPlayer(Boxer1, "~r~Luta interrompida", 5000, 1);
}
}
InRing = 0;
RorndStarted = 0;
Boxer1 = 255;
Boxer2 = 255;
TBoxer = 255;
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(IsACop(playerid))
{
if(EmpregoDuty[playerid] == 2) { Copsronda -= 1; }
}
if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4)//1 daki pr baixo os 3
{
if(EmpregoDuty[playerid] == 2) { Medics -= 1; }
}
else if(IsAMec(playerid))
{
if(EmpregoDuty[playerid] == 2) { Mechanics -= 1; }
}
//CurrentMoney[playerid] = 0;
OnPlayerSave(playerid);
BusrouteEast[playerid][0] = 0;
BusrouteWest[playerid][0] = 0;
if((PlayerInfo[playerid][pAdmin] >= 1) && (PlayerInfo[playerid][pAdmin] <= GERENTE))
{
new string[256];
new AdminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(string, sizeof(string), "~y~%s: ~r~OFF", AdminName);

for(new i=0; i<MAX_PLAYERS; i++)
{
GameTextForPlayer(i, string , 5000, 1);
}
}
}

Reply
#5

ta ai
Reply
#6

Scriptfiles.
Reply
#7

o erro estб na sua " InfoOrg " vocк nгo deve estar getando como String e sim como um inteiro nulo.
Reply
#8

Pasta InfoOrg.
"InfoLider"
Quote:

Lider1=Ninguem
Lider2=Ninguem
Lider3=Ninguem
Lider4=Ninguem
Lider5=Ninguem
Lider6=Ninguem
Lider7=Ninguem
Lider8=Ninguem
Lider9=Ninguem
Lider10=Ninguem
Lider11=Ninguem
Lider12=Ninguem
Lider13=Ninguem
Lider14=Ninguem
Lider15=Ninguem
Lider16=Ninguem

Lider=Ninguem

"Org 1 a 25"
Quote:

Lider=Ninguem
SubLider=Ninguem
Membro1=Ninguem
Membro2=Ninguem
Membro3=Ninguem
Membro4=Ninguem
Membro5=Ninguem
Membro6=Ninguem
Membro7=Ninguem
Membro8=Ninguem
Membro9=Ninguem
Membro10=Ninguem
Membro11=Ninguem
Membro12=Ninguem
Membro13=Ninguem
Membro14=Ninguem
Membro15=Ninguem
Membro16=Ninguem
Membro17=Ninguem
Membro18=Ninguem
Membro19=Ninguem
Membro20=Ninguem

Reply
#9

Algo Mal
Reply
#10

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
o erro estб na sua " InfoOrg " vocк nгo deve estar getando como String e sim como um inteiro nulo.
Inteiro Nulo ? KKKKK





Oque estб acontecendo й que o gamemode nгo estб armazenando as linhas do arquivo nas variбveis.
Verifique se estб havendo um erro no OnPlayerConnect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)