Привет! Если вы читаете это - Вы еще не зарегистрированы. Это займет не больше минуты. Нажмите здесь, чтобы пройти регистрацию в несколько простых шагов, чтобы пользоваться всеми возможностями нашего форума. Обратите внимание, запрещены непристойные, матерные, бессмысленные (цифры, случайный набор букв) ники. Удачи!

Тема: Помогите с Админкой!!!

Показано с 1 по 10 из 14

  1. #1
    Заблокирован

    Аватар для Mr.Leon

    Статус: Оффлайн
    Регистрация:20.06.2012
    Сообщений:16
    Репутация:0 [+/-] 

    Вопрос Помогите с Админкой!!!

    При входе на мой сервер любому игроку выдает админку 5лвл автоматически как это убрать????

    Мод: Diamond City

    P.S С меня +
  2. #2
    V.I.P

    Аватар для rafael

    Статус: Оффлайн
    Регистрация:03.09.2011
    Сообщений:1,366
    Репутация:467 [+/-] 
    кидай public onplayerconnect
    Ушел, на долго....
    p.s да-да и в скайпе тоже меня не будет.
  3. #3
    Пользователь

    Аватар для Wnirj

    Статус: Оффлайн
    Регистрация:16.03.2012
    Сообщений:737
    Репутация:37 [+/-] 
    [playerid][pAdmin] = 5 что-то вроде этого должно быть убери это
    Приму в дар аккаунты на любых серверах SA:MP.
    Skype" knight-on1
  4. #4
    Заблокирован

    Аватар для Mr.Leon

    Статус: Оффлайн
    Регистрация:20.06.2012
    Сообщений:16
    Репутация:0 [+/-] 
    public OnPlayerConnect(playerid)
    {

    SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
    SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    if(Security != 0)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Владелец изменил правила соглашения, соглашение отменено.");
    Kick(playerid);
    return 1;
    }
    gActivePlayers[playerid]++;
    numplayers++;
    new plname[MAX_PLAYER_NAME];
    //new string[MAX_PLAYER_NAME];
    SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0; SelectGlas[playerid] = 0;
    SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0; SelectGlasPlace[playerid] = 0;
    GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
    ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
    KickPlayer[playerid] = 0; UsedFind[playerid] = 0;
    CP[playerid] = 0; /*Robbed[playerid] = 0;*/ SpawnChange[playerid] = 1;
    CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
    /*RobbedTime[playerid] = 0;*/ MoneyMessage[playerid] = 0; Condom[playerid] = 0;
    STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
    RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
    TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
    RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
    DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
    DrugPrice[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
    DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
    JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
    PlayerInfo[playerid][pWanted] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
    OnDuty[playerid] = 0; TestFishes[playerid] = 0;
    BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0;
    SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
    BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
    FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
    Mobile[playerid] = 255; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
    /*Spectate[playerid] = 500; Spectation[playerid] = 500;*/ PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
    Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
    WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
    PaperOffer[playerid] = 999;
    /* gLastCar[playerid] = 0;*/ FirstSpawn[playerid] = 0;
    gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gRadio[playerid] = 0;
    gSpeedo[playerid] = 0;
    gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
    gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
    PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
    StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
    MatsHolding[playerid] = 0; TutTime[playerid] = 0;
    gPlayerMission[playerid] = 0; TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
    PlayerInfo[playerid][pMoney] = dollah;
    TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
    Locator[playerid] = 0; PlayerOnMission[playerid] = 0; MissionCheckpoint[playerid] = 0;
    PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
    Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0;
    ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
    Courier[playerid] = 0;
    Killed[playerid] = 0;
    GainAdmin[playerid] = 0;
    IznasTime[playerid] = 0; DrugsTime[playerid] = 0; RawDrugs[playerid] = 0; FishTime[playerid] = 0; Pickup[playerid] = 0;
    PlayerInfo[playerid][pBanned] = 0;
    PlayerInfo[playerid][pLevel] = 0;
    PlayerInfo[playerid][pAdmin] = 0;
    PlayerInfo[playerid][pDonateRank] = 0;
    PlayerInfo[playerid][gPupgrade] = 0;
    PlayerInfo[playerid][pConnectTime] = 0;
    PlayerInfo[playerid][pReg] = 0;
    PlayerInfo[playerid][pSex] = 0;
    PlayerInfo[playerid][pAge] = 0;
    PlayerInfo[playerid][pOrigin] = 0;
    PlayerInfo[playerid][pExp] = 0;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pCrimes] = 0;
    PlayerInfo[playerid][pDeaths] = 0;
    PlayerInfo[playerid][pArrested] = 0;
    PlayerInfo[playerid][pWantedDeaths] = 0;
    PlayerInfo[playerid][pPhoneBook] = 0;
    PlayerInfo[playerid][pLottoNr] = 0;
    PlayerInfo[playerid][pFishes] = 0;
    PlayerInfo[playerid][pBiggestFish] = 0;
    PlayerInfo[playerid][pJob] = 0;
    PlayerInfo[playerid][pPayCheck] = 0;
    PlayerInfo[playerid][pHeadValue] = 0;
    PlayerInfo[playerid][pJailed] = 0;
    PlayerInfo[playerid][pJailTime] = 0;
    PlayerInfo[playerid][pMats] = 0;
    PlayerInfo[playerid][pDrugs] = 0;
    PlayerInfo[playerid][pLeader] = 0;
    PlayerInfo[playerid][pMember] = 0;
    PlayerInfo[playerid][pRank] = 0;
    PlayerInfo[playerid][pChar] = 0;
    PlayerInfo[playerid][pContractTime] = 0;
    PlayerInfo[playerid][pDetSkill] = 0;
    PlayerInfo[playerid][pSexSkill] = 0;
    PlayerInfo[playerid][pBoxSkill] = 0;
    PlayerInfo[playerid][pLawSkill] = 0;
    PlayerInfo[playerid][pMechSkill] = 0;
    PlayerInfo[playerid][pJackSkill] = 0;
    PlayerInfo[playerid][pCarSkill] = 0;
    PlayerInfo[playerid][pNewsSkill] = 0;
    PlayerInfo[playerid][pDrugsSkill] = 0;
    PlayerInfo[playerid][pCookSkill] = 0;
    PlayerInfo[playerid][pFishSkill] = 0;
    PlayerInfo[playerid][pCourierSkill] = 0;
    PlayerInfo[playerid][pRDrugsSkill] = 0;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 50.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 15;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    PlayerInfo[playerid][pPnumber] = 0;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pFlatKey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pCarLic] = 0;
    PlayerInfo[playerid][pFlyLic] = 0;
    PlayerInfo[playerid][pBoatLic] = 0;
    PlayerInfo[playerid][pFishLic] = 0;
    PlayerInfo[playerid][pGunLic] = 0;
    PlayerInfo[playerid][pMotoLic] = 0;
    PlayerInfo[playerid][pGun1] = 0;
    PlayerInfo[playerid][pGun2] = 0;
    PlayerInfo[playerid][pGun3] = 0;
    PlayerInfo[playerid][pGun4] = 0;
    PlayerInfo[playerid][pAmmo1] = 0;
    PlayerInfo[playerid][pAmmo2] = 0;
    PlayerInfo[playerid][pAmmo3] = 0;
    PlayerInfo[playerid][pAmmo4] = 0;
    PlayerInfo[playerid][pCarTime] = 0;
    PlayerInfo[playerid][pPayDay] = 0;
    PlayerInfo[playerid][pPayDayHad] = 0;
    PlayerInfo[playerid][pCDPlayer] = 0;
    PlayerInfo[playerid][pWins] = 0;
    PlayerInfo[playerid][pLoses] = 0;
    PlayerInfo[playerid][pAlcoholPerk] = 0;
    PlayerInfo[playerid][pDrugPerk] = 0;
    PlayerInfo[playerid][pMiserPerk] = 0;
    PlayerInfo[playerid][pPainPerk] = 0;
    PlayerInfo[playerid][pTraderPerk] = 0;
    PlayerInfo[playerid][pTut] = 0;
    PlayerInfo[playerid][pRent] = 255;
    PlayerInfo[playerid][pWarns] = 0;
    PlayerInfo[playerid][pFuel] = 0;
    PlayerInfo[playerid][pAdjustable] = 0;
    PlayerInfo[playerid][pChest] = 0;
    FirstAidTime[playerid] = 255;
    PlayerInfo[playerid][pFWarns] = 0;
    PlayerInfo[playerid][pMedicaments] = 0;
    PlayerInfo[playerid][pRadio] = 0;
    PlayerInfo[playerid][pTestTime] = 0;
    Transferid[playerid] = 999;
    pTest[playerid] = 0;
    VehTest[playerid] = 255;
    GunCheckTime[playerid] = 0;
    DrugsInterval[playerid] = 0;
    PlayerInfo[playerid][pCarKey] = -1;
    InLoaderJob[playerid] = 0; Meshki[playerid] = 0; Meshok[playerid] = 0;
    RENTCAR[playerid] = 9999;
    PlayerFuel[playerid] = 0;
    ClearCrime(playerid);
    ClearFishes(playerid);
    ClearCooking(playerid);
    ClearGroceries(playerid);
    ClearMarriage(playerid);
    SetPlayerToTeamColor(playerid);
    ServerResetPlayerWeapons(playerid);
    GetPlayerName(playerid, plname, sizeof(plname));
    new file[256];
    format(file, sizeof(file), "Accounts/%s.ini", plname
  5. #5
    Заблокирован

    Аватар для DrakulA

    Статус: Оффлайн
    Регистрация:10.06.2012
    Сообщений:624
    Репутация:211 [+/-] 
    public OnPlayerConnect(playerid)
    {

    SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
    SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    if(Security != 0)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "Владелец изменил правила соглашения, соглашение отменено.");
    Kick(playerid);
    return 1;
    }
    gActivePlayers[playerid]++;
    numplayers++;
    new plname[MAX_PLAYER_NAME];
    //new string[MAX_PLAYER_NAME];
    SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0; SelectGlas[playerid] = 0;
    SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0; SelectGlasPlace[playerid] = 0;
    GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
    ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
    KickPlayer[playerid] = 0; UsedFind[playerid] = 0;
    CP[playerid] = 0; /*Robbed[playerid] = 0;*/ SpawnChange[playerid] = 1;
    CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
    /*RobbedTime[playerid] = 0;*/ MoneyMessage[playerid] = 0; Condom[playerid] = 0;
    STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
    RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
    TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
    RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
    DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
    DrugPrice[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
    DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
    JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
    PlayerInfo[playerid][pWanted] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
    OnDuty[playerid] = 0; TestFishes[playerid] = 0;
    BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0;
    SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
    BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
    FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
    Mobile[playerid] = 255; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
    /*Spectate[playerid] = 500; Spectation[playerid] = 500;*/ PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
    Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
    WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
    PaperOffer[playerid] = 999;
    /* gLastCar[playerid] = 0;*/ FirstSpawn[playerid] = 0;
    gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gRadio[playerid] = 0;
    gSpeedo[playerid] = 0;
    gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
    gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
    PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
    StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
    MatsHolding[playerid] = 0; TutTime[playerid] = 0;
    gPlayerMission[playerid] = 0; TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
    PlayerInfo[playerid][pMoney] = dollah;
    TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
    Locator[playerid] = 0; PlayerOnMission[playerid] = 0; MissionCheckpoint[playerid] = 0;
    PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
    Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0;
    ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
    Courier[playerid] = 0;
    Killed[playerid] = 0;
    GainAdmin[playerid] = 0;
    IznasTime[playerid] = 0; DrugsTime[playerid] = 0; RawDrugs[playerid] = 0; FishTime[playerid] = 0; Pickup[playerid] = 0;
    PlayerInfo[playerid][pBanned] = 0;
    PlayerInfo[playerid][pLevel] = 0;
    PlayerInfo[playerid][pAdmin] = 0;
    PlayerInfo[playerid][pDonateRank] = 0;
    PlayerInfo[playerid][gPupgrade] = 0;
    PlayerInfo[playerid][pConnectTime] = 0;
    PlayerInfo[playerid][pReg] = 0;
    PlayerInfo[playerid][pSex] = 0;
    PlayerInfo[playerid][pAge] = 0;
    PlayerInfo[playerid][pOrigin] = 0;
    PlayerInfo[playerid][pExp] = 0;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pCrimes] = 0;
    PlayerInfo[playerid][pDeaths] = 0;
    PlayerInfo[playerid][pArrested] = 0;
    PlayerInfo[playerid][pWantedDeaths] = 0;
    PlayerInfo[playerid][pPhoneBook] = 0;
    PlayerInfo[playerid][pLottoNr] = 0;
    PlayerInfo[playerid][pFishes] = 0;
    PlayerInfo[playerid][pBiggestFish] = 0;
    PlayerInfo[playerid][pJob] = 0;
    PlayerInfo[playerid][pPayCheck] = 0;
    PlayerInfo[playerid][pHeadValue] = 0;
    PlayerInfo[playerid][pJailed] = 0;
    PlayerInfo[playerid][pJailTime] = 0;
    PlayerInfo[playerid][pMats] = 0;
    PlayerInfo[playerid][pDrugs] = 0;
    PlayerInfo[playerid][pLeader] = 0;
    PlayerInfo[playerid][pMember] = 0;
    PlayerInfo[playerid][pRank] = 0;
    PlayerInfo[playerid][pChar] = 0;
    PlayerInfo[playerid][pContractTime] = 0;
    PlayerInfo[playerid][pDetSkill] = 0;
    PlayerInfo[playerid][pSexSkill] = 0;
    PlayerInfo[playerid][pBoxSkill] = 0;
    PlayerInfo[playerid][pLawSkill] = 0;
    PlayerInfo[playerid][pMechSkill] = 0;
    PlayerInfo[playerid][pJackSkill] = 0;
    PlayerInfo[playerid][pCarSkill] = 0;
    PlayerInfo[playerid][pNewsSkill] = 0;
    PlayerInfo[playerid][pDrugsSkill] = 0;
    PlayerInfo[playerid][pCookSkill] = 0;
    PlayerInfo[playerid][pFishSkill] = 0;
    PlayerInfo[playerid][pCourierSkill] = 0;
    PlayerInfo[playerid][pRDrugsSkill] = 0;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 50.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 15;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    PlayerInfo[playerid][pPnumber] = 0;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pFlatKey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pCarLic] = 0;
    PlayerInfo[playerid][pFlyLic] = 0;
    PlayerInfo[playerid][pBoatLic] = 0;
    PlayerInfo[playerid][pFishLic] = 0;
    PlayerInfo[playerid][pGunLic] = 0;
    PlayerInfo[playerid][pMotoLic] = 0;
    PlayerInfo[playerid][pGun1] = 0;
    PlayerInfo[playerid][pGun2] = 0;
    PlayerInfo[playerid][pGun3] = 0;
    PlayerInfo[playerid][pGun4] = 0;
    PlayerInfo[playerid][pAmmo1] = 0;
    PlayerInfo[playerid][pAmmo2] = 0;
    PlayerInfo[playerid][pAmmo3] = 0;
    PlayerInfo[playerid][pAmmo4] = 0;
    PlayerInfo[playerid][pCarTime] = 0;
    PlayerInfo[playerid][pPayDay] = 0;
    PlayerInfo[playerid][pPayDayHad] = 0;
    PlayerInfo[playerid][pCDPlayer] = 0;
    PlayerInfo[playerid][pWins] = 0;
    PlayerInfo[playerid][pLoses] = 0;
    PlayerInfo[playerid][pAlcoholPerk] = 0;
    PlayerInfo[playerid][pDrugPerk] = 0;
    PlayerInfo[playerid][pMiserPerk] = 0;
    PlayerInfo[playerid][pPainPerk] = 0;
    PlayerInfo[playerid][pTraderPerk] = 0;
    PlayerInfo[playerid][pTut] = 0;
    PlayerInfo[playerid][pRent] = 255;
    PlayerInfo[playerid][pWarns] = 0;
    PlayerInfo[playerid][pFuel] = 0;
    PlayerInfo[playerid][pAdjustable] = 0;
    PlayerInfo[playerid][pChest] = 0;
    FirstAidTime[playerid] = 255;
    PlayerInfo[playerid][pFWarns] = 0;
    PlayerInfo[playerid][pMedicaments] = 0;
    PlayerInfo[playerid][pRadio] = 0;
    PlayerInfo[playerid][pTestTime] = 0;
    Transferid[playerid] = 999;
    pTest[playerid] = 0;
    VehTest[playerid] = 255;
    GunCheckTime[playerid] = 0;
    DrugsInterval[playerid] = 0;
    PlayerInfo[playerid][pCarKey] = -1;
    InLoaderJob[playerid] = 0; Meshki[playerid] = 0; Meshok[playerid] = 0;
    RENTCAR[playerid] = 9999;
    PlayerFuel[playerid] = 0;
    ClearCrime(playerid);
    ClearFishes(playerid);
    ClearCooking(playerid);
    ClearGroceries(playerid);
    ClearMarriage(playerid);
    SetPlayerToTeamColor(playerid);
    ServerResetPlayerWeapons(playerid);
    GetPlayerName(playerid, plname, sizeof(plname));
    new file[256];
    format(file, sizeof(file), "Accounts/%s.ini", plname
    Странно... public OnPlayerLogin; скинь
  6. #6
    Пользователь

    Аватар для DesertFox

    Статус: Оффлайн
    Регистрация:05.07.2012
    Сообщений:193
    Репутация:8 [+/-] 
    Странно... public OnPlayerLogin; скинь
    скорее всего в паблике логина,при коннекте не может давать,может быть ещё в OnPlayerRegister
    Помогаю в скриптинге нужна помощь пишите!
    SKYPE - aim4ik2
    ICQ - 157-113-3
  7. #7
    Заблокирован

    Аватар для Mr.Leon

    Статус: Оффлайн
    Регистрация:20.06.2012
    Сообщений:16
    Репутация:0 [+/-] 
    public OnPlayerLogin(playerid,password[])
    {
    new string2[128]; new keystring[256]; new sp[256];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "Accounts/%s.ini", playername2);
    keystring = dini_Get(string2, "Key");
    if(strcmp(keystring, password, true) == 0)
    {
    PlayerInfo[playerid][pLevel] = dini_Int(string2,"Level");
    PlayerInfo[playerid][pAdmin] = dini_Int(string2,"AdminLevel");
    PlayerInfo[playerid][pDonateRank] = dini_Int(string2,"DonateRank");
    PlayerInfo[playerid][gPupgrade] = dini_Int(string2,"UpgradePoints");
    PlayerInfo[playerid][pConnectTime] = dini_Int(string2,"ConnectedTime");
    PlayerInfo[playerid][pReg] = dini_Int(string2,"Registered");
    PlayerInfo[playerid][pSex] = dini_Int(string2,"Sex");
    PlayerInfo[playerid][pAge] = dini_Int(string2,"Age");
    PlayerInfo[playerid][pOrigin] = dini_Int(string2,"Origin");
    PlayerInfo[playerid][pBanned] = dini_Int(string2,"Banned");
    PlayerInfo[playerid][pMute] = dini_Int(string2,"Mute");
    PlayerInfo[playerid][pExp] = dini_Int(string2,"Respect");
    PlayerInfo[playerid][pMoney] = dini_Int(string2,"Money");
    PlayerInfo[playerid][pAccount] = dini_Int(string2,"Bank");
    PlayerInfo[playerid][pCrimes] = dini_Int(string2,"Crimes");
    PlayerInfo[playerid][pDeaths] = dini_Int(string2,"Deaths");
    PlayerInfo[playerid][pArrested] = dini_Int(string2,"Arresteed");
    PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2,"WantedDeaths");
    PlayerInfo[playerid][pPhoneBook] = dini_Int(string2,"Phonebook");
    PlayerInfo[playerid][pLottoNr] = dini_Int(string2,"LottoNr");
    PlayerInfo[playerid][pFishes] = dini_Int(string2,"Fishes");
    PlayerInfo[playerid][pBiggestFish] = dini_Int(string2,"BiggestFish");
    PlayerInfo[playerid][pJob] = dini_Int(string2,"Job");
    PlayerInfo[playerid][pPayCheck] = dini_Int(string2,"Paycheck");
    PlayerInfo[playerid][pHeadValue] = dini_Int(string2,"HeadValue");
    PlayerInfo[playerid][pJailed] = dini_Int(string2,"Jailed");
    PlayerInfo[playerid][pJailTime] = dini_Int(string2,"JailTime");
    PlayerInfo[playerid][pMats] = dini_Int(string2,"Materials");
    PlayerInfo[playerid][pDrugs] = dini_Int(string2,"Drugs");
    PlayerInfo[playerid][pLeader] = dini_Int(string2,"Leader");
    PlayerInfo[playerid][pMember] = dini_Int(string2,"Member");
    PlayerInfo[playerid][pRank] = dini_Int(string2,"Rank");
    PlayerInfo[playerid][pChar] = dini_Int(string2,"Char");
    PlayerInfo[playerid][pContractTime] = dini_Int(string2,"ContractTime");
    PlayerInfo[playerid][pDetSkill] = dini_Int(string2,"DetSkill");
    PlayerInfo[playerid][pSexSkill] = dini_Int(string2,"SexSkill");
    PlayerInfo[playerid][pBoxSkill] = dini_Int(string2,"BoxSkill");
    PlayerInfo[playerid][pLawSkill] = dini_Int(string2,"LawSkill");
    PlayerInfo[playerid][pMechSkill] = dini_Int(string2,"MechSkill");
    PlayerInfo[playerid][pJackSkill] = dini_Int(string2,"JackSkill");
    PlayerInfo[playerid][pCarSkill] = dini_Int(string2,"CarSkill");
    PlayerInfo[playerid][pNewsSkill] = dini_Int(string2,"NewsSkill");
    PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2,"DrugsSkill");
    PlayerInfo[playerid][pCookSkill] = dini_Int(string2,"CookSkill");
    PlayerInfo[playerid][pFishSkill] = dini_Int(string2,"FishSkill");
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"CourierSkill");
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"RDrugsSkill");
    PlayerInfo[playerid][pSHealth] = Float:dini_Float(string2,"pSHealth");
    PlayerInfo[playerid][pHealth] = Float:dini_Float(string2,"pHealth");
    PlayerInfo[playerid][pInt] = dini_Int(string2,"Int");
    PlayerInfo[playerid][pLocal] = dini_Int(string2,"Local");
    PlayerInfo[playerid][pTeam] = dini_Int(string2,"Team");
    // PlayerInfo[playerid][pSkin] = dini_Int(string2,"Model");
    PlayerInfo[playerid][pPnumber] = dini_Int(string2,"PhoneNr");
    PlayerInfo[playerid][pPhousekey] = dini_Int(string2,"House");
    PlayerInfo[playerid][pPbiskey] = dini_Int(string2,"Bizz");
    PlayerInfo[playerid][pPos_x] = Float:dini_Float(string2,"Pos_x");
    PlayerInfo[playerid][pPos_y] = Float:dini_Float(string2,"Pos_z");
    PlayerInfo[playerid][pPos_z] = Float:dini_Float(string2,"Pos_y");
    PlayerInfo[playerid][pCarLic] = dini_Int(string2,"CarLic");
    PlayerInfo[playerid][pFlyLic] = dini_Int(string2,"FlyLic");
    PlayerInfo[playerid][pBoatLic] = dini_Int(string2,"BoatLic");
    PlayerInfo[playerid][pFishLic] = dini_Int(string2,"FishLic");
    PlayerInfo[playerid][pGunLic] = dini_Int(string2,"GunLic");
    PlayerInfo[playerid][pMotoLic] = dini_Int(string2,"MotoLic");
    PlayerInfo[playerid][pGun1] = dini_Int(string2,"Gun1");
    PlayerInfo[playerid][pGun2] = dini_Int(string2,"Gun2");
    PlayerInfo[playerid][pGun3] = dini_Int(string2,"Gun3");
    PlayerInfo[playerid][pGun4] = dini_Int(string2,"Gun4");
    PlayerInfo[playerid][pAmmo1] = dini_Int(string2,"Ammo1");
    PlayerInfo[playerid][pAmmo2] = dini_Int(string2,"Ammo2");
    PlayerInfo[playerid][pAmmo3] = dini_Int(string2,"Ammo3");
    PlayerInfo[playerid][pAmmo4] = dini_Int(string2,"Ammo4");
    PlayerInfo[playerid][pCarTime] = dini_Int(string2,"CarTime");
    PlayerInfo[playerid][pPayDay] = dini_Int(string2,"PayDay");
    PlayerInfo[playerid][pPayDayHad] = dini_Int(string2,"PayDayHad");
    PlayerInfo[playerid][pCDPlayer] = dini_Int(string2,"CDPlayer");
    PlayerInfo[playerid][pWins] = dini_Int(string2,"Wins");
    PlayerInfo[playerid][pLoses] = dini_Int(string2,"Loses");
    PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2,"AlcoholPerk");
    PlayerInfo[playerid][pDrugPerk] = dini_Int(string2,"DrugPerk");
    PlayerInfo[playerid][pMiserPerk] = dini_Int(string2,"MiserPerk");
    PlayerInfo[playerid][pPainPerk] = dini_Int(string2,"PainPerk");
    PlayerInfo[playerid][pTraderPerk] = dini_Int(string2,"TraderPerk");
    PlayerInfo[playerid][pTut] = dini_Int(string2,"Tutorial");
    PlayerInfo[playerid][pRent] = dini_Int(string2,"Rent");
    PlayerInfo[playerid][pWarns] = dini_Int(string2,"Warnings");
    PlayerInfo[playerid][pAdjustable] = dini_Int(string2,"Adjustable");
    PlayerInfo[playerid][pFuel] = dini_Int(string2,"Fuel");
    PlayerInfo[playerid][pMarried] = dini_Int(string2,"Married");
    sp = dini_Get(string2, "MarriedTo");
    PlayerInfo[playerid][pMarriedTo] = sp;
    PlayerInfo[playerid][pWanted] = dini_Int(string2,"Wanted");
    PlayerInfo[playerid][pChest] = dini_Int(string2,"Chest");
    PlayerInfo[playerid][pFWarns] = dini_Int(string2,"FWarn");
    PlayerInfo[playerid][pMedicaments] = dini_Int(string2,"Medicaments");
    PlayerInfo[playerid][pFlatKey] = dini_Int(string2,"Flatkey");
    PlayerInfo[playerid][pCarKey] = dini_Int(string2,"CarKey");
    PlayerInfo[playerid][pRadio] = dini_Int(string2,"RadioSet");
    PlayerInfo[playerid][pTestTime] = dini_Int(string2,"TestTime");
    }
    else
    {
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4){Kick(playerid);}
    new logtires = 3 - gPlayerLogTries[playerid];
    new loginmsg[256+1];
    format(loginmsg,256,"{FF6347}Внимание! Вы ввели неверный пароль!\nУ вас осталось (%d) попытки",logtires);
    ShowPlayerDialog(playerid,24,DIALOG_STYLE_MSGBOX," Ошибка!",loginmsg,"Повтор","Выйти");
    return 1;
    }
    if(PlayerInfo[playerid][pBanned] == 1)
    {
    format(string2, sizeof(string2), "Diamond City: Аккаунт %s заблокирован.",playername2);
    SendClientMessage(playerid, COLOR_LIGHTRED, string2);
    Ban(playerid);
    return 1;
    }
    PlayerInfo[playerid][pAdjustable] = 0;
    ResetPlayerMoney(playerid);
    new ip[MAX_PLAYER_NAME];
    GetPlayerIp(playerid, ip, sizeof(ip));
    if(PlayerInfo[playerid][pReg] == 0)
    {
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 50.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 15;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pChar] = 170; }
    else if(PlayerInfo[playerid][pSex] == 2) { PlayerInfo[playerid][pChar] = 190; }
    PlayerInfo[playerid][pPnumber] = 0;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pReg] = 1;
    PlayerInfo[playerid][pMoney] = 500;
    PlayerInfo[playerid][pCarKey] = -1;
    PlayerInfo[playerid][pFlatKey] = 255;
    }
    else if(PlayerInfo[playerid][pTut] == 0)
    {
    new string[500];
    format(string,sizeof(string),"{FFFFFF}* Вы действительно хотите зарегистрировать этот аккаунт?\nЕсли вы не хотите продолжать регистрацию нажмие 'Далее'\nЕсли нехотите нажмите 'Отмена' и ваш аккаунт будет {ff3300}удален{ffffff}.");
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{ ffffff}Feni[X] [Rus/Ua]",string,"Далее","Отмена");
    }
    SetPlayerInterior(playerid,GetPlayerInterior(playe rid));
    SetCameraBehindPlayer(playerid);
    PlayerInfo[playerid][pAdmin] = 5;
    if(PlayerInfo[playerid][pDonateRank] > 0)
    {
    SendClientMessage(playerid, COLOR_XD,"Diamond City: Вы используете премиум аккаунт.");
    }
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
    new string[256];
    format(string2, sizeof(string2), "Diamond City: Вы вошли как администратор %d уровня.",PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, COLOR_XD,string2);
    format(string, sizeof(string), "Diamond City: %s зашёл как администратор %d уровня [%s]. ",playername2, PlayerInfo[playerid][pAdmin],ip);
    SendAdminMessage(COLOR_GREEN2, string);
    log("ALogged",string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 0)
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new logstr[400];
    format(logstr, sizeof(logstr), "%s зашёл на сервер, ip: %s.",sendername,ip);
    log("Logged", logstr);
    }
    // Фикс дома/машины/квартиры
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pFlatKey] != 255 && strcmp(sendername, FlatsInfo[PlayerInfo[playerid][pFlatKey]][fOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pFlatKey] != 255) { PlayerInfo[playerid][pFlatKey] = 255; } }
    if(PlayerInfo[playerid][pCarKey] != -1 && strcmp(sendername, CarsInfo[PlayerInfo[playerid][pCarKey]][vOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pCarKey] != -1) { PlayerInfo[playerid][pCarKey] = -1; } }
    if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(sendername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pPhousekey] != 255) { PlayerInfo[playerid][pPhousekey] = 255; } }

    SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pChar], 2223.8,-1147.1,1025.7, 1.0, -1, -1, -1, -1, -1, -1);
    gPlayerLogged[playerid] = 1;
    SpawnPlayer(playerid);
    DateProp(playerid);
    SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
    RemovePlayerAttachedObject(playerid,1);
    RemovePlayerAttachedObject(playerid,2);
    RemovePlayerAttachedObject(playerid,3);
    RemovePlayerAttachedObject(playerid,4);
    RemovePlayerAttachedObject(playerid,5);
    return 1;
    }

    stock ini_GetKey( line[] )
    {
    new keyRes[256];
    keyRes[0] = 0;
    if ( strfind( line , "=", true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=", true ) , sizeof( keyRes) );
    return keyRes;
    }

    stock ini_GetValue( line[] )
    {
    new valRes[256];
    valRes[0]=0;
    if ( strfind( line , "=", true ) == -1 ) return valRes;
    strmid( valRes , line , strfind( line , "=", true )+1 , strlen( line ) , sizeof( valRes ) );
    return valRes;
    }

    public OnPropUpdate()
    {
    new idx;
    new File: file2;
    while (idx < sizeof(HouseInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,% d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
    HouseInfo[idx][hEntrancex],
    HouseInfo[idx][hEntrancey],
    HouseInfo[idx][hEntrancez],
    HouseInfo[idx][hExitx],
    HouseInfo[idx][hExity],
    HouseInfo[idx][hExitz],
    HouseInfo[idx][hHealthx],
    HouseInfo[idx][hHealthy],
    HouseInfo[idx][hHealthz],
    HouseInfo[idx][hArmourx],
    HouseInfo[idx][hArmoury],
    HouseInfo[idx][hArmourz],
    HouseInfo[idx][hOwner],
    HouseInfo[idx][hDiscription],
    HouseInfo[idx][hValue],
    HouseInfo[idx][hHel],
    HouseInfo[idx][hArm],
    HouseInfo[idx][hInt],
    HouseInfo[idx][hLock],
    HouseInfo[idx][hOwned],
    HouseInfo[idx][hRooms],
    HouseInfo[idx][hRent],
    HouseInfo[idx][hRentabil],
    HouseInfo[idx][hTakings],
    HouseInfo[idx][hVec],
    HouseInfo[idx][hVcol1],
    HouseInfo[idx][hVcol2],
    HouseInfo[idx][hDate],
    HouseInfo[idx][hLevel]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/house.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/house.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(BizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|% d|%d\n",
    BizzInfo[idx][bOwned],
    BizzInfo[idx][bOwner],
    BizzInfo[idx][bMessage],
    BizzInfo[idx][bEntranceX],
    BizzInfo[idx][bEntranceY],
    BizzInfo[idx][bEntranceZ],
    BizzInfo[idx][bExitX],
    BizzInfo[idx][bExitY],
    BizzInfo[idx][bExitZ],
    BizzInfo[idx][bLevelNeeded],
    BizzInfo[idx][bBuyPrice],
    BizzInfo[idx][bEntranceCost],
    BizzInfo[idx][bTill],
    BizzInfo[idx][bLocked],
    BizzInfo[idx][bInterior],
    BizzInfo[idx][bProducts],
    BizzInfo[idx][bMaxProducts],
    BizzInfo[idx][bPriceProd]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/bizz.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/bizz.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(SBizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\ n",
    SBizzInfo[idx][sbOwned],
    SBizzInfo[idx][sbOwner],
    SBizzInfo[idx][sbMessage],
    SBizzInfo[idx][sbEntranceX],
    SBizzInfo[idx][sbEntranceY],
    SBizzInfo[idx][sbEntranceZ],
    SBizzInfo[idx][sbLevelNeeded],
    SBizzInfo[idx][sbBuyPrice],
    SBizzInfo[idx][sbEntranceCost],
    SBizzInfo[idx][sbTill],
    SBizzInfo[idx][sbLocked],
    SBizzInfo[idx][sbInterior],
    SBizzInfo[idx][sbProducts],
    SBizzInfo[idx][sbMaxProducts],
    SBizzInfo[idx][sbPriceProd]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/sbizz.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/sbizz.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(FlatsInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d,%s,%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,% d\n",
    FlatsInfo[idx][fOwned],
    FlatsInfo[idx][fOwner],
    FlatsInfo[idx][fEntrancex],
    FlatsInfo[idx][fEntrancey],
    FlatsInfo[idx][fEntrancez],
    FlatsInfo[idx][fExitx],
    FlatsInfo[idx][fExity],
    FlatsInfo[idx][fExitz],
    FlatsInfo[idx][fInt],
    FlatsInfo[idx][fVirtWorld],
    FlatsInfo[idx][fValue],
    FlatsInfo[idx][fLock],
    FlatsInfo[idx][fRent],
    FlatsInfo[idx][fRentabil],
    FlatsInfo[idx][fTakings],
    FlatsInfo[idx][fDate],
    FlatsInfo[idx][fLevel]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/flats.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/flats.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(CarsInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d,%s,%d,%f,%f,%f,%f,%d,%d,%d,%d,%f,%f,%f,%f\ n",
    CarsInfo[idx][vOwned],
    CarsInfo[idx][vOwner],
    CarsInfo[idx][vModel],
    CarsInfo[idx][vPosX],
    CarsInfo[idx][vPosY],
    CarsInfo[idx][vPosZ],
    CarsInfo[idx][vAngle],
    CarsInfo[idx][vColorOne],
    CarsInfo[idx][vColorTwo],
    CarsInfo[idx][vLock],
    CarsInfo[idx][vValue],
    CarsInfo[idx][vParkX],
    CarsInfo[idx][vParkY],
    CarsInfo[idx][vParkZ],
    CarsInfo[idx][vParkAngle]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/cars.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/cars.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    return 1;
    }

    public BroadCast(color,const string[])
    {
    SendClientMessageToAll(color, string);
    return 1;
    }

    public ABroadCast(color,const string[],level)
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if (PlayerInfo[i][pAdmin] >= level)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    return 1;
    }

    public OOCOff(color,const string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(!gOoc[i])
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }

    public OOCNews(color,const string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(!gNews[i])
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }

    public SendTeamMessage(team, color, string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(gTeam[i] == team)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }
  8. #8
    Заблокирован

    Аватар для Mr.Leon

    Статус: Оффлайн
    Регистрация:20.06.2012
    Сообщений:16
    Репутация:0 [+/-] 
    скорее всего в паблике логина,при коннекте не может давать,может быть ещё в OnPlayerRegister
    public OnPlayerLogin(playerid,password[])
    {
    new string2[128]; new keystring[256]; new sp[256];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "Accounts/%s.ini", playername2);
    keystring = dini_Get(string2, "Key");
    if(strcmp(keystring, password, true) == 0)
    {
    PlayerInfo[playerid][pLevel] = dini_Int(string2,"Level");
    PlayerInfo[playerid][pAdmin] = dini_Int(string2,"AdminLevel");
    PlayerInfo[playerid][pDonateRank] = dini_Int(string2,"DonateRank");
    PlayerInfo[playerid][gPupgrade] = dini_Int(string2,"UpgradePoints");
    PlayerInfo[playerid][pConnectTime] = dini_Int(string2,"ConnectedTime");
    PlayerInfo[playerid][pReg] = dini_Int(string2,"Registered");
    PlayerInfo[playerid][pSex] = dini_Int(string2,"Sex");
    PlayerInfo[playerid][pAge] = dini_Int(string2,"Age");
    PlayerInfo[playerid][pOrigin] = dini_Int(string2,"Origin");
    PlayerInfo[playerid][pBanned] = dini_Int(string2,"Banned");
    PlayerInfo[playerid][pMute] = dini_Int(string2,"Mute");
    PlayerInfo[playerid][pExp] = dini_Int(string2,"Respect");
    PlayerInfo[playerid][pMoney] = dini_Int(string2,"Money");
    PlayerInfo[playerid][pAccount] = dini_Int(string2,"Bank");
    PlayerInfo[playerid][pCrimes] = dini_Int(string2,"Crimes");
    PlayerInfo[playerid][pDeaths] = dini_Int(string2,"Deaths");
    PlayerInfo[playerid][pArrested] = dini_Int(string2,"Arresteed");
    PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2,"WantedDeaths");
    PlayerInfo[playerid][pPhoneBook] = dini_Int(string2,"Phonebook");
    PlayerInfo[playerid][pLottoNr] = dini_Int(string2,"LottoNr");
    PlayerInfo[playerid][pFishes] = dini_Int(string2,"Fishes");
    PlayerInfo[playerid][pBiggestFish] = dini_Int(string2,"BiggestFish");
    PlayerInfo[playerid][pJob] = dini_Int(string2,"Job");
    PlayerInfo[playerid][pPayCheck] = dini_Int(string2,"Paycheck");
    PlayerInfo[playerid][pHeadValue] = dini_Int(string2,"HeadValue");
    PlayerInfo[playerid][pJailed] = dini_Int(string2,"Jailed");
    PlayerInfo[playerid][pJailTime] = dini_Int(string2,"JailTime");
    PlayerInfo[playerid][pMats] = dini_Int(string2,"Materials");
    PlayerInfo[playerid][pDrugs] = dini_Int(string2,"Drugs");
    PlayerInfo[playerid][pLeader] = dini_Int(string2,"Leader");
    PlayerInfo[playerid][pMember] = dini_Int(string2,"Member");
    PlayerInfo[playerid][pRank] = dini_Int(string2,"Rank");
    PlayerInfo[playerid][pChar] = dini_Int(string2,"Char");
    PlayerInfo[playerid][pContractTime] = dini_Int(string2,"ContractTime");
    PlayerInfo[playerid][pDetSkill] = dini_Int(string2,"DetSkill");
    PlayerInfo[playerid][pSexSkill] = dini_Int(string2,"SexSkill");
    PlayerInfo[playerid][pBoxSkill] = dini_Int(string2,"BoxSkill");
    PlayerInfo[playerid][pLawSkill] = dini_Int(string2,"LawSkill");
    PlayerInfo[playerid][pMechSkill] = dini_Int(string2,"MechSkill");
    PlayerInfo[playerid][pJackSkill] = dini_Int(string2,"JackSkill");
    PlayerInfo[playerid][pCarSkill] = dini_Int(string2,"CarSkill");
    PlayerInfo[playerid][pNewsSkill] = dini_Int(string2,"NewsSkill");
    PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2,"DrugsSkill");
    PlayerInfo[playerid][pCookSkill] = dini_Int(string2,"CookSkill");
    PlayerInfo[playerid][pFishSkill] = dini_Int(string2,"FishSkill");
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"CourierSkill");
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"RDrugsSkill");
    PlayerInfo[playerid][pSHealth] = Float:dini_Float(string2,"pSHealth");
    PlayerInfo[playerid][pHealth] = Float:dini_Float(string2,"pHealth");
    PlayerInfo[playerid][pInt] = dini_Int(string2,"Int");
    PlayerInfo[playerid][pLocal] = dini_Int(string2,"Local");
    PlayerInfo[playerid][pTeam] = dini_Int(string2,"Team");
    // PlayerInfo[playerid][pSkin] = dini_Int(string2,"Model");
    PlayerInfo[playerid][pPnumber] = dini_Int(string2,"PhoneNr");
    PlayerInfo[playerid][pPhousekey] = dini_Int(string2,"House");
    PlayerInfo[playerid][pPbiskey] = dini_Int(string2,"Bizz");
    PlayerInfo[playerid][pPos_x] = Float:dini_Float(string2,"Pos_x");
    PlayerInfo[playerid][pPos_y] = Float:dini_Float(string2,"Pos_z");
    PlayerInfo[playerid][pPos_z] = Float:dini_Float(string2,"Pos_y");
    PlayerInfo[playerid][pCarLic] = dini_Int(string2,"CarLic");
    PlayerInfo[playerid][pFlyLic] = dini_Int(string2,"FlyLic");
    PlayerInfo[playerid][pBoatLic] = dini_Int(string2,"BoatLic");
    PlayerInfo[playerid][pFishLic] = dini_Int(string2,"FishLic");
    PlayerInfo[playerid][pGunLic] = dini_Int(string2,"GunLic");
    PlayerInfo[playerid][pMotoLic] = dini_Int(string2,"MotoLic");
    PlayerInfo[playerid][pGun1] = dini_Int(string2,"Gun1");
    PlayerInfo[playerid][pGun2] = dini_Int(string2,"Gun2");
    PlayerInfo[playerid][pGun3] = dini_Int(string2,"Gun3");
    PlayerInfo[playerid][pGun4] = dini_Int(string2,"Gun4");
    PlayerInfo[playerid][pAmmo1] = dini_Int(string2,"Ammo1");
    PlayerInfo[playerid][pAmmo2] = dini_Int(string2,"Ammo2");
    PlayerInfo[playerid][pAmmo3] = dini_Int(string2,"Ammo3");
    PlayerInfo[playerid][pAmmo4] = dini_Int(string2,"Ammo4");
    PlayerInfo[playerid][pCarTime] = dini_Int(string2,"CarTime");
    PlayerInfo[playerid][pPayDay] = dini_Int(string2,"PayDay");
    PlayerInfo[playerid][pPayDayHad] = dini_Int(string2,"PayDayHad");
    PlayerInfo[playerid][pCDPlayer] = dini_Int(string2,"CDPlayer");
    PlayerInfo[playerid][pWins] = dini_Int(string2,"Wins");
    PlayerInfo[playerid][pLoses] = dini_Int(string2,"Loses");
    PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2,"AlcoholPerk");
    PlayerInfo[playerid][pDrugPerk] = dini_Int(string2,"DrugPerk");
    PlayerInfo[playerid][pMiserPerk] = dini_Int(string2,"MiserPerk");
    PlayerInfo[playerid][pPainPerk] = dini_Int(string2,"PainPerk");
    PlayerInfo[playerid][pTraderPerk] = dini_Int(string2,"TraderPerk");
    PlayerInfo[playerid][pTut] = dini_Int(string2,"Tutorial");
    PlayerInfo[playerid][pRent] = dini_Int(string2,"Rent");
    PlayerInfo[playerid][pWarns] = dini_Int(string2,"Warnings");
    PlayerInfo[playerid][pAdjustable] = dini_Int(string2,"Adjustable");
    PlayerInfo[playerid][pFuel] = dini_Int(string2,"Fuel");
    PlayerInfo[playerid][pMarried] = dini_Int(string2,"Married");
    sp = dini_Get(string2, "MarriedTo");
    PlayerInfo[playerid][pMarriedTo] = sp;
    PlayerInfo[playerid][pWanted] = dini_Int(string2,"Wanted");
    PlayerInfo[playerid][pChest] = dini_Int(string2,"Chest");
    PlayerInfo[playerid][pFWarns] = dini_Int(string2,"FWarn");
    PlayerInfo[playerid][pMedicaments] = dini_Int(string2,"Medicaments");
    PlayerInfo[playerid][pFlatKey] = dini_Int(string2,"Flatkey");
    PlayerInfo[playerid][pCarKey] = dini_Int(string2,"CarKey");
    PlayerInfo[playerid][pRadio] = dini_Int(string2,"RadioSet");
    PlayerInfo[playerid][pTestTime] = dini_Int(string2,"TestTime");
    }
    else
    {
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4){Kick(playerid);}
    new logtires = 3 - gPlayerLogTries[playerid];
    new loginmsg[256+1];
    format(loginmsg,256,"{FF6347}Внимание! Вы ввели неверный пароль!\nУ вас осталось (%d) попытки",logtires);
    ShowPlayerDialog(playerid,24,DIALOG_STYLE_MSGBOX," Ошибка!",loginmsg,"Повтор","Выйти");
    return 1;
    }
    if(PlayerInfo[playerid][pBanned] == 1)
    {
    format(string2, sizeof(string2), "Diamond City: Аккаунт %s заблокирован.",playername2);
    SendClientMessage(playerid, COLOR_LIGHTRED, string2);
    Ban(playerid);
    return 1;
    }
    PlayerInfo[playerid][pAdjustable] = 0;
    ResetPlayerMoney(playerid);
    new ip[MAX_PLAYER_NAME];
    GetPlayerIp(playerid, ip, sizeof(ip));
    if(PlayerInfo[playerid][pReg] == 0)
    {
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pSHealth] = 0.0;
    PlayerInfo[playerid][pHealth] = 50.0;
    PlayerInfo[playerid][pPos_x] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    PlayerInfo[playerid][pInt] = 15;
    PlayerInfo[playerid][pLocal] = 255;
    PlayerInfo[playerid][pTeam] = 3;
    if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pChar] = 170; }
    else if(PlayerInfo[playerid][pSex] == 2) { PlayerInfo[playerid][pChar] = 190; }
    PlayerInfo[playerid][pPnumber] = 0;
    PlayerInfo[playerid][pPhousekey] = 255;
    PlayerInfo[playerid][pPbiskey] = 255;
    PlayerInfo[playerid][pAccount] = 0;
    PlayerInfo[playerid][pReg] = 1;
    PlayerInfo[playerid][pMoney] = 500;
    PlayerInfo[playerid][pCarKey] = -1;
    PlayerInfo[playerid][pFlatKey] = 255;
    }
    else if(PlayerInfo[playerid][pTut] == 0)
    {
    new string[500];
    format(string,sizeof(string),"{FFFFFF}* Вы действительно хотите зарегистрировать этот аккаунт?\nЕсли вы не хотите продолжать регистрацию нажмие 'Далее'\nЕсли нехотите нажмите 'Отмена' и ваш аккаунт будет {ff3300}удален{ffffff}.");
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{ ffffff}Feni[X] [Rus/Ua]",string,"Далее","Отмена");
    }
    SetPlayerInterior(playerid,GetPlayerInterior(playe rid));
    SetCameraBehindPlayer(playerid);
    PlayerInfo[playerid][pAdmin] = 5;
    if(PlayerInfo[playerid][pDonateRank] > 0)
    {
    SendClientMessage(playerid, COLOR_XD,"Diamond City: Вы используете премиум аккаунт.");
    }
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
    new string[256];
    format(string2, sizeof(string2), "Diamond City: Вы вошли как администратор %d уровня.",PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, COLOR_XD,string2);
    format(string, sizeof(string), "Diamond City: %s зашёл как администратор %d уровня [%s]. ",playername2, PlayerInfo[playerid][pAdmin],ip);
    SendAdminMessage(COLOR_GREEN2, string);
    log("ALogged",string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 0)
    {
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new logstr[400];
    format(logstr, sizeof(logstr), "%s зашёл на сервер, ip: %s.",sendername,ip);
    log("Logged", logstr);
    }
    // Фикс дома/машины/квартиры
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(PlayerInfo[playerid][pFlatKey] != 255 && strcmp(sendername, FlatsInfo[PlayerInfo[playerid][pFlatKey]][fOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pFlatKey] != 255) { PlayerInfo[playerid][pFlatKey] = 255; } }
    if(PlayerInfo[playerid][pCarKey] != -1 && strcmp(sendername, CarsInfo[PlayerInfo[playerid][pCarKey]][vOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pCarKey] != -1) { PlayerInfo[playerid][pCarKey] = -1; } }
    if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(sendername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { }
    else { if(PlayerInfo[playerid][pPhousekey] != 255) { PlayerInfo[playerid][pPhousekey] = 255; } }

    SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pChar], 2223.8,-1147.1,1025.7, 1.0, -1, -1, -1, -1, -1, -1);
    gPlayerLogged[playerid] = 1;
    SpawnPlayer(playerid);
    DateProp(playerid);
    SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
    RemovePlayerAttachedObject(playerid,1);
    RemovePlayerAttachedObject(playerid,2);
    RemovePlayerAttachedObject(playerid,3);
    RemovePlayerAttachedObject(playerid,4);
    RemovePlayerAttachedObject(playerid,5);
    return 1;
    }

    stock ini_GetKey( line[] )
    {
    new keyRes[256];
    keyRes[0] = 0;
    if ( strfind( line , "=", true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=", true ) , sizeof( keyRes) );
    return keyRes;
    }

    stock ini_GetValue( line[] )
    {
    new valRes[256];
    valRes[0]=0;
    if ( strfind( line , "=", true ) == -1 ) return valRes;
    strmid( valRes , line , strfind( line , "=", true )+1 , strlen( line ) , sizeof( valRes ) );
    return valRes;
    }

    public OnPropUpdate()
    {
    new idx;
    new File: file2;
    while (idx < sizeof(HouseInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,% d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
    HouseInfo[idx][hEntrancex],
    HouseInfo[idx][hEntrancey],
    HouseInfo[idx][hEntrancez],
    HouseInfo[idx][hExitx],
    HouseInfo[idx][hExity],
    HouseInfo[idx][hExitz],
    HouseInfo[idx][hHealthx],
    HouseInfo[idx][hHealthy],
    HouseInfo[idx][hHealthz],
    HouseInfo[idx][hArmourx],
    HouseInfo[idx][hArmoury],
    HouseInfo[idx][hArmourz],
    HouseInfo[idx][hOwner],
    HouseInfo[idx][hDiscription],
    HouseInfo[idx][hValue],
    HouseInfo[idx][hHel],
    HouseInfo[idx][hArm],
    HouseInfo[idx][hInt],
    HouseInfo[idx][hLock],
    HouseInfo[idx][hOwned],
    HouseInfo[idx][hRooms],
    HouseInfo[idx][hRent],
    HouseInfo[idx][hRentabil],
    HouseInfo[idx][hTakings],
    HouseInfo[idx][hVec],
    HouseInfo[idx][hVcol1],
    HouseInfo[idx][hVcol2],
    HouseInfo[idx][hDate],
    HouseInfo[idx][hLevel]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/house.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/house.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(BizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|% d|%d\n",
    BizzInfo[idx][bOwned],
    BizzInfo[idx][bOwner],
    BizzInfo[idx][bMessage],
    BizzInfo[idx][bEntranceX],
    BizzInfo[idx][bEntranceY],
    BizzInfo[idx][bEntranceZ],
    BizzInfo[idx][bExitX],
    BizzInfo[idx][bExitY],
    BizzInfo[idx][bExitZ],
    BizzInfo[idx][bLevelNeeded],
    BizzInfo[idx][bBuyPrice],
    BizzInfo[idx][bEntranceCost],
    BizzInfo[idx][bTill],
    BizzInfo[idx][bLocked],
    BizzInfo[idx][bInterior],
    BizzInfo[idx][bProducts],
    BizzInfo[idx][bMaxProducts],
    BizzInfo[idx][bPriceProd]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/bizz.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/bizz.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(SBizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\ n",
    SBizzInfo[idx][sbOwned],
    SBizzInfo[idx][sbOwner],
    SBizzInfo[idx][sbMessage],
    SBizzInfo[idx][sbEntranceX],
    SBizzInfo[idx][sbEntranceY],
    SBizzInfo[idx][sbEntranceZ],
    SBizzInfo[idx][sbLevelNeeded],
    SBizzInfo[idx][sbBuyPrice],
    SBizzInfo[idx][sbEntranceCost],
    SBizzInfo[idx][sbTill],
    SBizzInfo[idx][sbLocked],
    SBizzInfo[idx][sbInterior],
    SBizzInfo[idx][sbProducts],
    SBizzInfo[idx][sbMaxProducts],
    SBizzInfo[idx][sbPriceProd]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/sbizz.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/sbizz.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(FlatsInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d,%s,%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,% d\n",
    FlatsInfo[idx][fOwned],
    FlatsInfo[idx][fOwner],
    FlatsInfo[idx][fEntrancex],
    FlatsInfo[idx][fEntrancey],
    FlatsInfo[idx][fEntrancez],
    FlatsInfo[idx][fExitx],
    FlatsInfo[idx][fExity],
    FlatsInfo[idx][fExitz],
    FlatsInfo[idx][fInt],
    FlatsInfo[idx][fVirtWorld],
    FlatsInfo[idx][fValue],
    FlatsInfo[idx][fLock],
    FlatsInfo[idx][fRent],
    FlatsInfo[idx][fRentabil],
    FlatsInfo[idx][fTakings],
    FlatsInfo[idx][fDate],
    FlatsInfo[idx][fLevel]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/flats.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/flats.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(CarsInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d,%s,%d,%f,%f,%f,%f,%d,%d,%d,%d,%f,%f,%f,%f\ n",
    CarsInfo[idx][vOwned],
    CarsInfo[idx][vOwner],
    CarsInfo[idx][vModel],
    CarsInfo[idx][vPosX],
    CarsInfo[idx][vPosY],
    CarsInfo[idx][vPosZ],
    CarsInfo[idx][vAngle],
    CarsInfo[idx][vColorOne],
    CarsInfo[idx][vColorTwo],
    CarsInfo[idx][vLock],
    CarsInfo[idx][vValue],
    CarsInfo[idx][vParkX],
    CarsInfo[idx][vParkY],
    CarsInfo[idx][vParkZ],
    CarsInfo[idx][vParkAngle]);
    if(idx == 0)
    {
    file2 = fopen("Diamond/cars.cfg", io_write);
    }
    else
    {
    file2 = fopen("Diamond/cars.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    return 1;
    }

    public BroadCast(color,const string[])
    {
    SendClientMessageToAll(color, string);
    return 1;
    }

    public ABroadCast(color,const string[],level)
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if (PlayerInfo[i][pAdmin] >= level)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    return 1;
    }

    public OOCOff(color,const string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(!gOoc[i])
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }

    public OOCNews(color,const string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(!gNews[i])
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }

    public SendTeamMessage(team, color, string[])
    {
    for(new i = 0; i < GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(gTeam[i] == team)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }
  9. #9
    Пользователь

    Аватар для DesertFox

    Статус: Оффлайн
    Регистрация:05.07.2012
    Сообщений:193
    Репутация:8 [+/-] 
    PHP код:
    public OnPlayerLogin(playerid,password[])
     {
     new 
    string2[128]; new keystring[256]; new sp[256];
     new 
    playername2[MAX_PLAYER_NAME];
     
    GetPlayerName(playeridplayername2sizeof(playername2));
     
    format(string2sizeof(string2), "Accounts/%s.ini"playername2);
     
    keystring dini_Get(string2"Key");
     if(
    strcmp(keystringpasswordtrue) == 0)
     {
     
    PlayerInfo[playerid][pLevel] = dini_Int(string2,"Level");
     
    PlayerInfo[playerid][pAdmin] = dini_Int(string2,"AdminLevel");
     
    PlayerInfo[playerid][pDonateRank] = dini_Int(string2,"DonateRank");
     
    PlayerInfo[playerid][gPupgrade] = dini_Int(string2,"UpgradePoints");
     
    PlayerInfo[playerid][pConnectTime] = dini_Int(string2,"ConnectedTime");
     
    PlayerInfo[playerid][pReg] = dini_Int(string2,"Registered");
     
    PlayerInfo[playerid][pSex] = dini_Int(string2,"Sex");
     
    PlayerInfo[playerid][pAge] = dini_Int(string2,"Age");
     
    PlayerInfo[playerid][pOrigin] = dini_Int(string2,"Origin");
     
    PlayerInfo[playerid][pBanned] = dini_Int(string2,"Banned");
     
    PlayerInfo[playerid][pMute] = dini_Int(string2,"Mute");
     
    PlayerInfo[playerid][pExp] = dini_Int(string2,"Respect");
     
    PlayerInfo[playerid][pMoney] = dini_Int(string2,"Money");
     
    PlayerInfo[playerid][pAccount] = dini_Int(string2,"Bank");
     
    PlayerInfo[playerid][pCrimes] = dini_Int(string2,"Crimes");
     
    PlayerInfo[playerid][pDeaths] = dini_Int(string2,"Deaths");
     
    PlayerInfo[playerid][pArrested] = dini_Int(string2,"Arresteed");
     
    PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2,"WantedDeaths");
     
    PlayerInfo[playerid][pPhoneBook] = dini_Int(string2,"Phonebook");
     
    PlayerInfo[playerid][pLottoNr] = dini_Int(string2,"LottoNr");
     
    PlayerInfo[playerid][pFishes] = dini_Int(string2,"Fishes");
     
    PlayerInfo[playerid][pBiggestFish] = dini_Int(string2,"BiggestFish");
     
    PlayerInfo[playerid][pJob] = dini_Int(string2,"Job");
     
    PlayerInfo[playerid][pPayCheck] = dini_Int(string2,"Paycheck");
     
    PlayerInfo[playerid][pHeadValue] = dini_Int(string2,"HeadValue");
     
    PlayerInfo[playerid][pJailed] = dini_Int(string2,"Jailed");
     
    PlayerInfo[playerid][pJailTime] = dini_Int(string2,"JailTime");
     
    PlayerInfo[playerid][pMats] = dini_Int(string2,"Materials");
     
    PlayerInfo[playerid][pDrugs] = dini_Int(string2,"Drugs");
     
    PlayerInfo[playerid][pLeader] = dini_Int(string2,"Leader");
     
    PlayerInfo[playerid][pMember] = dini_Int(string2,"Member");
     
    PlayerInfo[playerid][pRank] = dini_Int(string2,"Rank");
     
    PlayerInfo[playerid][pChar] = dini_Int(string2,"Char");
     
    PlayerInfo[playerid][pContractTime] = dini_Int(string2,"ContractTime");
     
    PlayerInfo[playerid][pDetSkill] = dini_Int(string2,"DetSkill");
     
    PlayerInfo[playerid][pSexSkill] = dini_Int(string2,"SexSkill");
     
    PlayerInfo[playerid][pBoxSkill] = dini_Int(string2,"BoxSkill");
     
    PlayerInfo[playerid][pLawSkill] = dini_Int(string2,"LawSkill");
     
    PlayerInfo[playerid][pMechSkill] = dini_Int(string2,"MechSkill");
     
    PlayerInfo[playerid][pJackSkill] = dini_Int(string2,"JackSkill");
     
    PlayerInfo[playerid][pCarSkill] = dini_Int(string2,"CarSkill");
     
    PlayerInfo[playerid][pNewsSkill] = dini_Int(string2,"NewsSkill");
     
    PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2,"DrugsSkill");
     
    PlayerInfo[playerid][pCookSkill] = dini_Int(string2,"CookSkill");
     
    PlayerInfo[playerid][pFishSkill] = dini_Int(string2,"FishSkill");
     
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"CourierSkill");
     
    PlayerInfo[playerid][pCourierSkill] = dini_Int(string2,"RDrugsSkill");
     
    PlayerInfo[playerid][pSHealth] = Float:dini_Float(string2,"pSHealth");
     
    PlayerInfo[playerid][pHealth] = Float:dini_Float(string2,"pHealth");
     
    PlayerInfo[playerid][pInt] = dini_Int(string2,"Int");
     
    PlayerInfo[playerid][pLocal] = dini_Int(string2,"Local");
     
    PlayerInfo[playerid][pTeam] = dini_Int(string2,"Team");
     
    // PlayerInfo[playerid][pSkin] = dini_Int(string2,"Model");
     
    PlayerInfo[playerid][pPnumber] = dini_Int(string2,"PhoneNr");
     
    PlayerInfo[playerid][pPhousekey] = dini_Int(string2,"House");
     
    PlayerInfo[playerid][pPbiskey] = dini_Int(string2,"Bizz");
     
    PlayerInfo[playerid][pPos_x] = Float:dini_Float(string2,"Pos_x");
     
    PlayerInfo[playerid][pPos_y] = Float:dini_Float(string2,"Pos_z");
     
    PlayerInfo[playerid][pPos_z] = Float:dini_Float(string2,"Pos_y");
     
    PlayerInfo[playerid][pCarLic] = dini_Int(string2,"CarLic");
     
    PlayerInfo[playerid][pFlyLic] = dini_Int(string2,"FlyLic");
     
    PlayerInfo[playerid][pBoatLic] = dini_Int(string2,"BoatLic");
     
    PlayerInfo[playerid][pFishLic] = dini_Int(string2,"FishLic");
     
    PlayerInfo[playerid][pGunLic] = dini_Int(string2,"GunLic");
     
    PlayerInfo[playerid][pMotoLic] = dini_Int(string2,"MotoLic");
     
    PlayerInfo[playerid][pGun1] = dini_Int(string2,"Gun1");
     
    PlayerInfo[playerid][pGun2] = dini_Int(string2,"Gun2");
     
    PlayerInfo[playerid][pGun3] = dini_Int(string2,"Gun3");
     
    PlayerInfo[playerid][pGun4] = dini_Int(string2,"Gun4");
     
    PlayerInfo[playerid][pAmmo1] = dini_Int(string2,"Ammo1");
     
    PlayerInfo[playerid][pAmmo2] = dini_Int(string2,"Ammo2");
     
    PlayerInfo[playerid][pAmmo3] = dini_Int(string2,"Ammo3");
     
    PlayerInfo[playerid][pAmmo4] = dini_Int(string2,"Ammo4");
     
    PlayerInfo[playerid][pCarTime] = dini_Int(string2,"CarTime");
     
    PlayerInfo[playerid][pPayDay] = dini_Int(string2,"PayDay");
     
    PlayerInfo[playerid][pPayDayHad] = dini_Int(string2,"PayDayHad");
     
    PlayerInfo[playerid][pCDPlayer] = dini_Int(string2,"CDPlayer");
     
    PlayerInfo[playerid][pWins] = dini_Int(string2,"Wins");
     
    PlayerInfo[playerid][pLoses] = dini_Int(string2,"Loses");
     
    PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2,"AlcoholPerk");
     
    PlayerInfo[playerid][pDrugPerk] = dini_Int(string2,"DrugPerk");
     
    PlayerInfo[playerid][pMiserPerk] = dini_Int(string2,"MiserPerk");
     
    PlayerInfo[playerid][pPainPerk] = dini_Int(string2,"PainPerk");
     
    PlayerInfo[playerid][pTraderPerk] = dini_Int(string2,"TraderPerk");
     
    PlayerInfo[playerid][pTut] = dini_Int(string2,"Tutorial");
     
    PlayerInfo[playerid][pRent] = dini_Int(string2,"Rent");
     
    PlayerInfo[playerid][pWarns] = dini_Int(string2,"Warnings");
     
    PlayerInfo[playerid][pAdjustable] = dini_Int(string2,"Adjustable");
     
    PlayerInfo[playerid][pFuel] = dini_Int(string2,"Fuel");
     
    PlayerInfo[playerid][pMarried] = dini_Int(string2,"Married");
     
    sp dini_Get(string2"MarriedTo");
     
    PlayerInfo[playerid][pMarriedTo] = sp;
     
    PlayerInfo[playerid][pWanted] = dini_Int(string2,"Wanted");
     
    PlayerInfo[playerid][pChest] = dini_Int(string2,"Chest");
     
    PlayerInfo[playerid][pFWarns] = dini_Int(string2,"FWarn");
     
    PlayerInfo[playerid][pMedicaments] = dini_Int(string2,"Medicaments");
     
    PlayerInfo[playerid][pFlatKey] = dini_Int(string2,"Flatkey");
     
    PlayerInfo[playerid][pCarKey] = dini_Int(string2,"CarKey");
     
    PlayerInfo[playerid][pRadio] = dini_Int(string2,"RadioSet");
     
    PlayerInfo[playerid][pTestTime] = dini_Int(string2,"TestTime");
     }
     else
     {
     
    gPlayerLogTries[playerid] += 1;
     if(
    gPlayerLogTries[playerid] == 4){Kick(playerid);}
     new 
    logtires gPlayerLogTries[playerid];
     new 
    loginmsg[256+1];
     
    format(loginmsg,256,"{FF6347}Внимание! Вы ввели неверный пароль!\nУ вас осталось (%d) попытки",logtires);
     
    ShowPlayerDialog(playerid,24,DIALOG_STYLE_MSGBOX," Ошибка!",loginmsg,"Повтор","Выйти");
     return 
    1;
     }
     if(
    PlayerInfo[playerid][pBanned] == 1)
     {
     
    format(string2sizeof(string2), "Diamond City: Аккаунт %s заблокирован.",playername2);
     
    SendClientMessage(playeridCOLOR_LIGHTREDstring2);
     
    Ban(playerid);
     return 
    1;
     }
     
    PlayerInfo[playerid][pAdjustable] = 0;
     
    ResetPlayerMoney(playerid);
     new 
    ip[MAX_PLAYER_NAME];
     
    GetPlayerIp(playeridipsizeof(ip));
     if(
    PlayerInfo[playerid][pReg] == 0)
     {
     
    PlayerInfo[playerid][pLevel] = 1;
     
    PlayerInfo[playerid][pSHealth] = 0.0;
     
    PlayerInfo[playerid][pHealth] = 50.0;
     
    PlayerInfo[playerid][pPos_x] = 2246.6;
     
    PlayerInfo[playerid][pPos_y] = -1161.9;
     
    PlayerInfo[playerid][pPos_z] = 1029.7;
     
    PlayerInfo[playerid][pInt] = 15;
     
    PlayerInfo[playerid][pLocal] = 255;
     
    PlayerInfo[playerid][pTeam] = 3;
     if(
    PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pChar] = 170; }
     else if(
    PlayerInfo[playerid][pSex] == 2) { PlayerInfo[playerid][pChar] = 190; }
     
    PlayerInfo[playerid][pPnumber] = 0;
     
    PlayerInfo[playerid][pPhousekey] = 255;
     
    PlayerInfo[playerid][pPbiskey] = 255;
     
    PlayerInfo[playerid][pAccount] = 0;
     
    PlayerInfo[playerid][pReg] = 1;
     
    PlayerInfo[playerid][pMoney] = 500;
     
    PlayerInfo[playerid][pCarKey] = -1;
     
    PlayerInfo[playerid][pFlatKey] = 255;
     }
     else if(
    PlayerInfo[playerid][pTut] == 0)
     {
     new 
    string[500];
     
    format(string,sizeof(string),"{FFFFFF}* Вы действительно хотите зарегистрировать этот аккаунт?\nЕсли вы не хотите продолжать регистрацию нажмие 'Далее'\nЕсли нехотите нажмите 'Отмена' и ваш аккаунт будет {ff3300}удален{ffffff}.");
     
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"{ ffffff}Feni[X] [Rus/Ua]",string,"Далее","Отмена");
     }
     
    SetPlayerInterior(playerid,GetPlayerInterior(playe rid));
     
    SetCameraBehindPlayer(playerid);
     if(
    PlayerInfo[playerid][pDonateRank] > 0)
     {
     
    SendClientMessage(playeridCOLOR_XD,"Diamond City: Вы используете премиум аккаунт.");
     }
     if(
    PlayerInfo[playerid][pAdmin] > 0)
     {
     new 
    string[256];
     
    format(string2sizeof(string2), "Diamond City: Вы вошли как администратор %d уровня.",PlayerInfo[playerid][pAdmin]);
     
    SendClientMessage(playeridCOLOR_XD,string2);
     
    format(stringsizeof(string), "Diamond City: %s зашёл как администратор %d уровня [%s]. ",playername2PlayerInfo[playerid][pAdmin],ip);
     
    SendAdminMessage(COLOR_GREEN2string);
     
    log("ALogged",string);
     }
     else if(
    PlayerInfo[playerid][pAdmin] == 0)
     {
     new 
    sendername[MAX_PLAYER_NAME];
     
    GetPlayerName(playeridsendernamesizeof(sendername));
     new 
    logstr[400];
     
    format(logstrsizeof(logstr), "%s зашёл на сервер, ip: %s.",sendername,ip);
     
    log("Logged"logstr);
     }
     
    // Фикс дома/машины/квартиры
     
    new sendername[MAX_PLAYER_NAME];
     
    GetPlayerName(playeridsendernamesizeof(sendername));
     if(
    PlayerInfo[playerid][pFlatKey] != 255 && strcmp(sendernameFlatsInfo[PlayerInfo[playerid][pFlatKey]][fOwner], true) == 0) { }
     else { if(
    PlayerInfo[playerid][pFlatKey] != 255) { PlayerInfo[playerid][pFlatKey] = 255; } }
     if(
    PlayerInfo[playerid][pCarKey] != -&& strcmp(sendernameCarsInfo[PlayerInfo[playerid][pCarKey]][vOwner], true) == 0) { }
     else { if(
    PlayerInfo[playerid][pCarKey] != -1) { PlayerInfo[playerid][pCarKey] = -1; } }
     if(
    PlayerInfo[playerid][pPhousekey] != 255 && strcmp(sendernameHouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) { }
     else { if(
    PlayerInfo[playerid][pPhousekey] != 255) { PlayerInfo[playerid][pPhousekey] = 255; } }

     
    SetSpawnInfo(playeridPlayerInfo[playerid][pTeam], PlayerInfo[playerid][pChar], 2223.8,-1147.1,1025.71.0, -1, -1, -1, -1, -1, -1);
     
    gPlayerLogged[playerid] = 1;
     
    SpawnPlayer(playerid);
     
    DateProp(playerid);
     
    SetPlayerScore(playeridPlayerInfo[playerid][pLevel]);
     
    RemovePlayerAttachedObject(playerid,1);
     
    RemovePlayerAttachedObject(playerid,2);
     
    RemovePlayerAttachedObject(playerid,3);
     
    RemovePlayerAttachedObject(playerid,4);
     
    RemovePlayerAttachedObject(playerid,5);
     return 
    1;
     }

     
    stock ini_GetKeyline[] )
     {
     new 
    keyRes[256];
     
    keyRes[0] = 0;
     if ( 
    strfindline "="true ) == -) return keyRes;
     
    strmidkeyRes line strfindline "="true ) , sizeofkeyRes) );
     return 
    keyRes;
     }

     
    stock ini_GetValueline[] )
     {
     new 
    valRes[256];
     
    valRes[0]=0;
     if ( 
    strfindline "="true ) == -) return valRes;
     
    strmidvalRes line strfindline "="true )+strlenline ) , sizeofvalRes ) );
     return 
    valRes;
     }

     public 
    OnPropUpdate()
     {
     new 
    idx;
     new 
    Filefile2;
     while (
    idx sizeof(HouseInfo))
     {
     new 
    coordsstring[256];
     
    format(coordsstringsizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,% d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
     
    HouseInfo[idx][hEntrancex],
     
    HouseInfo[idx][hEntrancey],
     
    HouseInfo[idx][hEntrancez],
     
    HouseInfo[idx][hExitx],
     
    HouseInfo[idx][hExity],
     
    HouseInfo[idx][hExitz],
     
    HouseInfo[idx][hHealthx],
     
    HouseInfo[idx][hHealthy],
     
    HouseInfo[idx][hHealthz],
     
    HouseInfo[idx][hArmourx],
     
    HouseInfo[idx][hArmoury],
     
    HouseInfo[idx][hArmourz],
     
    HouseInfo[idx][hOwner],
     
    HouseInfo[idx][hDiscription],
     
    HouseInfo[idx][hValue],
     
    HouseInfo[idx][hHel],
     
    HouseInfo[idx][hArm],
     
    HouseInfo[idx][hInt],
     
    HouseInfo[idx][hLock],
     
    HouseInfo[idx][hOwned],
     
    HouseInfo[idx][hRooms],
     
    HouseInfo[idx][hRent],
     
    HouseInfo[idx][hRentabil],
     
    HouseInfo[idx][hTakings],
     
    HouseInfo[idx][hVec],
     
    HouseInfo[idx][hVcol1],
     
    HouseInfo[idx][hVcol2],
     
    HouseInfo[idx][hDate],
     
    HouseInfo[idx][hLevel]);
     if(
    idx == 0)
     {
     
    file2 fopen("Diamond/house.cfg"io_write);
     }
     else
     {
     
    file2 fopen("Diamond/house.cfg"io_append);
     }
     
    fwrite(file2coordsstring);
     
    idx++;
     
    fclose(file2);
     }
     
    idx 0;
     while (
    idx sizeof(BizzInfo))
     {
     new 
    coordsstring[256];
     
    format(coordsstringsizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|% d|%d\n",
     
    BizzInfo[idx][bOwned],
     
    BizzInfo[idx][bOwner],
     
    BizzInfo[idx][bMessage],
     
    BizzInfo[idx][bEntranceX],
     
    BizzInfo[idx][bEntranceY],
     
    BizzInfo[idx][bEntranceZ],
     
    BizzInfo[idx][bExitX],
     
    BizzInfo[idx][bExitY],
     
    BizzInfo[idx][bExitZ],
     
    BizzInfo[idx][bLevelNeeded],
     
    BizzInfo[idx][bBuyPrice],
     
    BizzInfo[idx][bEntranceCost],
     
    BizzInfo[idx][bTill],
     
    BizzInfo[idx][bLocked],
     
    BizzInfo[idx][bInterior],
     
    BizzInfo[idx][bProducts],
     
    BizzInfo[idx][bMaxProducts],
     
    BizzInfo[idx][bPriceProd]);
     if(
    idx == 0)
     {
     
    file2 fopen("Diamond/bizz.cfg"io_write);
     }
     else
     {
     
    file2 fopen("Diamond/bizz.cfg"io_append);
     }
     
    fwrite(file2coordsstring);
     
    idx++;
     
    fclose(file2);
     }
     
    idx 0;
     while (
    idx sizeof(SBizzInfo))
     {
     new 
    coordsstring[256];
     
    format(coordsstringsizeof(coordsstring), "%d|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\ n",
     
    SBizzInfo[idx][sbOwned],
     
    SBizzInfo[idx][sbOwner],
     
    SBizzInfo[idx][sbMessage],
     
    SBizzInfo[idx][sbEntranceX],
     
    SBizzInfo[idx][sbEntranceY],
     
    SBizzInfo[idx][sbEntranceZ],
     
    SBizzInfo[idx][sbLevelNeeded],
     
    SBizzInfo[idx][sbBuyPrice],
     
    SBizzInfo[idx][sbEntranceCost],
     
    SBizzInfo[idx][sbTill],
     
    SBizzInfo[idx][sbLocked],
     
    SBizzInfo[idx][sbInterior],
     
    SBizzInfo[idx][sbProducts],
     
    SBizzInfo[idx][sbMaxProducts],
     
    SBizzInfo[idx][sbPriceProd]);
     if(
    idx == 0)
     {
     
    file2 fopen("Diamond/sbizz.cfg"io_write);
     }
     else
     {
     
    file2 fopen("Diamond/sbizz.cfg"io_append);
     }
     
    fwrite(file2coordsstring);
     
    idx++;
     
    fclose(file2);
     }
     
    idx 0;
     while (
    idx sizeof(FlatsInfo))
     {
     new 
    coordsstring[256];
     
    format(coordsstringsizeof(coordsstring), "%d,%s,%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,% d\n",
     
    FlatsInfo[idx][fOwned],
     
    FlatsInfo[idx][fOwner],
     
    FlatsInfo[idx][fEntrancex],
     
    FlatsInfo[idx][fEntrancey],
     
    FlatsInfo[idx][fEntrancez],
     
    FlatsInfo[idx][fExitx],
     
    FlatsInfo[idx][fExity],
     
    FlatsInfo[idx][fExitz],
     
    FlatsInfo[idx][fInt],
     
    FlatsInfo[idx][fVirtWorld],
     
    FlatsInfo[idx][fValue],
     
    FlatsInfo[idx][fLock],
     
    FlatsInfo[idx][fRent],
     
    FlatsInfo[idx][fRentabil],
     
    FlatsInfo[idx][fTakings],
     
    FlatsInfo[idx][fDate],
     
    FlatsInfo[idx][fLevel]);
     if(
    idx == 0)
     {
     
    file2 fopen("Diamond/flats.cfg"io_write);
     }
     else
     {
     
    file2 fopen("Diamond/flats.cfg"io_append);
     }
     
    fwrite(file2coordsstring);
     
    idx++;
     
    fclose(file2);
     }
     
    idx 0;
     while (
    idx sizeof(CarsInfo))
     {
     new 
    coordsstring[256];
     
    format(coordsstringsizeof(coordsstring), "%d,%s,%d,%f,%f,%f,%f,%d,%d,%d,%d,%f,%f,%f,%f\ n",
     
    CarsInfo[idx][vOwned],
     
    CarsInfo[idx][vOwner],
     
    CarsInfo[idx][vModel],
     
    CarsInfo[idx][vPosX],
     
    CarsInfo[idx][vPosY],
     
    CarsInfo[idx][vPosZ],
     
    CarsInfo[idx][vAngle],
     
    CarsInfo[idx][vColorOne],
     
    CarsInfo[idx][vColorTwo],
     
    CarsInfo[idx][vLock],
     
    CarsInfo[idx][vValue],
     
    CarsInfo[idx][vParkX],
     
    CarsInfo[idx][vParkY],
     
    CarsInfo[idx][vParkZ],
     
    CarsInfo[idx][vParkAngle]);
     if(
    idx == 0)
     {
     
    file2 fopen("Diamond/cars.cfg"io_write);
     }
     else
     {
     
    file2 fopen("Diamond/cars.cfg"io_append);
     }
     
    fwrite(file2coordsstring);
     
    idx++;
     
    fclose(file2);
     }
     return 
    1;
     }

     public 
    BroadCast(color,const string[])
     {
     
    SendClientMessageToAll(colorstring);
     return 
    1;
     }

     public 
    ABroadCast(color,const string[],level)
     {
     for(new 
    0GetMaxPlayers(); i++)
     {
     if(
    IsPlayerConnected(i))
     {
     if (
    PlayerInfo[i][pAdmin] >= level)
     {
     
    SendClientMessage(icolorstring);
     }
     }
     }
     return 
    1;
     }

     public 
    OOCOff(color,const string[])
     {
     for(new 
    0GetMaxPlayers(); i++)
     {
     if(
    IsPlayerConnected(i))
     {
     if(!
    gOoc[i])
     {
     
    SendClientMessage(icolorstring);
     }
     }
     }
     }

     public 
    OOCNews(color,const string[])
     {
     for(new 
    0GetMaxPlayers(); i++)
     {
     if(
    IsPlayerConnected(i))
     {
     if(!
    gNews[i])
     {
     
    SendClientMessage(icolorstring);
     }
     }
     }
     }

     public 
    SendTeamMessage(teamcolorstring[])
     {
     for(new 
    0GetMaxPlayers(); i++)
     {
     if(
    IsPlayerConnected(i))
     {
     if(
    gTeam[i] == team)
     {
     
    SendClientMessage(icolorstring);
     }
     }
     }
     } 
    Помогаю в скриптинге нужна помощь пишите!
    SKYPE - aim4ik2
    ICQ - 157-113-3
  10. #10
    Заблокирован

    Аватар для Mr.Leon

    Статус: Оффлайн
    Регистрация:20.06.2012
    Сообщений:16
    Репутация:0 [+/-] 
    скорее всего в паблике логина,при коннекте не может давать,может быть ещё в OnPlayerRegister

    public OnPlayerRegister(playerid, password[])
    {
    if(IsPlayerConnected(playerid))
    {
    new string[128];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "Accounts/%s.ini", playername);
    if(!dini_Exists(string))
    {
    dini_Create(string);
    dini_Set(string, "Key", password);
    dini_IntSet(string, "Level", PlayerInfo[playerid][pLevel]);
    dini_IntSet(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
    dini_IntSet(string, "DonateRank", PlayerInfo[playerid][pDonateRank]); //,PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
    dini_IntSet(string, "UpgradePoints", PlayerInfo[playerid][gPupgrade]); //,PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
    dini_IntSet(string, "ConnectedTime", PlayerInfo[playerid][pConnectTime]); //,PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
    dini_IntSet(string, "Registered", PlayerInfo[playerid][pReg]); //,PlayerInfo[playerid][pReg]);fwrite(hFile, var);
    dini_IntSet(string, "Sex", PlayerInfo[playerid][pSex]); //,PlayerInfo[playerid][pSex]);fwrite(hFile, var);
    dini_IntSet(string, "Age", PlayerInfo[playerid][pAge]); //,PlayerInfo[playerid][pAge]);fwrite(hFile, var);
    dini_IntSet(string, "Origin", PlayerInfo[playerid][pOrigin]); //,PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
    dini_IntSet(string, "Banned", PlayerInfo[playerid][pBanned]); //,PlayerInfo[playerid][pBanned]);fwrite(hFile, var);
    dini_IntSet(string, "Muted", PlayerInfo[playerid][pMute]); //,PlayerInfo[playerid][pMute]);fwrite(hFile, var);
    dini_IntSet(string, "Respect", PlayerInfo[playerid][pExp]); //,PlayerInfo[playerid][pExp]);fwrite(hFile, var);
    dini_IntSet(string, "Money", PlayerInfo[playerid][pMoney]);
    dini_IntSet(string, "Bank", PlayerInfo[playerid][pAccount]); //,PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
    dini_IntSet(string, "Crimes", PlayerInfo[playerid][pCrimes]); //,PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
    dini_IntSet(string, "Deaths", PlayerInfo[playerid][pDeaths]); //,PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    dini_IntSet(string, "Arrested", PlayerInfo[playerid][pArrested]); //,PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
    dini_IntSet(string, "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]); //,PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
    dini_IntSet(string, "Phonebook", PlayerInfo[playerid][pPhoneBook]); //,PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
    dini_IntSet(string, "LottoNr", PlayerInfo[playerid][pLottoNr]); //,PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
    dini_IntSet(string, "Fishes", PlayerInfo[playerid][pFishes]); //,PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
    dini_IntSet(string, "BiggestFish", PlayerInfo[playerid][pBiggestFish]); //,PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
    dini_IntSet(string, "Job", PlayerInfo[playerid][pJob]); //,PlayerInfo[playerid][pJob]);fwrite(hFile, var);
    dini_IntSet(string, "Paycheck", PlayerInfo[playerid][pPayCheck]); //,PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
    dini_IntSet(string, "HeadValue", PlayerInfo[playerid][pHeadValue]); //,PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
    dini_IntSet(string, "Jailed", PlayerInfo[playerid][pJailed]); //,PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
    dini_IntSet(string, "JailTime", PlayerInfo[playerid][pJailTime]); //,PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
    dini_IntSet(string, "Materials", PlayerInfo[playerid][pMats]); //,PlayerInfo[playerid][pMats]);fwrite(hFile, var);
    dini_IntSet(string, "Drugs", PlayerInfo[playerid][pDrugs]); //,PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
    dini_IntSet(string, "Leader", PlayerInfo[playerid][pLeader]); //,PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
    dini_IntSet(string, "Member", PlayerInfo[playerid][pMember]); //,PlayerInfo[playerid][pMember]);fwrite(hFile, var);
    dini_IntSet(string, "Rank", PlayerInfo[playerid][pRank]); //,PlayerInfo[playerid][pRank]);fwrite(hFile, var);
    dini_IntSet(string, "Char", PlayerInfo[playerid][pChar]); //,PlayerInfo[playerid][pChar]);fwrite(hFile, var);
    dini_IntSet(string, "ContractTime", PlayerInfo[playerid][pContractTime]); //,PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
    dini_IntSet(string, "DetSkill", PlayerInfo[playerid][pDetSkill]); //,PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
    dini_IntSet(string, "SexSkill", PlayerInfo[playerid][pSexSkill]); //,PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
    dini_IntSet(string, "BoxSkill", PlayerInfo[playerid][pBoxSkill]); //,PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
    dini_IntSet(string, "LawSkill", PlayerInfo[playerid][pLawSkill]); //,PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
    dini_IntSet(string, "MechSkill", PlayerInfo[playerid][pMechSkill]); //,PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
    dini_IntSet(string, "JackSkill", PlayerInfo[playerid][pJackSkill]); //,PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
    dini_IntSet(string, "CarSkill", PlayerInfo[playerid][pCarSkill]); //,PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
    dini_IntSet(string, "NewsSkill", PlayerInfo[playerid][pNewsSkill]); //,PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
    dini_IntSet(string, "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]); //,PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
    dini_IntSet(string, "CookSkill", PlayerInfo[playerid][pCookSkill]); //,PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
    dini_IntSet(string, "FishSkill", PlayerInfo[playerid][pFishSkill]); //,PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
    dini_IntSet(string, "CourierSkill", PlayerInfo[playerid][pCourierSkill]);
    dini_IntSet(string, "RDrugsSkill", PlayerInfo[playerid][pRDrugsSkill]);
    dini_FloatSet(string, "pSHealth",PlayerInfo[playerid][pSHealth]);
    GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
    dini_FloatSet(string, "pHealth",PlayerInfo[playerid][pHealth]);
    dini_IntSet(string, "Int", PlayerInfo[playerid][pInt]); //,PlayerInfo[playerid][pInt]);fwrite(hFile, var);
    dini_IntSet(string, "Local", PlayerInfo[playerid][pLocal]); //,PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
    dini_IntSet(string, "Team", PlayerInfo[playerid][pTeam]); //,PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
    // dini_IntSet(string, "Model", PlayerInfo[playerid][pSkin]); //,PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
    dini_IntSet(string, "PhoneNr", PlayerInfo[playerid][pPnumber]); //,PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
    dini_IntSet(string, "House", PlayerInfo[playerid][pPhousekey]); //,PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
    dini_IntSet(string, "Bizz", PlayerInfo[playerid][pPbiskey]); //,PlayerInfo[playerid][pPbiskey]);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] = 2246.6;
    PlayerInfo[playerid][pPos_y] = -1161.9;
    PlayerInfo[playerid][pPos_z] = 1029.7;
    }
    dini_FloatSet(string, "Pos_x",PlayerInfo[playerid][pPos_x]);
    dini_FloatSet(string, "Pos_y",PlayerInfo[playerid][pPos_y]);
    dini_FloatSet(string, "Pos_z",PlayerInfo[playerid][pPos_z]);
    dini_IntSet(string, "CarLic", PlayerInfo[playerid][pCarLic]); //,PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
    dini_IntSet(string, "FlyLic", PlayerInfo[playerid][pFlyLic]); //,PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
    dini_IntSet(string, "BoatLic", PlayerInfo[playerid][pBoatLic]); //,PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
    dini_IntSet(string, "FishLic", PlayerInfo[playerid][pFishLic]); //,PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
    dini_IntSet(string, "GunLic", PlayerInfo[playerid][pGunLic]); //,PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
    dini_IntSet(string, "MotoLic", PlayerInfo[playerid][pMotoLic]); //,PlayerInfo[playerid][pMotoLic]);fwrite(hFile, var);
    dini_IntSet(string, "Gun1", PlayerInfo[playerid][pGun1]); //,PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
    dini_IntSet(string, "Gun2", PlayerInfo[playerid][pGun2]); //,PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
    dini_IntSet(string, "Gun3", PlayerInfo[playerid][pGun3]); //,PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
    dini_IntSet(string, "Gun4", PlayerInfo[playerid][pGun4]); //,PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
    dini_IntSet(string, "Ammo1", PlayerInfo[playerid][pAmmo1]); //,PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
    dini_IntSet(string, "Ammo2", PlayerInfo[playerid][pAmmo2]); //,PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
    dini_IntSet(string, "Ammo3", PlayerInfo[playerid][pAmmo3]); //,PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
    dini_IntSet(string, "Ammo4", PlayerInfo[playerid][pAmmo4]); //,PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
    dini_IntSet(string, "CarTime", PlayerInfo[playerid][pCarTime]); //,PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
    dini_IntSet(string, "PayDay", PlayerInfo[playerid][pPayDay]); //,PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
    dini_IntSet(string, "PayDayHad", PlayerInfo[playerid][pPayDayHad]); //,PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
    dini_IntSet(string, "CDPlayer", PlayerInfo[playerid][pCDPlayer]); //,PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
    dini_IntSet(string, "Wins", PlayerInfo[playerid][pWins]); //,PlayerInfo[playerid][pWins]);fwrite(hFile, var);
    dini_IntSet(string, "Loses", PlayerInfo[playerid][pLoses]); //,PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
    dini_IntSet(string, "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]); //,PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
    dini_IntSet(string, "DrugPerk", PlayerInfo[playerid][pDrugPerk]); //,PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
    dini_IntSet(string, "MiserPerk", PlayerInfo[playerid][pMiserPerk]); //,PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
    dini_IntSet(string, "PainPerk", PlayerInfo[playerid][pPainPerk]); //,PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
    dini_IntSet(string, "TraderPerk", PlayerInfo[playerid][pTraderPerk]); //,PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
    dini_IntSet(string, "Tutorial", PlayerInfo[playerid][pTut]); //,PlayerInfo[playerid][pTut]);fwrite(hFile, var);
    dini_IntSet(string, "Rent", PlayerInfo[playerid][pRent]); //,PlayerInfo[playerid][pRent]);fwrite(hFile, var);
    dini_IntSet(string, "Warnings", PlayerInfo[playerid][pWarns]); //,PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
    dini_IntSet(string, "Adjustable", PlayerInfo[playerid][pAdjustable]); //,PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
    dini_IntSet(string, "Fuel", PlayerInfo[playerid][pFuel]); //,PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
    dini_IntSet(string, "Married", PlayerInfo[playerid][pMarried]); //,PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
    new string2[32];
    format(string2,sizeof(string2),"-");
    dini_Set(string, "MarriedTo", string2);
    dini_IntSet(string, "Wanted", PlayerInfo[playerid][pWanted]); //,PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
    dini_IntSet(string, "Chest", PlayerInfo[playerid][pChest]);
    dini_IntSet(string, "FWarn", PlayerInfo[playerid][pFWarns]);
    dini_IntSet(string, "Medicaments", PlayerInfo[playerid][pMedicaments]);
    dini_IntSet(string, "Flatkey", PlayerInfo[playerid][pFlatKey]);
    dini_IntSet(string, "CarKey", PlayerInfo[playerid][pCarKey]);
    dini_IntSet(string, "RadioSet", PlayerInfo[playerid][pRadio]);
    dini_IntSet(string, "TestTime", PlayerInfo[playerid][pTestTime]);
    }
    else
    {
    SendClientMessage(playerid, COLOR_XD,"Diamond City: Ошибка записи, такой аккаунт существует.");
    }
    }
    return 1;
    }
Страница 1 из 2 12 Последняя
  • К странице:

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения