Beiträge von Saphire

    Ich hatte das schon oben, ging aber auch nicht.


    Das steht in der Logg :


    [19:25:20] Diamond_Effect has logged in.
    [19:25:20] newstate = 8 / playerid: 0
    [19:25:20] newstate = 1 / playerid: 0
    [19:25:33] newstate = 2 / playerid: 0
    [19:25:33] in
    [19:25:33] engine: -1

    Reicht das ?
    weil da steht viel drin :D


    Spoiler anzeigen


    Function OnPlayerStateChange(playerid, newstate, oldstate)
    {
    FRAC_OnPlayerStateChange(playerid, newstate, oldstate);
    new string[256];

    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
    for(new p=0;p<MAX_PLAYERS;p++)
    {
    if(GetPlayerVehicleSeat(playerid) == 0 && GetPlayerVehicleID(playerid) == acar [p])
    {
    if(PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pSupporter] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_WHITE, "Du kannst keine Supporter Fahrzeuge fahren.");
    }
    }
    }
    if(IsABike(GetPlayerVehicleID(playerid)))
    {
    switch(GetPlayerSkin(playerid))
    {
    #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
    case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
    case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
    case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
    case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
    case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
    case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    }
    }
    }
    else
    {
    RemovePlayerAttachedObject(playerid, SLOT);
    }
    if(oldstate == PLAYER_STATE_ONFOOT && (newstate == PLAYER_STATE_DRIVER))
    {
    new SName[MAX_PLAYER_NAME]; GetPlayerName(playerid,SName,MAX_PLAYER_NAME);
    SetPlayerArmedWeapon(playerid,0);
    if(EnterLockedV[playerid] <= 0)return 1;
    if(EnterLockedV[playerid] == GetPlayerVehicleID(playerid))return SCMToAllF(Rot,"Spieler '%s' wurde vom Server gekickt. Grund: Enter locked Vehicle!",SName);
    }
    if((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER)))
    {
    for(new j=0; j<11; j++) GivePlayerWeaponEx(playerid, Weapons[playerid][j], Ammo[playerid][j]);
    return 1;
    }
    printf("newstate = %d / playerid: %d", newstate, playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
    printf("in");
    for(new j=0; j<11; j++) GetPlayerWeaponData(playerid, j, Weapons[playerid][j], Ammo[playerid][j]);
    ResetPlayerWeapons(playerid);
    new vid = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
    printf("engine: %d", engine);
    if(engine == VEHICLE_PARAMS_OFF)
    {
    SendClientMessage(playerid,COLOR_PURPLE2,"Der Motor ist Ausgeschaltet, drücke die STRG Taste um den Motor zu starten.");
    }
    }
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
    new Weap[2];
    GetPlayerWeaponData(playerid, 4, Weap[0], Weap[1]);
    SetPlayerArmedWeapon(playerid, Weap[0]);
    }
    if(newstate==PLAYER_STATE_DRIVER)
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
    {
    if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)
    {
    IsTowTrucker[playerid]=1;
    TowTruckers++;
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"*Nutze die Strg Taste, um ein Auto abzuschleppen.");
    }
    }
    }
    else if(TowTruckers > 0 && newstate == PLAYER_STATE_DRIVER)
    {
    SendClientMessage(playerid, COLOR_YELLOW4, "Wenn Probleme auftreten ruf den Ordnungstienst mit /noamt.");
    }
    else if(newstate == PLAYER_STATE_ONFOOT &&(IsTowTrucker[playerid] == 1))
    {
    IsTowTrucker[playerid] = 0;
    TowTruckers--;
    }
    else if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 417)
    {
    SetPlayerPosEx(playerid, 1261.269,-803.480,1185.830);
    SetPlayerFacingAngle(playerid, 0);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid, 1);
    InLevi[playerid] = GetPlayerVehicleID(playerid);
    }
    else if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 548)
    {
    SetPlayerPosEx(playerid, 89.773613, 2027.749756, 2865.647705);
    SetPlayerFacingAngle(playerid, 0);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid, 0);
    InCargo[playerid] = GetPlayerVehicleID(playerid);
    }
    else if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 427 && IsACop(playerid))
    {
    SetPlayerPosEx(playerid, 260.4671,118.6456,1029.7023);
    SetPlayerFacingAngle(playerid, 178.6620);
    SetCameraBehindPlayer(playerid);
    SetPlayerInterior(playerid, 3);
    InEnfo[playerid] = GetPlayerVehicleID(playerid);
    }
    else if(newstate == PLAYER_STATE_PASSENGER && PlayerInfo[playerid][pJailed] > 0 && !IsAPlane(GetPlayerVehicleID(playerid)))
    {

    FreezePlayer(playerid);
    UnFreezePlayer(playerid);
    }

    Warum zeigt er mir die Nachricht nicht ?



    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new j=0; j<11; j++) GetPlayerWeaponData(playerid, j, Weapons[playerid][j], Ammo[playerid][j]);
    ResetPlayerWeapons(playerid);
    new vid = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(engine == VEHICLE_PARAMS_OFF)
    {
    SendClientMessage(playerid,COLOR_PURPLE2,"Der Motor ist Ausgeschaltet, drücke die STRG Taste um den Motor zu starten.");
    }
    }


    #edit

    Hallöchen,
    ich habe da ein kleineres Problem, undzwar wird mein Passwort nicht akzeptiert.


    Ich gehe stark davon aus das es irgendetwas hier mit zu tun hat


    Spoiler anzeigen


    Function OnPlayerLogin(playerid,password[])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new valtmp[256];
    valtmp = dini_Get(string2, "Key");
    strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
    PlayerInfo[playerid][pLevel] = dini_Int(string2, "Level");
    PlayerInfo[playerid][pAdmin] = dini_Int(string2, "AdminLevel");
    PlayerInfo[playerid][pSupporter] = dini_Int(string2, "Supporter");
    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][pCK] = dini_Int(string2, "CK");
    PlayerInfo[playerid][pMuted] = dini_Int(string2, "Muted");
    PlayerInfo[playerid][pExp] = dini_Int(string2, "Respect");
    PlayerInfo[playerid][pCash] = dini_Int(string2, "Money");
    PlayerInfo[playerid][pAccount] = dini_Int(string2, "Bank");
    PlayerInfo[playerid][pPlayerKredit] = dini_Int(string2, "Kredit");
    PlayerInfo[playerid][pPlayerKreditDauer] = dini_Int(string2, "KreditDauer");
    PlayerInfo[playerid][pCrimes] = dini_Int(string2, "Crimes");
    PlayerInfo[playerid][pKills] = dini_Int(string2, "Kills");
    PlayerInfo[playerid][pDeaths] = dini_Int(string2, "Deaths");
    PlayerInfo[playerid][pArrested] = dini_Int(string2, "Arrested");
    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][pGangJailed] = dini_Int(string2, "GangJailed");
    PlayerInfo[playerid][pMauled] = dini_Int(string2, "Mauled");
    PlayerInfo[playerid][pJailTime] = dini_Int(string2, "JailTime");
    PlayerInfo[playerid][pMats] = dini_Int(string2, "Materials");
    PlayerInfo[playerid][pDrugs] = dini_Int(string2, "Drugs");
    PlayerInfo[playerid][pBoxMats] = dini_Int(string2, "BoxMaterials");
    PlayerInfo[playerid][pBoxDrugs] = dini_Int(string2, "BoxDrugs");
    SetPlayerFightingStyle(playerid, dini_Int(string2, "FightingStyle"));
    PlayerInfo[playerid][pLeader] = dini_Int(string2, "Leader");
    PlayerInfo[playerid][pMember] = dini_Int(string2, "Member");
    PlayerInfo[playerid][pFMember] = dini_Int(string2, "FMember");
    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, "pFishSkill");
    PlayerInfo[playerid][pSHealth] = dini_Float(string2, "pSHealth");
    PlayerInfo[playerid][pHealth] = dini_Float(string2, "pHealth");
    PlayerInfo[playerid][pInt] = dini_Int(string2, "pInt");
    PlayerInfo[playerid][pLocal] = dini_Int(string2, "pLocal");
    PlayerInfo[playerid][pTeam] = dini_Int(string2, "pTeam");
    PlayerInfo[playerid][pModel] = dini_Int(string2, "pModel");
    PlayerInfo[playerid][pPnumber] = dini_Int(string2, "PhoneNr");
    PlayerInfo[playerid][pPhousekey] = dini_Int(string2, "House");
    PlayerInfo[playerid][pPbiskey] = dini_Int(string2, "Bizz");
    PlayerInfo[playerid][pHandyGeld] = dini_Int(string2, "HandyGeld");
    PlayerInfo[playerid][pHandyVer] = dini_Int(string2, "HandyVer");
    PlayerInfo[playerid][pPos_x] = dini_Float(string2, "Pos_x");
    PlayerInfo[playerid][pPos_y] = dini_Float(string2, "Pos_y");
    PlayerInfo[playerid][pPos_z] = dini_Float(string2, "Pos_z");
    PlayerInfo[playerid][pCarLic] = dini_Int(string2, "CarLic");
    PlayerInfo[playerid][pNewLic] = dini_Int(string2, "NewLic");
    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][pLKWLic] = dini_Int(string2, "LKWLic");
    PlayerInfo[playerid][pRollerLic] = dini_Int(string2, "RollerLic");
    PlayerInfo[playerid][pMotoLic] = dini_Int(string2, "MotoLic");
    PlayerInfo[playerid][pZig] = dini_Int(string2, "Zig");
    PlayerInfo[playerid][pKekse] = dini_Int(string2, "Kekse");
    PlayerInfo[playerid][pZigSucht] = dini_Int(string2, "ZigSucht");
    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][pMulltime] = dini_Int(string2, "Mulltime");
    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][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");
    PlayerInfo[playerid][pMarriedTo] = dini_Int(string2, "MarriedTo");
    SpawnChange[playerid] = dini_Int(string2, "SpawnChange");
    WantedLevel[playerid] = dini_Int(string2, "WantedLevel");
    WantedLevel[playerid] = dini_Int(string2, "WantedPoints");
    PlayerInfo[playerid][pPlayMinutes] = dini_Int(string2, "PlayMinutes");
    PlayerInfo[playerid][pGesamtMinutes] = dini_Int(string2, "GesamtMinutes");
    PlayerInfo[playerid][pMinutesSinceAn] = dini_Int(string2, "MinutesSinceAn");
    OfflineFlucht[playerid] = dini_Int(string2, "Offflucht");
    Knast[playerid] = dini_Int(string2, "Knast");
    PlayerInfo[playerid][pHandyID] = dini_Int(string2, "Handy");
    PlayerInfo[playerid][pUhrID] = dini_Int(string2, "Uhr");
    KnastTime[playerid] = dini_Int(string2, "KnastTime");
    PlayerInfo[playerid][pOwnPerso] = dini_Int(string2, "Perso");
    PlayerInfo[playerid][pFrakSperre] = dini_Int(string2, "FrakSperre");
    PlayerInfo[playerid][pGehalt] = dini_Int(string2, "Gehalt");
    PlayerInfo[playerid][pInvWeapon] = dini_Int(string2, "InvWeapon");
    PlayerInfo[playerid][pInvAmmo] = dini_Int(string2, "InvAmmo");
    PlayerInfo[playerid][pInvWeapon2] = dini_Int(string2, "InvWeapon2");
    PlayerInfo[playerid][pInvAmmo2] = dini_Int(string2, "InvAmmo2");
    PlayerInfo[playerid][pInvMats] = dini_Int(string2, "InvMats");
    PlayerInfo[playerid][pInvDrugs] = dini_Int(string2, "InvDrugs");
    PlayerInfo[playerid][pFlugTime] = dini_Int(string2, "FlugTime");
    PlayerInfo[playerid][pFarmTime] = dini_Int(string2, "FarmTime");
    PlayerInfo[playerid][pGDeaths] = dini_Int(string2, "GDeaths");
    PlayerInfo[playerid][pGKills] = dini_Int(string2, "GKills");
    PlayerInfo[playerid][pGWD] = dini_Float(string2, "GWD");
    PlayerInfo[playerid][pMeldung] = dini_Int(string2, "Meldung");
    PlayerInfo[playerid][pPtankekey] = dini_Int(string2, "Gesperrt");
    PlayerInfo[playerid][pGesperrt] = dini_Int(string2, "Handy");
    PlayerInfo[playerid][Punkte] = dini_Int(string2, "Punkte");

    new weapon[14];
    new ammo[14];
    new tmpstring[128];
    for(new i = 1;i< 14;i++)
    {
    format(tmpstring,sizeof tmpstring, "waffenslot%d",i);
    weapon[i-1] = dini_Int(string2, tmpstring);
    format(tmpstring,sizeof tmpstring, "ammoslot%d",i);
    ammo[i-1] = dini_Int(string2, tmpstring);
    GivePlayerWeaponEx(playerid,weapon[i-1],ammo[i-1]);
    }
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{A50000}Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
    fclose(UserFile);
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
    return 1;
    }



    Kann mir jemand dabei helfen ?


    mfg

    Warum klappt das nicht ?



    if(Engine == VEHICLE_PARAMS_OFF){
    SendClientMessage(playerid, -1, "Um den Motor zu starten drücke die Rechte [STRG] Taste oder benutze /motor");
    SendClientMessage(playerid, -1, "Schau doch mal in unserem Radiosystem rein '/radio'");
    }


    Ich möchte das wenn man ins Auto steigt und der Motor aus ist, das diese Nachrichten kommen.
    Jedoch kommen diese gar nicht.


    Ich habe das bei OnPlayerEnterVehicle

    Jeffry:


    diese 2 Zeilen sind aber hier drin und ich weis nicht ob ich die einfach so löschen kann.



    new weapon[14];
    new ammo[14];
    for(new i = 1;i< 14;i++)
    {
    new tmpstring[128];
    format(tmpstring,sizeof tmpstring, "waffenslot%d",i);
    if( strcmp( key , tmpstring , true ) == 0)weapon[i-1] = strval(ini_GetValue( Data ));
    format(tmpstring,sizeof tmpstring, "ammoslot%d",i);
    if( strcmp( key , tmpstring , true ) == 0)ammo[i-1] = strval(ini_GetValue( Data ));
    GivePlayerWeaponEx(playerid,weapon[i-1],ammo[i-1]);
    }

    Hier werden die Dialoge angezeigt.


    Spoiler anzeigen


    Function OnPlayerRequestClass(playerid, classid)
    {
    new nam[MAX_PLAYER_NAME];
    new str[300];
    GetPlayerName(playerid, nam, sizeof(nam));
    format(str, sizeof(str),"{FFFFFF}Herzlich Willkommen auf Momento Roleplay - The Time Starts\nWir Freuen uns das du zu uns gejoint bist.\nDer Account Name{FF5A00} %s {FFFFFF}wurde in unserer Datenbank nicht gefunden.\nErstelle dir einfach einen Account damit du hier spielen kannst.", nam);
    new str2[150];
    format(str2, sizeof(str2),"{FFFFFF}|~~| Willkommen {FF5A00}%s {FFFFFF}|~~|\n\n|*| Schön das du wieder da bist |*| \n\n|~~| Gib dein Passwort ein um dich einzuloggen! |~~|", nam);
    if(IsPlayerNPC(playerid))
    {
    SpawnPlayer(playerid);
    return 1;
    }
    new timestamp = gettime();
    new Name[MAX_PLAYER_NAME];
    new file[128];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file,sizeof(file),"Accounts/%s.ini", Name);
    new bisgebannt = dini_Int(file,"TBan");
    if(timestamp < bisgebannt) //wenn der gerade genommene Timestamp kleiner als bisgebannt ist, liegt das entbannungsdatum in der Zukunft.
    {
    new differenz = bisgebannt - timestamp; //wir subtrahieren bisgebannt von timestamp, wir erhalten also die Zeit in Sekunden wie lange der Spieler noch gebannt ist.
    new minuten = differenz / 60; //wir machen aus den Sekunden Minuten....
    new vstr[64]; //neuer String wird deklariert....
    format(vstr,sizeof(vstr),"Du bist noch %i Minuten gebannt!",minuten); //So bekommt der Spieler sogar noch angezeigt, wie langer er noch genau gebannt ist.
    SendClientMessage(playerid,0xFAFAFAFF,vstr); //String wird dem Spieler ausgegeben
    KickTimer(playerid);//Kick erfolgt
    }
    else if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FFFF00}Login",str2,"Login","Abbrechen");
    }
    else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"{FFFF00}Account",str,"Erstellen","Abbrechen");
    }

    Spoiler anzeigen
    PlayerPlaySound(playerid, 1176, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];
    SetPlayerTeamFromClass(playerid,classid);
    SetupPlayerForClassSelection(playerid);
    return 1;
    }


    Mfg


    #edit:
    diese 2 Zeilen sind aber hier drin und ich weis nicht ob ich die einfach so löschen kann.



    new weapon[14];
    new ammo[14];
    for(new i = 1;i< 14;i++)
    {
    new tmpstring[128];
    format(tmpstring,sizeof tmpstring, "waffenslot%d",i);
    if( strcmp( key , tmpstring , true ) == 0)weapon[i-1] = strval(ini_GetValue( Data ));
    format(tmpstring,sizeof tmpstring, "ammoslot%d",i);
    if( strcmp( key , tmpstring , true ) == 0)ammo[i-1] = strval(ini_GetValue( Data ));
    GivePlayerWeaponEx(playerid,weapon[i-1],ammo[i-1]);
    }

    Jeffry:


    Es geht darum das wenn ich mich einlogge und der Account bereits existiert, ich mich dennoch registriern muss. Nach dem Tutorial kann ich spielen aber wenn ich einen Relogg mache muss ich mich wieder Registrieren.


    Ja ich will Dini benutzen.


    oke danke dir


    #edit:
    Ehm ich bekomme Errors und warnings.
    Du hast mir das vorhin anders gezeigt und jetzt
    "PlayerInfo[playerid][pLevel] = dini_Int(string2, "Level");"


    Ehm Errors und warnings :

    Spoiler anzeigen


    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17225) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17295) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17296) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17297) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17301) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17302) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17305) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17331) : error 017: undefined symbol "key"
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17331) : error 017: undefined symbol "Data"
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17333) : error 017: undefined symbol "key"
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17333) : error 017: undefined symbol "Data"
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17183) : warning 204: symbol is assigned a value that is never used: "keytmp"
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17182) : warning 204: symbol is assigned a value that is never used: "PassData"


    und die Zeilen zu den geweiligen Errors in der gleichen Reinfolge :D


    Spoiler anzeigen


    PlayerInfo[playerid][GetPlayerFightingStyle(playerid)] = dini_Int(string2, "FightingStyle");
    PlayerInfo[playerid][SpawnChange[playerid]] = dini_Int(string2, "SpawnChange");
    PlayerInfo[playerid][WantedLevel[playerid]] = dini_Int(string2, "WantedLevel");
    PlayerInfo[playerid][WantedLevel[playerid]] = dini_Int(string2, "WantedPoints");
    PlayerInfo[playerid][OfflineFlucht[playerid]] = dini_Int(string2, "Offflucht");
    PlayerInfo[playerid][Knast[playerid]] = dini_Int(string2, "Knast");
    PlayerInfo[playerid][KnastTime[playerid]] = dini_Int(string2, "KnastTime");
    if( strcmp( key , tmpstring , true ) == 0)weapon[i-1] = strval(ini_GetValue( Data )); // das ist vom alten system
    if( strcmp( key , tmpstring , true ) == 0)ammo[i-1] = strval(ini_GetValue( Data )); // das ist auch vom alten System

    Spoiler anzeigen
    new PassData[256]; // muss ich nichts zu sagen
    new keytmp[256]; // hier ebenso

    Hallöchen,
    ich habe da ein kleines Problem wie ihr der Überschrift schon entnehmen könnt.
    Es geht darum, sobald ich mich einlogge muss ich mich neu registrieren ..


    Ich glaube es hat mit folgendem zu tun.



    Function OnPlayerLogin(playerid,password[])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new PassData[256];
    new keytmp[256], valtmp[256];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = dini_Get(string2, "Key");
    if( strcmp( keytmp , "Key" , true ) == 0 )
    {
    valtmp = ini_GetValue( PassData );
    strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
    }
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
    new key[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data ); // Genau diese Zeile mein Ich
    dini_IntSet(Data, "Level", PlayerInfo[playerid][pLevel]);
    dini_IntSet(Data, "AdminLevel", PlayerInfo[playerid][pAdmin]);
    **** und so weiter ***



    Kann es and dieser Zeile Liegen ?


    Mfg Saphire

    Jeffry:


    Dankeschön erstmal, aber bei dem einen hat es nicht geklappt.



    dini_FloatSet(Data, "FightingStyle", PlayerInfo[playerid][SetPlayerFightingStyle(playerid,strval(val))]);



    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17236) : warning 213: tag mismatch


    vielleicht hab ich da ja mist gebaut, zuerst sah es so aus :



    if( strcmp( key , "FightingStyle" , true ) == 0 ) { val = ini_GetValue( Data ); SetPlayerFightingStyle(playerid,strval(val)); }


    Mfg Saphire

    Jeffry:


    Ich habe doch die Zeilen zu den Errors & Warnings gepostet.
    Also nochmal


    Das sind die Errors.

    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17236) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17254) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17255) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17265) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17266) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17267) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17306) : error 033: array
    must be indexed (variable "SpawnChange")
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17307) : error 033: array
    must be indexed (variable "WantedLevel")
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17308) : error 033: array
    must be indexed (variable "WantedPoints")
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17312) : error 033: array
    must be indexed (variable "OfflineFlucht")
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17313) : error 033: array
    must be indexed (variable "Knast")
    C:\Users\aimen\Desktop\Momento
    Roleplay - The Time Starts\gamemodes\MOR.pwn(17316) : error 033: array
    must be indexed (variable "KnastTime")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17330) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    und das sind die Zeile zu den Warnings und Errors (genau in der gleichen Reinfolge)



    dini_IntSet(Data, "FightingStyle", PlayerInfo[playerid][SetPlayerFightingStyle(playerid,strval(val))]);
    dini_IntSet(Data, "pSHealth", PlayerInfo[playerid][pSHealth]);
    dini_IntSet(Data, "pHealth", PlayerInfo[playerid][pHealth]);
    dini_IntSet(Data, "Pos_x", PlayerInfo[playerid][pPos_x]);
    dini_IntSet(Data, "Pos_y", PlayerInfo[playerid][pPos_y]);
    dini_IntSet(Data, "Pos_z", PlayerInfo[playerid][pPos_z]);
    dini_IntSet(Data, "SpawnChange", PlayerInfo[playerid][SpawnChange]);
    dini_IntSet(Data, "WantedLevel", PlayerInfo[playerid][WantedLevel]);
    dini_IntSet(Data, "WantedPoints", PlayerInfo[playerid][WantedPoints]);
    dini_IntSet(Data, "Offflucht", PlayerInfo[playerid][OfflineFlucht]);
    dini_IntSet(Data, "Knast", PlayerInfo[playerid][Knast]);
    dini_IntSet(Data, "KnastTime", PlayerInfo[playerid][KnastTime]);
    dini_IntSet(Data, "GWD", PlayerInfo[playerid][pGWD]);

    Hallöchen,


    wie ihr oben lesen könnt habe ich paar warnings und errors.


    Es geht um diese Zeilen.



    dini_IntSet(Data, "FightingStyle", PlayerInfo[playerid][SetPlayerFightingStyle(playerid,strval(val))]);
    dini_IntSet(Data, "pSHealth", PlayerInfo[playerid][pSHealth]);
    dini_IntSet(Data, "pHealth", PlayerInfo[playerid][pHealth]);
    dini_IntSet(Data, "Pos_x", PlayerInfo[playerid][pPos_x]);
    dini_IntSet(Data, "Pos_y", PlayerInfo[playerid][pPos_y]);
    dini_IntSet(Data, "Pos_z", PlayerInfo[playerid][pPos_z]);
    dini_IntSet(Data, "SpawnChange", PlayerInfo[playerid][SpawnChange]);
    dini_IntSet(Data, "WantedLevel", PlayerInfo[playerid][WantedLevel]);
    dini_IntSet(Data, "WantedPoints", PlayerInfo[playerid][WantedPoints]);
    dini_IntSet(Data, "Offflucht", PlayerInfo[playerid][OfflineFlucht]);
    dini_IntSet(Data, "Knast", PlayerInfo[playerid][Knast]);
    dini_IntSet(Data, "KnastTime", PlayerInfo[playerid][KnastTime]);
    dini_IntSet(Data, "GWD", PlayerInfo[playerid][pGWD]);


    das sind die Errors und warnings

    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17236) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17254) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17255) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17265) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17266) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17267) : warning 213: tag mismatch
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17306) : error 033: array must be indexed (variable "SpawnChange")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17307) : error 033: array must be indexed (variable "WantedLevel")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17308) : error 033: array must be indexed (variable "WantedPoints")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17312) : error 033: array must be indexed (variable "OfflineFlucht")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17313) : error 033: array must be indexed (variable "Knast")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17316) : error 033: array must be indexed (variable "KnastTime")
    C:\Users\aimen\Desktop\Momento Roleplay - The Time Starts\gamemodes\MOR.pwn(17330) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    und so sahen die Zeilen vorher aus :



    if( strcmp( key , "FightingStyle" , true ) == 0 ) { val = ini_GetValue( Data ); SetPlayerFightingStyle(playerid,strval(val)); }
    if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
    if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
    if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
    if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
    if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
    if( strcmp( key , "SpawnChange" , true ) == 0 ) { val = ini_GetValue( Data ); SpawnChange[playerid] = strval( val ); }
    if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); WantedLevel[playerid] = strval( val ); }
    if( strcmp( key , "WantedPoints" , true ) == 0 ) { val = ini_GetValue( Data ); WantedPoints[playerid] = strval( val ); }
    if( strcmp( key , "Offflucht" , true ) == 0 ) { val = ini_GetValue( Data ); OfflineFlucht[playerid] = strval( val ); }
    if( strcmp( key , "Knast" , true ) == 0 ) { val = ini_GetValue( Data ); Knast[playerid] = strval( val ); }
    if( strcmp( key , "KnastTime" , true ) == 0 ) { val = ini_GetValue( Data ); KnastTime[playerid] = strval( val ); }
    if( strcmp( key , "GWD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGWD] = floatstr( val ); }



    Kann mir jemand helfen ?


    Mfg

    Oke hab ich dann wohl falsch verstanden :D


    also hier


    Spoiler anzeigen


    if(dialogid == DIALOG_LOGIN)
    {
    if(response && strlen(inputtext) > 0)
    {
    OnPlayerLogin(playerid,inputtext);
    }
    else
    {
    Kick(playerid);
    }
    }


    Bestimmt brauchst du dann gleich das hier :D


    Spoiler anzeigen


    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
    new PassData[256];
    new keytmp[256], valtmp[256];
    fread( UserFile , PassData , sizeof( PassData ) );
    keytmp = ini_GetKey( PassData );
    if( strcmp( keytmp , "Key" , true ) == 0 )
    {
    valtmp = ini_GetValue( PassData );
    strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
    }
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
    ...
    ...
    ...
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"{A50000}Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
    fclose(UserFile);
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
    return 1;
    }

    Jeffry:


    Hier bitteschön


    Spoiler anzeigen


    Function OnPlayerRequestClass(playerid, classid)
    {
    new nam[MAX_PLAYER_NAME];
    new str[300];
    GetPlayerName(playerid, nam, sizeof(nam));
    format(str, sizeof(str),"{FFFFFF}Herzlich Willkommen auf Momento Roleplay - The Time Starts\nWir Freuen uns das du zu uns gejoint bist.\nDer Account Name{FF5A00} %s {FFFFFF}wurde in unserer Datenbank nicht gefunden.\nErstelle dir einfach einen Account damit du hier spielen kannst.", nam);
    new str2[150];
    format(str2, sizeof(str2),"{FFFFFF}|~~| Willkommen {FF5A00}%s {FFFFFF}|~~|\n\n|*| Schön das du wieder da bist |*| \n\n|~~| Gib dein Passwort ein um dich einzuloggen! |~~|", nam);
    if(IsPlayerNPC(playerid))
    {
    SpawnPlayer(playerid);
    return 1;
    }
    new timestamp = gettime();
    new Name[MAX_PLAYER_NAME];
    new file[128];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file,sizeof(file),"Accounts/%s.ini", Name);
    new bisgebannt = dini_Int(file,"TBan");
    if(timestamp < bisgebannt) //wenn der gerade genommene Timestamp kleiner als bisgebannt ist, liegt das entbannungsdatum in der Zukunft.
    {
    new differenz = bisgebannt - timestamp; //wir subtrahieren bisgebannt von timestamp, wir erhalten also die Zeit in Sekunden wie lange der Spieler noch gebannt ist.
    new minuten = differenz / 60; //wir machen aus den Sekunden Minuten....
    new vstr[64]; //neuer String wird deklariert....
    format(vstr,sizeof(vstr),"Du bist noch %i Minuten gebannt!",minuten); //So bekommt der Spieler sogar noch angezeigt, wie langer er noch genau gebannt ist.
    SendClientMessage(playerid,0xFAFAFAFF,vstr); //String wird dem Spieler ausgegeben
    KickTimer(playerid);//Kick erfolgt
    }
    else if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FFFF00}Login",str2,"Login","Abbrechen");
    }
    else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"{FFFF00}Account",str,"Erstellen","Abbrechen");
    }

    Spoiler anzeigen
    PlayerPlaySound(playerid, 1176, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];
    SetPlayerTeamFromClass(playerid,classid);
    SetupPlayerForClassSelection(playerid);
    return 1;
    }