[ajuda] /orgs
#1

pawn Код:
{
        /*if(PlayerInfo[playerid][pAdmin] < 1)
        {
            SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um admin.");
            return 1;
        }*/

        SendClientMessage(playerid, COLOR_WHITE, "{B5B5B5}|=============[ {FFB90F}Lideres das Organizaзхes {B5B5B5}]=============|");
        format(string, sizeof(string), "{FFB90F}Policia Militar: {B5B5B5}%s", InfoOrg[1][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}B.O.P.E: {B5B5B5}%s", InfoOrg[2][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Exйrcito: {B5B5B5}%s", InfoOrg[3][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}S.A.M.U: {B5B5B5}%s", InfoOrg[4][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Aztecas: {B5B5B5}%s", InfoOrg[5][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Hamas: {B5B5B5}%s", InfoOrg[6][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Prefeitura: {B5B5B5}%s", InfoOrg[7][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Hitmans: {B5B5B5}%s", InfoOrg[8][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Reporteres: {B5B5B5}%s", InfoOrg[9][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Taxistas: {B5B5B5}%s", InfoOrg[10][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Policia Federal: {B5B5B5}%s", InfoOrg[11][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Cosa Nostra: {B5B5B5}%s", InfoOrg[12][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Yakuza: {B5B5B5}%s", InfoOrg[13][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Groove: {B5B5B5}%s", InfoOrg[14][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Al'qaeda: {B5B5B5}%s", InfoOrg[15][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Policia Civil: {B5B5B5}%s", InfoOrg[16][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Ballas: {B5B5B5}%s", InfoOrg[17][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Vagos: {B5B5B5}%s", InfoOrg[18][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Comando Vermelho: {B5B5B5}%s", InfoOrg[19][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Primeiro Comando da Capital: {B5B5B5}%s", InfoOrg[20][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Terceiro Comando Puro: {B5B5B5}%s", InfoOrg[21][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Amigos dos Amigos: {B5B5B5}%s", InfoOrg[22][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Punks: {B5B5B5}%s", InfoOrg[23][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Polнcia Rodoviбria Federal: {B5B5B5}%s", InfoOrg[24][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        format(string, sizeof(string), "{FFB90F}Drifters: {B5B5B5}%s", InfoOrg[25][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        format(string, sizeof(string), "{FFB90F}Bombeiros: {B5B5B5}%s", InfoOrg[26][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        format(string, sizeof(string), "{FFB90F}F.A.R.C: {B5B5B5}%s", InfoOrg[27][Lider]);
        SendClientMessage(playerid, COR_WHITE, string);
        //SendClientMessage(playerid, 0x090030AA, "===============================================================================");
        return 1;
    }

sempre dpois que da gmx ou algo do tipo fechar.. dpois quando volta vocк dб /orgs o lider nao mostra mais ele buga ou sei la alguem poderia me ajudar?
Reply
#2

Eu acho q quando vc da gmx ele nгo geta os lideres nas devidas variaveis sendo assim nгo mostra no /orgs. veja se ta getando dps do gmx!
Reply
#3

pawn Код:
if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            //new string22[128];
            if (PlayerInfo[playerid][pAdmin] >= 1342)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342) { return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); }
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    { OnPlayerSave(i); }
                }
                GameTextForPlayer(playerid, "~g~Reiniciando, Aguarde... ", 3000, 3);
                GameModeExitFunc();
                SaveAccounts();
                OnPlayerSave(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para dar GMX!");
            }
        }
        return true;
    }
bom eu achei que seria isso mais nao sabia qual era a variavel certo para getar dpois do gmx , tem como vocк me dar uma ajuda?
Reply
#4

posta isso.

GameModeExitFunc
SaveAccounts
OnPlayerSave
Reply
#5

OnPlayerSave
pawn Код:
forward OnPlayerSave(playerid);
public OnPlayerSave(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid])
        {
            new string3[64];
            new playername3[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playername3, sizeof(playername3));
            format(string3, sizeof(string3), "Players/%s.ini", playername3);
            new File: hFile = fopen(string3, io_write);
            if (hFile)
            {
                new var[32];
                format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
                PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
                format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
                format(var, 32, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
                format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pVIP]);fwrite(hFile, var);
                format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
                format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
                format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
                format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
                format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
                format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
                format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
                format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pConta]);fwrite(hFile, var);
                format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
                format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
                format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
                format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
                format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
                format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
                format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
                format(var, 32, "Emprego=%d\n",PlayerInfo[playerid][pEmprego]);fwrite(hFile, var);
                format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pSalario]);fwrite(hFile, var);
                format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
                format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
                format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
                format(var, 32, "Materiais=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
                format(var, 32, "Maconha=%d\n",PlayerInfo[playerid][pDrogas]);fwrite(hFile, var);
                format(var, 32, "Cocaina=%d\n",PlayerInfo[playerid][pDrogas2]);fwrite(hFile, var);
                format(var, 32, "Crack=%d\n",PlayerInfo[playerid][pDrogas3]);fwrite(hFile, var);
                format(var, 32, "Lider=%d\n",PlayerInfo[playerid][pLider]);fwrite(hFile, var);
                format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMembro]);fwrite(hFile, var);
                format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pCargo]);fwrite(hFile, var);
                format(var, 32, "Char=%d\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
                format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
                format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
                format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
                format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
                format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
                format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
                format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
                format(var, 32, "DrogasSkill=%d\n",PlayerInfo[playerid][pDrogasSkill]);fwrite(hFile, var);
                format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
                format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
                format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
                format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
                format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
                format(var, 32, "House=%d\n",PlayerInfo[playerid][pPHousekey]);fwrite(hFile, var);
                format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
                format(var, 32, "Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
                format(var, 32, "SafeMaconha=%d\n",PlayerInfo[playerid][pSafeDrogas]);fwrite(hFile, var);
                format(var, 32, "SafeCocaina=%d\n",PlayerInfo[playerid][pSafeDrogas2]);fwrite(hFile, var);
                format(var, 32, "SafeCrack=%d\n",PlayerInfo[playerid][pSafeDrogas3]);fwrite(hFile, var);
                format(var, 32, "NivelProcurado=%d\n",WantedPoints[playerid]);fwrite(hFile, var);
                format(var, 32, "SafeMateriais=%d\n",PlayerInfo[playerid][psMats]);fwrite(hFile, var);
                format(var, 32, "Socio=%d\n",PlayerInfo[playerid][pSocio]);fwrite(hFile, var);
                if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
                {
                    PlayerInfo[playerid][pPos_x] = 1684.9;
                    PlayerInfo[playerid][pPos_y] = -2244.5;
                    PlayerInfo[playerid][pPos_z] = 13.5;
                }
                if(Spectate[playerid] != 255)
                {
                    PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
                    PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
                    PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
                    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
                    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
                }
                format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
                format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
                format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
                format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
                format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
                format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
                format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
                format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
                format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
                format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
                format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
                format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
                format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
                format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
                format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
                format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
                format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
                format(var, 32, "Avisos=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
                format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
                format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
                format(var, 32, "Luta=%d\n",PlayerInfo[playerid][pLuta]);fwrite(hFile, var);
                format(var, 32, "Dorgado=%d\n",PlayerInfo[playerid][pDorgado]);fwrite(hFile, var);
                format(var, 32, "Dorgado2=%d\n",PlayerInfo[playerid][pDorgado]);fwrite(hFile, var);
                format(var, 32, "Doenca=%d\n",PlayerInfo[playerid][pDoenca]);fwrite(hFile, var);
                format(var, 32, "Creditos=%d\n",PlayerInfo[playerid][pCreditos]);fwrite(hFile, var);
                format(var, 32, "LU=%s\n",PlayerInfo[playerid][pLastLogin]);fwrite(hFile, var);
                GetPlayerWeaponData(playerid, 1, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
                GetPlayerWeaponData(playerid, 2, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
                GetPlayerWeaponData(playerid, 3, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pAmmo3]);
                GetPlayerWeaponData(playerid, 4, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pAmmo4]);
                GetPlayerWeaponData(playerid, 5, PlayerInfo[playerid][pGun5], PlayerInfo[playerid][pAmmo5]);
                GetPlayerWeaponData(playerid, 6, PlayerInfo[playerid][pGun6], PlayerInfo[playerid][pAmmo6]);
                GetPlayerWeaponData(playerid, 7, PlayerInfo[playerid][pGun7], PlayerInfo[playerid][pAmmo7]);
                GetPlayerWeaponData(playerid, 8, PlayerInfo[playerid][pGun8], PlayerInfo[playerid][pAmmo8]);
                GetPlayerWeaponData(playerid, 9, PlayerInfo[playerid][pGun9], PlayerInfo[playerid][pAmmo9]);
                GetPlayerWeaponData(playerid, 10, PlayerInfo[playerid][pGun10], PlayerInfo[playerid][pAmmo10]);
                GetPlayerWeaponData(playerid, 11, PlayerInfo[playerid][pGun11], PlayerInfo[playerid][pAmmo11]);
                GetPlayerWeaponData(playerid, 12, PlayerInfo[playerid][pGun12], PlayerInfo[playerid][pAmmo12]);
                format(var, 32, "Gun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
                format(var, 32, "Gun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
                format(var, 32, "Gun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
                format(var, 32, "Gun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
                format(var, 32, "Gun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
                format(var, 32, "Gun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
                format(var, 32, "Gun7=%d\n", PlayerInfo[playerid][pGun7]);fwrite(hFile, var);
                format(var, 32, "Gun8=%d\n", PlayerInfo[playerid][pGun8]);fwrite(hFile, var);
                format(var, 32, "Gun9=%d\n", PlayerInfo[playerid][pGun9]);fwrite(hFile, var);
                format(var, 32, "Gun10=%d\n", PlayerInfo[playerid][pGun10]);fwrite(hFile, var);
                format(var, 32, "Gun11=%d\n", PlayerInfo[playerid][pGun11]);fwrite(hFile, var);
                format(var, 32, "Gun12=%d\n", PlayerInfo[playerid][pGun12]);fwrite(hFile, var);
                format(var, 32, "Ammo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
                format(var, 32, "Ammo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
                format(var, 32, "Ammo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
                format(var, 32, "Ammo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
                format(var, 32, "Ammo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
                format(var, 32, "Ammo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
                format(var, 32, "Ammo7=%d\n", PlayerInfo[playerid][pAmmo7]);fwrite(hFile, var);
                format(var, 32, "Ammo8=%d\n", PlayerInfo[playerid][pAmmo8]);fwrite(hFile, var);
                format(var, 32, "Ammo9=%d\n", PlayerInfo[playerid][pAmmo9]);fwrite(hFile, var);
                format(var, 32, "Ammo10=%d\n", PlayerInfo[playerid][pAmmo10]);fwrite(hFile, var);
                format(var, 32, "Ammo11=%d\n", PlayerInfo[playerid][pAmmo11]);fwrite(hFile, var);
                format(var, 32, "Ammo12=%d\n", PlayerInfo[playerid][pAmmo12]);fwrite(hFile, var);
                fclose(hFile);
            }
        }
    }
    return 1;
}


SaveAccounts
pawn Код:
forward OnPlayerSave(playerid);
public SaveAccounts()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        OnPlayerSave(i);
        if(IsPlayerConnected(i))
        {
                if(PlayerInfo[i][pContractTime] < 25)
                {
                    PlayerInfo[i][pContractTime] ++;
            }
        }
    }
    SalvarCofreOrg();
    return 1;
}

GameModeExitFunc
pawn Код:
public GameModeExitFunc()
{
//  KillTimer(synctimer);
    KillTimer(TempoAnGang);
    KillTimer(TempoAnMafia);
    KillTimer(TempoAnDrift);
    KillTimer(TempoAnAlqaeda);
    KillTimer(TempoAnFarc);
    KillTimer(TempoRecarga);
    KillTimer(TempoAnHamas);
    KillTimer(TempoAnPrefeito);
    KillTimer(TempoAnTaxi);
    KillTimer(TempoAnHitmans);
    KillTimer(TempoAnmerce);
    KillTimer(newmistimer);
    KillTimer(unjailtimer);
    KillTimer(othtimer);
    KillTimer(cartimer);
    KillTimer(Contastimer);
    KillTimer(checkgastimer);
    KillTimer(pickuptimer);
    KillTimer(productiontimer);
    KillTimer(spectatetimer);
    KillTimer(stoppedvehtimer);
    KillTimer(turftimer);
    KillTimer(weaponhacktimer);
    KillTimer(tempoGranaTR);
    KillTimer(TempoAdministrador);
    KillTimer(TempoAn);
    KillTimer(TempoKitVip3);
    KillTimer(TempoKitVip2);
    KillTimer(TempoKitVip1);
    KillTimer(TempoCorrida);
    KillTimer(TempoSequestrar);
    KillTimer(TempoAmarrar);
    KillTimer(TempoServicoTaxi);
    KillTimer(TempoServicoOnibus);
    KillTimer(TempoServicoPolicia);
    KillTimer(TempoServicoMedico);
    KillTimer(TempoServicoMecanico);
    KillTimer(TempoMecanico);
    KillTimer(TempoMedico);
    KillTimer(TempoCorridaOni);
    KillTimer(TempoAnGov);
    KillTimer(TempoAnReporter);
    KillTimer(TempoSincronizar);
    KillTimer(Tempohbomba);
//  KillTimer(Tempoincendiar);
    KillTimer(Tempocbomba);
    OnPropUpdate();
    SaveIRC();
    SaveBoxer();
    SaveCars();
    GameModeExit();
}
Reply
#6

Ainda nгo tem oq possa ajudar ai. tem procurar por oq get e salva as variaveis InfoOrg.
Reply
#7

pawn Код:
if(GetPlayerOrg(playerid) != 0)
            {
                new arquivo[128];
                format(arquivo, sizeof(arquivo), "ORG Arquivos/Org%d.cfg",GetPlayerOrg(playerid));
                for(new i = 1; i < sizeof(InfoOrg); i++)
                {
                    if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0)
                    {
                        if(strcmp(playername,InfoOrg[i][Lider],true)==0)
                        {
                            strmid(InfoOrg[i][Lider], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Lider",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][SubLider],true)==0)
                        {
                            strmid(InfoOrg[i][SubLider], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"SubLider",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro1],true)==0)
                        {
                            strmid(InfoOrg[i][Membro1], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro1",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro2],true)==0)
                        {
                            strmid(InfoOrg[i][Membro2], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro2",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro3],true)==0)
                        {
                            strmid(InfoOrg[i][Membro3], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro3",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro4],true)==0)
                        {
                            strmid(InfoOrg[i][Membro4], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro4",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro5],true)==0)
                        {
                            strmid(InfoOrg[i][Membro5], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro5",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro6],true)==0)
                        {
                            strmid(InfoOrg[i][Membro6], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro6",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro7],true)==0)
                        {
                            strmid(InfoOrg[i][Membro7], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro7",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro8],true)==0)
                        {
                            strmid(InfoOrg[i][Membro8], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro8",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro9],true)==0)
                        {
                            strmid(InfoOrg[i][Membro9], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro9",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro10],true)==0)
                        {
                            strmid(InfoOrg[i][Membro10], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro10",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro11],true)==0)
                        {
                            strmid(InfoOrg[i][Membro11], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro11",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro12],true)==0)
                        {
                            strmid(InfoOrg[i][Membro12], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro12",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro13],true)==0)
                        {
                            strmid(InfoOrg[i][Membro13], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro13",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro14],true)==0)
                        {
                            strmid(InfoOrg[i][Membro14], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro14",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro15], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro15",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro16], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro16",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro17], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro17",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro18], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro18",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro19], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro19",x_Nick);
                        }
                        if(strcmp(playername,InfoOrg[i][Membro15],true)==0)
                        {
                            strmid(InfoOrg[i][Membro20], x_Nick, 0, strlen(x_Nick), MAX_PLAYER_NAME);
                            dini_Set(arquivo,"Membro20",x_Nick);
                        }
                    }
                }
            }
            getdate(year, month, day);
            gettime(hour,minute);
            format(string, sizeof(string), "%s Mudou o Nick para %s ( %d/%d/%d - %d:%d)",playername,x_Nick, day, month, year,hour, minute);
            ABroadCast(COLOR_YELLOW,string,1);
            NickLog(string);
            SetPlayerName(playerid,x_Nick);
            format(string, sizeof(string), "Vocк mudou seu nick para %s",x_Nick );
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Tire uma SS apertando F8 para nгo esquecer seu novo nick!");
            MudarNickAceito[playerid] = 0;
            OnPropUpdate();
            SaveAdm();
            SaveCars();
            OnPlayerSave(playerid);
            mudandonick[playerid] = 0;
            return 1;
        }
        return 1;
    }
esse?

pawn Код:
forward LoadOrgs();
public LoadOrgs()
{
    new arquivo[256];
    new idx = 1;
    while (idx < sizeof(InfoOrg))
    {
        format(arquivo, sizeof(arquivo), "ORG Arquivos/Org%d.cfg",idx);
        strmid(InfoOrg[idx][Lider], dini_Get(arquivo,"Lider"), 0, strlen(dini_Get(arquivo,"Lider")), 255);
        strmid(InfoOrg[idx][SubLider], dini_Get(arquivo,"SubLider"), 0, strlen(dini_Get(arquivo,"SubLider")), 255);
        strmid(InfoOrg[idx][Membro1], dini_Get(arquivo,"Membro1"), 0, strlen(dini_Get(arquivo,"Membro1")), 255);
        strmid(InfoOrg[idx][Membro2], dini_Get(arquivo,"Membro2"), 0, strlen(dini_Get(arquivo,"Membro2")), 255);
        strmid(InfoOrg[idx][Membro3], dini_Get(arquivo,"Membro3"), 0, strlen(dini_Get(arquivo,"Membro3")), 255);
        strmid(InfoOrg[idx][Membro4], dini_Get(arquivo,"Membro4"), 0, strlen(dini_Get(arquivo,"Membro4")), 255);
        strmid(InfoOrg[idx][Membro5], dini_Get(arquivo,"Membro5"), 0, strlen(dini_Get(arquivo,"Membro5")), 255);
        strmid(InfoOrg[idx][Membro6], dini_Get(arquivo,"Membro6"), 0, strlen(dini_Get(arquivo,"Membro6")), 255);
        strmid(InfoOrg[idx][Membro7], dini_Get(arquivo,"Membro7"), 0, strlen(dini_Get(arquivo,"Membro7")), 255);
        strmid(InfoOrg[idx][Membro8], dini_Get(arquivo,"Membro8"), 0, strlen(dini_Get(arquivo,"Membro8")), 255);
        strmid(InfoOrg[idx][Membro9], dini_Get(arquivo,"Membro9"), 0, strlen(dini_Get(arquivo,"Membro9")), 255);
        strmid(InfoOrg[idx][Membro10], dini_Get(arquivo,"Membro10"), 0, strlen(dini_Get(arquivo,"Membro10")), 255);
        strmid(InfoOrg[idx][Membro11], dini_Get(arquivo,"Membro11"), 0, strlen(dini_Get(arquivo,"Membro11")), 255);
        strmid(InfoOrg[idx][Membro12], dini_Get(arquivo,"Membro12"), 0, strlen(dini_Get(arquivo,"Membro12")), 255);
        strmid(InfoOrg[idx][Membro13], dini_Get(arquivo,"Membro13"), 0, strlen(dini_Get(arquivo,"Membro13")), 255);
        strmid(InfoOrg[idx][Membro14], dini_Get(arquivo,"Membro14"), 0, strlen(dini_Get(arquivo,"Membro14")), 255);
        strmid(InfoOrg[idx][Membro15], dini_Get(arquivo,"Membro15"), 0, strlen(dini_Get(arquivo,"Membro15")), 255);
        strmid(InfoOrg[idx][Membro16], dini_Get(arquivo,"Membro16"), 0, strlen(dini_Get(arquivo,"Membro16")), 255);
        strmid(InfoOrg[idx][Membro17], dini_Get(arquivo,"Membro17"), 0, strlen(dini_Get(arquivo,"Membro17")), 255);
        strmid(InfoOrg[idx][Membro18], dini_Get(arquivo,"Membro18"), 0, strlen(dini_Get(arquivo,"Membro18")), 255);
        strmid(InfoOrg[idx][Membro19], dini_Get(arquivo,"Membro19"), 0, strlen(dini_Get(arquivo,"Membro19")), 255);
        strmid(InfoOrg[idx][Membro20], dini_Get(arquivo,"Membro20"), 0, strlen(dini_Get(arquivo,"Membro20")), 255);
        idx ++;
    }
    printf("[MYL]: %d Orgs Carregadas", idx);
    return 1;
}
pawn Код:
LoadOrgs();
    LoadCofreOrg();
ve se pode ser 1 desses se nao for acho que o /lider dб para vocк ve qual a variavel utilizavel
Reply
#8

Ta tudo correto. isso soh ocorre quando da o gmx ? fora isso ele funciona normal tipo quando vc ligar o server ?
Reply
#9

nгo quando eu ligo ele ja loga sem os lider no /infolider , acho que nao esta carregando no onplayerconnect seila.. vocк nao saberia oque й ou alguma ideia?
Reply
#10

Entao й isso! Coloque isto LoadOrgs(); OnGameModeInit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)