Diese Meldung sehe ich nicht, nein ich habe keine mehrzeilige Meldung beim compilen.
Beiträge von Entire-Reallife
-
-
Tag zusammen :),
Ich konnte soeben rausfinden: der public PlayerCarConnect wird ja unter OnPlayerLogin aufgerufen, der Public OnPlayerLogin führt alles aus bis zum Code PlayerCarConnect.
Alle Codes etc. was nach PlayerCarConnect kommen werden nicht ausgeführt.OnPlayerLogin Public
C
Alles anzeigenpublic OnPlayerLogin(playerid,password[]) { RemoveBuildings(playerid);//Breadfish - Forum : hier startet er new tmp[256], string[450], sendername[MAX_PLAYER_NAME], Beschwerden = 0; //new LoginChecker; getdate(Jahr, Monat, Tag); gettime(Stunde, Minute, Sekunde); GetPlayerName(playerid, sendername, sizeof(sendername)); //Wir Speichern den Namen des Spielers in der Variable [i]SpielerInfo[playerid][pName][/i] if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))//Wir fragen ab ob der angegebene Spieler auch Online ist, und kein NPC ist (nur zur sicherhheit) { new pwhashlol[129], teststr[512]; mysql_real_escape_string(sendername, sendername); WP_Hash(pwhashlol,sizeof(pwhashlol),password); format(teststr, sizeof(teststr),"SELECT * FROM `users` WHERE Name = '%s' AND Password = '%s'", sendername,pwhashlol); self_mysql_queryEx(teststr);//wir holen uns alles aus der tabelle "tabelle_mit_den_haeusern" mysql_store_result();//speichern dann das ergebniss if(mysql_num_rows() == 0) { ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Revolution - Roleplay Community: Passwort Falsch", "Das eingegebene Passwort ist Falsch, bitte versuche es erneut.","Login","Verlassen"); return 1; } new val[ 256 ]; while(mysql_fetch_row_format(string,"|")) { self_mysql_get_field("Level", val); PlayerInfo[playerid][pLevel] = strval( val ); self_mysql_get_field("AdminLevel", val); PlayerInfo[playerid][pAdmin] = strval( val ); self_mysql_get_field("Rolex", val); PlayerInfo[playerid][pRolex] = strval( val ); self_mysql_get_field("Swissonic", val); PlayerInfo[playerid][pSwissonic] = strval( val ); self_mysql_get_field("Casio", val); PlayerInfo[playerid][pCasio] = strval( val ); self_mysql_get_field("Breitling", val); PlayerInfo[playerid][pBreitling] = strval( val ); self_mysql_get_field("Nixon", val); PlayerInfo[playerid][pNixon] = strval( val ); self_mysql_get_field("IceWatch", val); PlayerInfo[playerid][pIceWatch] = strval( val ); self_mysql_get_field("StartCoints", val); PlayerInfo[playerid][pStartCoints] = strval( val ); self_mysql_get_field("Coints", val); PlayerInfo[playerid][pCoints] = strval( val ); self_mysql_get_field("Spawnheal", val); PlayerInfo[playerid][pSpawnheal] = strval( val ); self_mysql_get_field("Deaglespawn", val); PlayerInfo[playerid][pDeaglespawn] = strval( val ); self_mysql_get_field("M4Spawn", val); PlayerInfo[playerid][pM4Spawn] = strval( val ); self_mysql_get_field("MP5Spawn", val); PlayerInfo[playerid][pMP5Spawn] = strval( val ); self_mysql_get_field("MehrZinsen", val); PlayerInfo[playerid][pMehrZinsen] = strval( val ); self_mysql_get_field("SpawnhealZeit", val); PlayerInfo[playerid][pSpawnhealZeit] = strval( val ); self_mysql_get_field("DeaglespawnZeit", val); PlayerInfo[playerid][pDeaglespawnZeit] = strval( val ); self_mysql_get_field("M4SpawnZeit", val); PlayerInfo[playerid][pM4SpawnZeit] = strval( val ); self_mysql_get_field("MP5SpawnZeit", val); PlayerInfo[playerid][pMP5SpawnZeit] = strval( val ); self_mysql_get_field("MehrZinsenZeit", val); PlayerInfo[playerid][pMehrZinsenZeit] = strval( val ); self_mysql_get_field("Medickit", val); PlayerInfo[playerid][pMedickit] = strval( val ); self_mysql_get_field("Startbonus", val); PlayerInfo[playerid][pStartbonus] = strval ( val ); self_mysql_get_field("Kreditkarte", val); PlayerInfo[playerid][pKreditkarte] = strval( val ); self_mysql_get_field("KreditkarteBenutzung", val); PlayerInfo[playerid][pKreditkartebenutzen] = strval( val ); self_mysql_get_field("Personalausweis",val); PlayerInfo[playerid][pPersonalausweis] = strval ( val ); self_mysql_get_field("Namechange", val); PlayerInfo[playerid][pSchongeandert] = strval( val ); self_mysql_get_field("krankenkasse", val); PlayerInfo[playerid][pKrankenkasse] = strval( val ); self_mysql_get_field("krankenzeit", val); PlayerInfo[playerid][pKrankenkasseTime] = strval( val ); self_mysql_get_field("DonateRank", val); PlayerInfo[playerid][pDonatorRank] = strval( val ); self_mysql_get_field("UpgradePoints", val); PlayerInfo[playerid][gPupgrade] = strval( val ); self_mysql_get_field("ConnectedTime", val); PlayerInfo[playerid][pConnectTime] = strval( val ); self_mysql_get_field("Registered", val); PlayerInfo[playerid][pReg] = strval( val ); self_mysql_get_field("Sex", val); PlayerInfo[playerid][pSex] = strval( val ); self_mysql_get_field("Age", val); PlayerInfo[playerid][pAlter] = strval( val ); self_mysql_get_field("Origin", val); PlayerInfo[playerid][pOrigin] = strval( val ); self_mysql_get_field("Muted", val); PlayerInfo[playerid][pMuted] = strval( val ); self_mysql_get_field("Respect", val); PlayerInfo[playerid][pRespekt] = strval( val ); self_mysql_get_field("Gehalt",val); PlayerInfo[playerid][pGehalt] = strval( val ); self_mysql_get_field("Money", val); PlayerInfo[playerid][pCash] = strval( val ); self_mysql_get_field("Bank", val); PlayerInfo[playerid][pBank] = strval( val ); self_mysql_get_field("Allowed", val); PlayerInfo[playerid][pAllowed] = strval( val ); self_mysql_get_field("Crimes", val); PlayerInfo[playerid][pCrimes] = strval( val ); self_mysql_get_field("Kills", val); PlayerInfo[playerid][pKills] = strval( val ); self_mysql_get_field("sKills", val); PlayerInfo[playerid][psKills] = strval( val ); self_mysql_get_field("Deaths", val); PlayerInfo[playerid][pDeaths] = strval( val ); self_mysql_get_field("Arrested", val); PlayerInfo[playerid][pArrested] = strval( val ); self_mysql_get_field("ArrestTime", val); PlayerInfo[playerid][pArrestTime] = strval( val ); self_mysql_get_field("PhoneBook", val); PlayerInfo[playerid][pPhoneBook] = strval( val ); self_mysql_get_field("LottoNr", val); PlayerInfo[playerid][pLottoNr] = strval( val ); self_mysql_get_field("Fishes", val); PlayerInfo[playerid][pFishes] = strval( val ); self_mysql_get_field("BiggestFish", val); PlayerInfo[playerid][pBiggestFish] = strval( val ); self_mysql_get_field("Job", val); PlayerInfo[playerid][pJob] = strval( val ); self_mysql_get_field("Paycheck", val); PlayerInfo[playerid][pPayCheck] = strval( val ); self_mysql_get_field("HeadValue", val); PlayerInfo[playerid][pHeadValue] = strval( val ); self_mysql_get_field("Jailed", val); PlayerInfo[playerid][pJailed] = strval( val ); self_mysql_get_field("JailTime", val); PlayerInfo[playerid][pJailTime] = strval( val ); self_mysql_get_field("Leader", val); PlayerInfo[playerid][pLeader] = strval( val ); self_mysql_get_field("Member", val); PlayerInfo[playerid][pMember] = strval( val ); self_mysql_get_field("Rank", val); PlayerInfo[playerid][pRank] = strval( val ); self_mysql_get_field("Skin", val); PlayerInfo[playerid][pChar] = strval( val ); self_mysql_get_field("Vertragszeit", val); PlayerInfo[playerid][pVertragszeit] = strval( val ); self_mysql_get_field("DetSkill", val); PlayerInfo[playerid][pDetSkill] = strval( val ); self_mysql_get_field("SexSkill", val); PlayerInfo[playerid][pSexSkill] = strval( val ); self_mysql_get_field("LawSkill", val); PlayerInfo[playerid][pAnwaltSkill] = strval( val ); self_mysql_get_field("MechSkill", val); PlayerInfo[playerid][pMechSkill] = strval( val ); self_mysql_get_field("JackSkill", val); PlayerInfo[playerid][pJackSkill] = strval( val ); self_mysql_get_field("CarSkill", val); PlayerInfo[playerid][pCarSkill] = strval( val ); self_mysql_get_field("NewsSkill", val); PlayerInfo[playerid][pNewsSkill] = strval( val ); self_mysql_get_field("DrugsSkill", val); PlayerInfo[playerid][pDrugsSkill] = strval( val ); self_mysql_get_field("CookSkill", val); PlayerInfo[playerid][pCookSkill] = strval( val ); self_mysql_get_field("FishSkill", val); PlayerInfo[playerid][pFishSkill] = strval( val ); self_mysql_get_field("pSHealth", val); PlayerInfo[playerid][pSHealth] = floatstr( val ); self_mysql_get_field("PhoneNr", val); PlayerInfo[playerid][pNummer] = strval( val ); self_mysql_get_field("House", val); PlayerInfo[playerid][pPhousekey] = strval( val ); self_mysql_get_field("Hotel",val); PlayerInfo[playerid][pPhotelkey] = strval( val ); self_mysql_get_field("Biz", val); PlayerInfo[playerid][pBizKey] = strval( val ); self_mysql_get_field("CarLic", val); PlayerInfo[playerid][pCarLic] = strval( val ); self_mysql_get_field("FlyLic", val); PlayerInfo[playerid][pFlyLic] = strval( val ); self_mysql_get_field("BoatLic", val); PlayerInfo[playerid][pBoatLic] = strval( val ); self_mysql_get_field("FishLic", val); PlayerInfo[playerid][pFishLic] = strval( val ); self_mysql_get_field("GunLic", val); PlayerInfo[playerid][pGunLic] = strval( val ); self_mysql_get_field("Zollpass", val); PlayerInfo[playerid][pZollpass] = strval( val ); self_mysql_get_field("Gun1", val); PlayerInfo[playerid][pGun1] = strval( val ); self_mysql_get_field("Gun2", val); PlayerInfo[playerid][pGun2] = strval( val ); self_mysql_get_field("Gun3", val); PlayerInfo[playerid][pGun3] = strval( val ); self_mysql_get_field("Gun4", val); PlayerInfo[playerid][pGun4] = strval( val ); self_mysql_get_field("Ammo1", val); PlayerInfo[playerid][pAmmo1] = strval( val ); self_mysql_get_field("Ammo2", val); PlayerInfo[playerid][pAmmo2] = strval( val ); self_mysql_get_field("Ammo3", val); PlayerInfo[playerid][pAmmo3] = strval( val ); self_mysql_get_field("Ammo4", val); PlayerInfo[playerid][pAmmo4] = strval( val ); self_mysql_get_field("CarTime", val); PlayerInfo[playerid][pCarTime] = strval( val ); self_mysql_get_field("PayDay", val); PlayerInfo[playerid][pPayDay] = strval( val ); self_mysql_get_field("PayDayHad", val); PlayerInfo[playerid][pPayDayHad] = strval( val ); self_mysql_get_field("CDPlayer", val); PlayerInfo[playerid][pCDPlayer] = strval( val ); self_mysql_get_field("AlcoholPerk", val); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); self_mysql_get_field("DrugPerk", val); PlayerInfo[playerid][pDrugPerk] = strval( val ); self_mysql_get_field("MiserPerk", val); PlayerInfo[playerid][pMiserPerk] = strval( val ); self_mysql_get_field("TraderPerk", val); PlayerInfo[playerid][pTraderPerk] = strval( val ); self_mysql_get_field("PainKillerPerk", val); PlayerInfo[playerid][pPainKillerPerk] = strval( val ); self_mysql_get_field("Tutorial", val); PlayerInfo[playerid][pTut] = strval( val ); self_mysql_get_field("Warnings", val); PlayerInfo[playerid][pWarns] = strval( val ); self_mysql_get_field("Fuel", val); PlayerInfo[playerid][pFuel] = strval( val ); self_mysql_get_field("Married", val); PlayerInfo[playerid][pMarried] = strval( val ); self_mysql_get_field("MarriedTo", val); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val), 255); self_mysql_get_field("WantedLevel", val); PlayerInfo[playerid][pWantedLevel] = strval( val ); self_mysql_get_field("Spawn", val); PlayerInfo[playerid][pSpawn] = strval( val ); self_mysql_get_field("SavedMaterials", val); PlayerInfo[playerid][pSaveMats] = strval( val ); self_mysql_get_field("SavedDrugs", val); PlayerInfo[playerid][pSaveDrugs] = strval( val ); self_mysql_get_field("SaveCodes", val); PlayerInfo[playerid][pSaveCodes] = strval( val ); self_mysql_get_field("BikeLic", val); PlayerInfo[playerid][pBikeLic] = strval( val ); self_mysql_get_field("LKWLic", val); PlayerInfo[playerid][pLKWLic] = strval( val ); self_mysql_get_field("DonatorTime", val); PlayerInfo[playerid][pDonatorZeit] = strval( val ); self_mysql_get_field("WerberName", val); strmid(PlayerInfo[playerid][pWerberName], val, 0, strlen(val), 255); self_mysql_get_field("FightingStyle", val); PlayerInfo[playerid][pFightingStyle] = strval( val ); self_mysql_get_field("Handy", val); PlayerInfo[playerid][pHandy] = strval( val ); self_mysql_get_field("OnDutySkin", val); PlayerInfo[playerid][pOnDutySkin] = strval( val ); self_mysql_get_field("CarLicPoints", val); PlayerInfo[playerid][pCarLicPoints] = strval( val ); self_mysql_get_field("BikeLicPoints", val); PlayerInfo[playerid][pBikeLicPoints] = strval( val ); self_mysql_get_field("InviteSperre", val); PlayerInfo[playerid][pInviteSperre] = strval( val ); self_mysql_get_field("warntime1", val); PlayerInfo[playerid][pWarnTime1] = strval( val ); self_mysql_get_field("warntime2", val); PlayerInfo[playerid][pWarnTime2] = strval( val ); self_mysql_get_field("Ticketsopen", val); PlayerInfo[playerid][pTicketsopen] = strval( val ); self_mysql_get_field("OldName", val); strmid(PlayerInfo[playerid][pOldName], val, 0, strlen(val), 255); self_mysql_get_field("OrgMember", val); PlayerInfo[playerid][pOrgaID] = strval( val ); self_mysql_get_field("OrgLeader", val); PlayerInfo[playerid][pOrgaLeader] = strval( val ); self_mysql_get_field("OrgManager", val); PlayerInfo[playerid][pOrgaManager] = strval ( val ); self_mysql_get_field("OrgName", val); strmid(PlayerInfo[playerid][pOrgaName], val, 0, strlen(val), 255); self_mysql_get_field("SQLid", val); PlayerInfo[playerid][pSQLID] = strval( val ); self_mysql_get_field("OPBeschwerden", val); Beschwerden = strval( val ); mysql_free_result(); } } if(PlayerInfo[playerid][pAdmin] >= 2001) { SendClientMessage(playerid,COLOR_RED,"Du hast dich über Adminlevel 2001 eingelogt und wurdest aus sicherheitsgründen gekickt!"); SetTimerEx("ConnectKick", 2000,0,"i",playerid); return 1; } new DeleteDate, Days; DeleteDate = Days+Time(); format(string, sizeof(string), "UPDATE `users` SET `DeleteDatum`='%d', `LastLoginDatum`='%d' WHERE `Name`='%s'", DeleteDate, gettime(), sendername); self_mysql_queryEx(string); ResetPlayerWeapon(playerid); if(PlayerInfo[playerid][pDonatorRank] == 2) { MaxVeh[playerid] = 3; if(PlayerInfo[playerid][pDonatorZeit] < 10) { PlayerInfo[playerid][pDonatorRank] = 1; } } else if(PlayerInfo[playerid][pDonatorRank] == 1) { MaxVeh[playerid] = 2; } else { MaxVeh[playerid] = 1; } ResetPlayerMoney(playerid); GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]); if(PlayerInfo[playerid][pMarried] == 0) { ClearMarriage(playerid); } if(PlayerInfo[playerid][pOrigin] == 0) { PlayerInfo[playerid][pOrigin] = 1; } if(PlayerInfo[playerid][pReg] == 0) { new Skin1 = random(11); if(Skin1 == 1) { PlayerInfo[playerid][pChar] = 78; } if(Skin1 == 2) { PlayerInfo[playerid][pChar] = 79; } if(Skin1 == 3) { PlayerInfo[playerid][pChar] = 77; } if(Skin1 == 4) { PlayerInfo[playerid][pChar] = 134; } if(Skin1 == 5) { PlayerInfo[playerid][pChar] = 135; } if(Skin1 == 6) { PlayerInfo[playerid][pChar] = 159; } if(Skin1 == 7) { PlayerInfo[playerid][pChar] = 162; } if(Skin1 == 8) { PlayerInfo[playerid][pChar] = 168; } if(Skin1 == 9) { PlayerInfo[playerid][pChar] = 200; } if(Skin1 == 10) { PlayerInfo[playerid][pChar] = 212; } if(Skin1 == 11) { PlayerInfo[playerid][pChar] = 213; } PlayerInfo[playerid][pReg] = 1; PlayerInfo[playerid][pAlter] = 0; PlayerInfo[playerid][pTut] = 0; PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pSHealth] = 50.0; StuffInfo[sLastNumber] += 1; PlayerInfo[playerid][pNummer] = StuffInfo[sLastNumber]; PlayerInfo[playerid][pPhousekey] = -1; PlayerInfo[playerid][pBizKey] = -1; PlayerInfo[playerid][pBank] = 0; GivePlayerMoneys(playerid, 4000); PlayerInfo[playerid][pCrimes] = 0; PlayerInfo[playerid][pArrested] = 0; PlayerInfo[playerid][pArrestTime] = 0; PlayerInfo[playerid][pKills] = 0; PlayerInfo[playerid][psKills] = 0; PlayerInfo[playerid][pDeaths] = 0; PlayerInfo[playerid][pMember] = -1; PlayerInfo[playerid][pLeader] = -1; PlayerInfo[playerid][pOnDutySkin] = 60; /*Scheine*/ PlayerInfo[playerid][pGunLic] = 0; PlayerInfo[playerid][pFlyLic] = 0; PlayerInfo[playerid][pCarLic] = 0; PlayerInfo[playerid][pBikeLic] = 0; /*Scheine Ende*/ PlayerUpdate(playerid); } if(PlayerInfo[playerid][pLeader] != -1) { PlayerInfo[playerid][pTeam] = PlayerInfo[playerid][pLeader]; } else if(PlayerInfo[playerid][pMember] != -1) { PlayerInfo[playerid][pTeam] = PlayerInfo[playerid][pMember]; } new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "UPDATE `users` SET `Status`='1' WHERE `Name`='%s'", sendername); self_mysql_queryEx(string); format(string, sizeof(string), "UPDATE `users` SET `Legende`='1' WHERE SQLid = '%d'", PlayerInfo[playerid][pSQLID]); self_mysql_queryEx(string); new hwd[256]; gpci(playerid, hwd, sizeof hwd); format(string, sizeof(string), "UPDATE `users` SET `HardwareID`='%s' WHERE `Name`='%s'", hwd,sendername); self_mysql_queryEx(string); SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); PlayerCarConnect(playerid); // Hier stoppt der Public und der Code danach wird nicht mehr ausgeführt. SpawnPlayer(playerid); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); SendClientMessage(playerid, COLOR_GREY," "); format(string, sizeof(string), "SERVER: Willkommen %s",sendername); SendClientMessage(playerid, COLOR_WHITE, string); if(PlayerInfo[playerid][pTut] == 1) { for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++) { RemovePlayerAttachedObject(playerid, i); } } TogglePlayerSpectating(playerid,false); KillTimer(LoginTimer[playerid]); LoginTimer[playerid] = -1; SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); strmid(PlayerInfo[playerid][pForceName], "Niemand", 0, strlen("Niemand"), 255); CheckTime(playerid); PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0); SetPVarInt(playerid, "PVTeam", PlayerInfo[playerid][pTeam]); SetPVarInt(playerid, "PVAdmin", PlayerInfo[playerid][pAdmin]); SetPVarInt(playerid, "PVJob", PlayerInfo[playerid][pJob]); LoadUberweisungen(playerid); printf("%s hat sich eingeloggt. [ID: %d]",sendername,playerid); format(string,sizeof(string),"AdmCmd: Spieler %s hat sich mit der IP: %s eingeloggt!",sendername,PlayerInfo[playerid][pUserIP]); EnterToLog("Login",string); if(PlayerInfo[playerid][pDonatorRank] == 1) { SendClientMessage(playerid, COLOR_WHITE,"SERVER: Du hast einen Premiumaccount. Vielen Dank, dass du unseren Server unterstützt."); } if(PlayerInfo[playerid][pDonatorRank] == 2) { SendClientMessage(playerid, COLOR_WHITE,"SERVER: Du hast einen Spendenaccount(Donator). Vielen Dank, dass du unseren Server unterstützt."); format(string, sizeof(string), "UPDATE `users` SET `Legende`='2' WHERE SQLid = '%d'", PlayerInfo[playerid][pSQLID]); self_mysql_queryEx(string); } if(PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "SERVER: Du hast dich als Adminlevel %d eingeloggt.", PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_WHITE, string); new Legende; if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] <= 2) { Legende = 4; } if(PlayerInfo[playerid][pAdmin] >= 3 && PlayerInfo[playerid][pAdmin] <= 4) { Legende = 5; } if(PlayerInfo[playerid][pAdmin] >= 5 && PlayerInfo[playerid][pAdmin] <= 8) { Legende = 6; } if(PlayerInfo[playerid][pAdmin] >= 1338) { Legende = 7; } format(string, sizeof(string), "UPDATE `users` SET `Legende`='%d' WHERE `SQLid`='%d'", Legende, PlayerInfo[playerid][pSQLID]); self_mysql_queryEx(string); } /*if(!NameValidator(playerid)){ SendClientMessage(playerid,COLOR_WHITE,"{A80000}SERVER{FFFFFF}: Wenn du möchtest kannst du deinen namen in ein Roleplaynamen ändern mit /Changename. Achtung dies geht nur einmal."); }*/ format(string, sizeof(string), " %s [ID: %d] hat den Server betreten.",sendername, playerid); ForAllPlayers(i){ if(IsPlayerConnected(i)){ if(TogLoginLogout[i] == 0){ SendClientMessage(i, COLOR_LIGHTGREEN, string); //Connect message }}} if(PlayerInfo[playerid][pChar] != -1) { new UseSkin = PlayerInfo[playerid][pChar]; SetSpawnInfo(playerid, 0, UseSkin,0.0,0.0,0.0,0,0,0,0,0,0,0); } TextDrawHideForPlayer(playerid, Text:NODMZoneTextdraw); MedicBill[playerid] = 0; FirstSpawnAfterLogin[playerid] = 1; DateProp(playerid); format(tmp, sizeof(tmp), "~w~Willkommen ~n~~y~%s", sendername); GameTextForPlayer(playerid, tmp, 5000, 1); Logintime[playerid] = 1; gPlayerLogged[playerid] = 1; StuffInfo[sLoggins] += 1; start_screen{playerid} = false; SetCameraBehindPlayer(playerid); if(AdminIPClose == 0 || TogAdminMessage[playerid] == 0) { format(string, sizeof(string), "AdmCmd: Spieler %s hat sich mit der IP: %s eingeloggt!",sendername,PlayerInfo[playerid][pUserIP]); SendAdminMessage(COLOR_LIGHTRED, 1, string); } if(PlayerInfo[playerid][pStartbonus] == 0) { SendClientMessage(playerid,COLOR_YELLOW,"Du hast deinen Startbonus noch nicht abgeholt. Du kannst ihn per /startbonus am Spawn abholen."); } if(Beschwerden >= 1) { format(string, sizeof(string), "Du hast %d ungelesene(n) Beschwerde(n) im Control Pannel.", Beschwerden); SendClientMessage(playerid, COLOR_YELLOW, string); } if(PlayerInfo[playerid][pStartCoints] == 0) { SendClientMessage(playerid,COLOR_YELLOW,"Du hast dein einmaliges Start-Coint Paket erhalten, dir wurden (20) Coins auf deinem Account gutgeschrieben."); SendClientMessage(playerid,COLOR_YELLOW,"Weitere Informationen über unser Coint-System findest du unter www.Revolution-Roleplay.com"); PlayerInfo[playerid][pStartCoints] = 1; PlayerInfo[playerid][pCoints] += 20; } if(PlayerInfo[playerid][pWarns] > 0){ format(string, sizeof(string), "Achtung: Du hast schon %d von 3 Verwarnungen. Bei 3 Verwarnungen wirst du gebannt.", PlayerInfo[playerid][pWarns]); SendClientMessage(playerid, COLOR_RED, string); } if(PlayerInfo[playerid][pTut] == 1) { SpawnPlayer(playerid); } if(PlayerInfo[playerid][pTut] == 0 && PlayerInfo[playerid][pConnectTime] == 0) { gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1; TogglePlayerControllable(playerid, 0); RegistrationStep[playerid] = 1; PlayerInfo[playerid][pLocal] = -1; for(new i=0; i<10; i++) SendClientMessage(playerid,COLOR_YELLOW,""); SendClientMessage(playerid,COLOR_YELLOW,"Willkommen auf Revolution - Roleplay, bitte fülle die Fragen aus, um fortzufahren."); //ShowPlayerDialog(playerid, Geschlechtauswahl, DIALOG_STYLE_LIST, "Geschlecht", "Männlich\nWeiblich", "Auswählen", "Verlassen"); ShowPlayerDialog(playerid,1321,DIALOG_STYLE_INPUT,"User Werben User System","Von wem wurdest du geworben? Bitte gib den vollständigen Spielernamen ein.\n(Falls von niemanden, gib ""Niemand"" ein)","Weiter","Verlassen"); SetPlayerPos(playerid,440.8212,-20.1240,1001.1328); SetPlayerInterior(playerid,1); SetPlayerCameraPos(playerid,440.7491,-16.6782,1000.9297+1); SetPlayerCameraLookAt(playerid,440.8212,-20.1240,1001.1328); SetPlayerSkin(playerid,101); StopAudioStreamForPlayer(playerid); SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); return 1; } return 1; }
fakt ist es muss an PlayerCarConnect liegen.
-
So ich erläutere es nochmal,
Problem ist: Mein Account connectet, bis ich mich nicht einlogge ist alles gut, sobald ich mein richtiges passwort im Login Menu eingebe um ein Schritt weiter zu
gelangen steh ich in der Luft und bin nicht eingeloggt. Wenn ich ein Befehl ausführen möchte steht dran du bist nicht eingeloggt.
Beim Connecten bzw. Login wird der public PlayerCarConnect aufgerufen.
Sobald ich diesen public ausklammer und den Server starte und mich dann einlogge, funktioniert alles !
Somit kann es doch nur daran liegen.C
Alles anzeigenpublic PlayerCarConnect(playerid) { if(IsPlayerNPC(playerid)) { return 1; } new string[128], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); for(new h = 0; h < MaxVeh[playerid]; h++) { if(SaveServerMySQL==0) { format(string, sizeof(string), "cars/%dAutoNR%d.ini", PlayerInfo[playerid][pSQLID], h); if(fexist(string)) { new data[256]; data = dini_Get(string,"AH_Typ"); Carlist[playerid][h][Typ] = strval( data ); data = dini_Get(string,"AH_X"); Carlist[playerid][h][pos_x] = floatstr( data ); data = dini_Get(string,"AH_Y"); Carlist[playerid][h][pos_y] = floatstr( data ); data = dini_Get(string,"AH_Z"); Carlist[playerid][h][pos_z] = floatstr( data ); data = dini_Get(string,"AH_Rot"); Carlist[playerid][h][z_angle] = floatstr( data ); data = dini_Get(string,"AH_Status"); Carlist[playerid][h][Status] = strval( data ); data = dini_Get(string,"AH_Lock"); Carlist[playerid][h][Lock] = strval( data ); data = dini_Get(string,"AH_Paintjob"); Carlist[playerid][h][Paintjob] = strval( data ); data = dini_Get(string,"AH_Farbe1"); Carlist[playerid][h][Farbe1] = strval( data ); data = dini_Get(string,"AH_Farbe2"); Carlist[playerid][h][Farbe2] = strval( data ); data = dini_Get(string,"AH_mod1"); Carlist[playerid][h][mod1] = strval( data ); data = dini_Get(string,"AH_mod2"); Carlist[playerid][h][mod2] = strval( data ); data = dini_Get(string,"AH_mod3"); Carlist[playerid][h][mod3] = strval( data ); data = dini_Get(string,"AH_mod4"); Carlist[playerid][h][mod4] = strval( data ); data = dini_Get(string,"AH_mod5"); Carlist[playerid][h][mod5] = strval( data ); data = dini_Get(string,"AH_mod6"); Carlist[playerid][h][mod6] = strval( data ); data = dini_Get(string,"AH_mod7"); Carlist[playerid][h][mod7] = strval( data ); data = dini_Get(string,"AH_mod8"); Carlist[playerid][h][mod8] = strval( data ); data = dini_Get(string,"AH_mod9"); Carlist[playerid][h][mod9] = strval( data ); data = dini_Get(string,"AH_mod10"); Carlist[playerid][h][mod10] = strval( data ); data = dini_Get(string,"AH_mod11"); Carlist[playerid][h][mod11] = strval( data ); data = dini_Get(string,"AH_mod12"); Carlist[playerid][h][mod12] = strval( data ); data = dini_Get(string,"AH_mod13"); Carlist[playerid][h][mod13] = strval( data ); data = dini_Get(string,"AH_mod14"); Carlist[playerid][h][mod14] = strval( data ); data = dini_Get(string,"AH_mod15"); Carlist[playerid][h][mod15] = strval( data ); data = dini_Get(string,"AH_mod16"); Carlist[playerid][h][mod16] = strval( data ); data = dini_Get(string,"AH_mod17"); Carlist[playerid][h][mod17] = strval( data ); data = dini_Get(string,"AH_SpawnSaveX"); Carlist[playerid][h][SpawnSaveX] = floatstr( data ); data = dini_Get(string,"AH_SpawnSaveY"); Carlist[playerid][h][SpawnSaveY] = floatstr( data ); data = dini_Get(string,"AH_SpawnSaveZ"); Carlist[playerid][h][SpawnSaveZ] = floatstr( data ); data = dini_Get(string,"AH_SpawnSaveRot"); Carlist[playerid][h][SpawnSaveRot] = floatstr( data ); data = dini_Get(string,"AH_TankVolumen"); Carlist[playerid][h][TankVolumen] = strval( data ); data = dini_Get(string,"AH_RepairTime"); Carlist[playerid][h][RepairTime] = strval(data); data = dini_Get(string,"AH_Versicherung"); Carlist[playerid][h][Versicherung] = strval(data); data = dini_Get(string,"AH_StandTime"); Carlist[playerid][h][StandTime] = strval(data); data = dini_Get(string,"AH_Meter"); Carlist[playerid][h][Meter] = strval(data); } } else { format(string, sizeof(string),"SELECT * FROM `usercars` WHERE `Name` = '%dAutoNR%d'",PlayerInfo[playerid][pSQLID], h); self_mysql_queryEx(string); mysql_store_result(MySQLConnection); if(mysql_num_rows(MySQLConnection) != 0) { mysql_fetch_row_format(string); new val[ 256 ]; self_mysql_get_field("AH_Typ", val); Carlist[playerid][h][Typ] = strval( val ); self_mysql_get_field("AH_X", val); Carlist[playerid][h][pos_x] = floatstr( val ); self_mysql_get_field("AH_Y", val); Carlist[playerid][h][pos_y] = floatstr( val ); self_mysql_get_field("AH_Z", val); Carlist[playerid][h][pos_z] = floatstr( val ); self_mysql_get_field("AH_Rot", val); Carlist[playerid][h][z_angle] = floatstr( val ); self_mysql_get_field("AH_Status", val); Carlist[playerid][h][Status] = strval( val ); self_mysql_get_field("AH_Lock", val); Carlist[playerid][h][Lock] = strval( val ); self_mysql_get_field("AH_Paintjob", val); Carlist[playerid][h][Paintjob] = strval( val ); self_mysql_get_field("AH_Farbe1", val); Carlist[playerid][h][Farbe1] = strval( val ); self_mysql_get_field("AH_Farbe2", val); Carlist[playerid][h][Farbe2] = strval( val ); self_mysql_get_field("AH_mod1", val); Carlist[playerid][h][mod1] = strval( val ); self_mysql_get_field("AH_mod2", val); Carlist[playerid][h][mod2] = strval( val ); self_mysql_get_field("AH_mod3", val); Carlist[playerid][h][mod3] = strval( val ); self_mysql_get_field("AH_mod4", val); Carlist[playerid][h][mod4] = strval( val ); self_mysql_get_field("AH_mod5", val); Carlist[playerid][h][mod5] = strval( val ); self_mysql_get_field("AH_mod6", val); Carlist[playerid][h][mod6] = strval( val ); self_mysql_get_field("AH_mod7", val); Carlist[playerid][h][mod7] = strval( val ); self_mysql_get_field("AH_mod8", val); Carlist[playerid][h][mod8] = strval( val ); self_mysql_get_field("AH_mod9", val); Carlist[playerid][h][mod9] = strval( val ); self_mysql_get_field("AH_mod10", val); Carlist[playerid][h][mod10] = strval( val ); self_mysql_get_field("AH_mod11", val); Carlist[playerid][h][mod11] = strval( val ); self_mysql_get_field("AH_mod12", val); Carlist[playerid][h][mod12] = strval( val ); self_mysql_get_field("AH_mod13", val); Carlist[playerid][h][mod13] = strval( val ); self_mysql_get_field("AH_mod14", val); Carlist[playerid][h][mod14] = strval( val ); self_mysql_get_field("AH_mod15", val); Carlist[playerid][h][mod15] = strval( val ); self_mysql_get_field("AH_mod16", val); Carlist[playerid][h][mod16] = strval( val ); self_mysql_get_field("AH_mod17", val); Carlist[playerid][h][mod17] = strval( val ); self_mysql_get_field("AH_SpawnSaveX", val); Carlist[playerid][h][SpawnSaveX] = floatstr( val ); self_mysql_get_field("AH_SpawnSaveY", val); Carlist[playerid][h][SpawnSaveY] = floatstr( val ); self_mysql_get_field("AH_SpawnSaveZ", val); Carlist[playerid][h][SpawnSaveZ] = floatstr( val ); self_mysql_get_field("AH_SpawnSaveRot", val); Carlist[playerid][h][SpawnSaveRot] = floatstr( val ); self_mysql_get_field("AH_TankVolumen", val); Carlist[playerid][h][TankVolumen] = strval( val ); self_mysql_get_field("AH_RepairTime", val); Carlist[playerid][h][RepairTime] = strval( val ); self_mysql_get_field("AH_Versicherung", val); Carlist[playerid][h][Versicherung] = strval( val ); self_mysql_get_field("AH_StandTime", val); Carlist[playerid][h][StandTime] = strval( val ); self_mysql_get_field("AH_Meter", val); Carlist[playerid][h][Meter] = strval( val ); } mysql_free_result(MySQLConnection); } if(Carlist[playerid][h][Typ] != -1 && Carlist[playerid][h][Status] == 0){ printf("Fahrzeugspeicherung: Beginning Spawn."); Carlist[playerid][h][Carid] = CreateTunedCar(playerid, h); printf("Fahrzeugspeicherung: End Spawn."); } } return 1; }
//edit Dazu muss man noch sagen, das die SQLID des Autos mit dem Spieler übereinstimmt, das heißt es wird geladen.
C
Alles anzeigen[02:23:04] CMySQLHandler::FetchRow() - Return: 111AutoNR0|10|739.7|-1343.8|15.1|270.1|0|0|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|739.7|-1343.8|15.2|270|100|0|0|0|0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Typ") - 10 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_X") - 739.7 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Y") - -1343.8 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Z") - 15.1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Rot") - 270.1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Status") - 0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Lock") - 0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Paintjob") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Farbe1") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Farbe2") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod1") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod2") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod3") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod4") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod5") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod6") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod7") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod8") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod9") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod10") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod11") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod12") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod13") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod14") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod15") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod16") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_mod17") - -1 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_SpawnSaveX") - 739.7 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_SpawnSaveY") - -1343.8 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_SpawnSaveZ") - 15.2 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_SpawnSaveRot") - 270 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_TankVolumen") - 100 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_RepairTime") - 0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Versicherung") - 0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_StandTime") - 0 [02:23:04] >> mysql_fetch_field_row( Connection handle: 1 ) [02:23:04] CMySQLHandler::FetchField("AH_Meter") - 0 [02:23:04] >> mysql_free_result( Connection handle: 1 ) [02:23:04] CMySQLHandler::FreeResult() - Result was successfully free'd.
-
Immer noch das ganze
[23:58:20] Fahrzeugspeicherung: Beginning Spawn.
[23:58:20] Fahrzeugspeicherung: End Spawn.
[23:58:20] [debug] Server crashed while executing revolution.amx
[23:58:20] [debug] AMX backtrace:
[23:58:20] [debug] #0 00000039 in ?? (48, 124, 48, 124, 48, 124, 48, 0, 52, 68, ... <21 arguments>) from revolution.amx
[23:58:20] [debug] #1 00000039 in public OnDialogResponse () from revolution.amx/edit: print von PlayerCarConnect vorhanden.
-
[23:36:44] [debug] Server crashed while executing revolution.amx
[23:36:44] [debug] AMX backtrace:
[23:36:44] [debug] #0 00000039 in ?? (48, 124, 48, 124, 48, 124, 48, 0, 52, 68, ... <21 arguments>) from revolution.amx
[23:36:44] [debug] #1 00000039 in public OnDialogResponse () from revolution.amxes kommt nichts anderes mehr außer das.
-
Nach dem Ich mir ein Car gekauft habe und reloggen wollte konnte ich feststellen das dieses Speichert.
Nun hab ich ein neues Problem nach dem Relog bekomm ich ein Art Spawnbug und aufeinmal
schmiert der Server ab.Code
Alles anzeigenServerLog [23:34:56] [debug] Server crashed while executing revolution.amx [23:34:56] [debug] AMX backtrace: [23:34:56] [debug] #0 00000039 in public OnDialogResponse () from revolution.a MySQL Log [23:34:56] CMySQLHandler::Query(SELECT * FROM `usercars` WHERE `Name` = '111AutoNR0') - Successfully executed. [23:34:56] >> mysql_store_result( Connection handle: 1 ) [23:34:56] CMySQLHandler::StoreResult() - Result was stored. [23:34:56] >> mysql_num_rows( Connection handle: 1 ) [23:34:56] CMySQLHandler::NumRows() - Returned 1 row(s) [23:34:56] >> mysql_fetch_row_format( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchRow() - Return: 111AutoNR0|10|820.4|-1349.4|13.2|45.8|0|0|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|-1|820.4|-1349.4|13.2|45.8|99|0|0|0|0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Typ") - 10 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_X") - 820.4 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Y") - -1349.4 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Z") - 13.2 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Rot") - 45.8 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Status") - 0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Lock") - 0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Paintjob") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Farbe1") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Farbe2") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod1") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod2") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod3") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod4") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod5") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod6") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod7") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod8") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod9") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod10") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod11") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod12") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod13") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod14") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod15") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod16") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_mod17") - -1 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_SpawnSaveX") - 820.4 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_SpawnSaveY") - -1349.4 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_SpawnSaveZ") - 13.2 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_SpawnSaveRot") - 45.8 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_TankVolumen") - 99 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_RepairTime") - 0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Versicherung") - 0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_StandTime") - 0 [23:34:56] >> mysql_fetch_field_row( Connection handle: 1 ) [23:34:56] CMySQLHandler::FetchField("AH_Meter") - 0 [23:34:56] >> mysql_free_result( Connection handle: 1 ) [23:34:56] CMySQLHandler::FreeResult() - Result was successfully free'd.
//edit Server schmiert nur ab wenn der connectet der online ist.
hier nochmal der Lade public und der Save public
Der wird beim connecten aufgerufen also ist er für das laden zuständig
public PlayerCarConnect(playerid)
{
if(IsPlayerNPC(playerid))
{
return 1;
}
new string[128],
playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
for(new h = 0; h < MaxVeh[playerid]; h++)
{
if(SaveServerMySQL==0)
{
format(string, sizeof(string), "cars/%dAutoNR%d.ini", PlayerInfo[playerid][pSQLID], h);
if(fexist(string))
{
new data[256];
data = dini_Get(string,"AH_Typ"); Carlist[playerid][h][Typ] = strval( data );
data = dini_Get(string,"AH_X"); Carlist[playerid][h][pos_x] = floatstr( data );
data = dini_Get(string,"AH_Y"); Carlist[playerid][h][pos_y] = floatstr( data );
data = dini_Get(string,"AH_Z"); Carlist[playerid][h][pos_z] = floatstr( data );
data = dini_Get(string,"AH_Rot"); Carlist[playerid][h][z_angle] = floatstr( data );
data = dini_Get(string,"AH_Status"); Carlist[playerid][h][Status] = strval( data );
data = dini_Get(string,"AH_Lock"); Carlist[playerid][h][Lock] = strval( data );
data = dini_Get(string,"AH_Paintjob"); Carlist[playerid][h][Paintjob] = strval( data );
data = dini_Get(string,"AH_Farbe1"); Carlist[playerid][h][Farbe1] = strval( data );
data = dini_Get(string,"AH_Farbe2"); Carlist[playerid][h][Farbe2] = strval( data );
data = dini_Get(string,"AH_mod1"); Carlist[playerid][h][mod1] = strval( data );
data = dini_Get(string,"AH_mod2"); Carlist[playerid][h][mod2] = strval( data );
data = dini_Get(string,"AH_mod3"); Carlist[playerid][h][mod3] = strval( data );
data = dini_Get(string,"AH_mod4"); Carlist[playerid][h][mod4] = strval( data );
data = dini_Get(string,"AH_mod5"); Carlist[playerid][h][mod5] = strval( data );
data = dini_Get(string,"AH_mod6"); Carlist[playerid][h][mod6] = strval( data );
data = dini_Get(string,"AH_mod7"); Carlist[playerid][h][mod7] = strval( data );
data = dini_Get(string,"AH_mod8"); Carlist[playerid][h][mod8] = strval( data );
data = dini_Get(string,"AH_mod9"); Carlist[playerid][h][mod9] = strval( data );
data = dini_Get(string,"AH_mod10"); Carlist[playerid][h][mod10] = strval( data );
data = dini_Get(string,"AH_mod11"); Carlist[playerid][h][mod11] = strval( data );
data = dini_Get(string,"AH_mod12"); Carlist[playerid][h][mod12] = strval( data );
data = dini_Get(string,"AH_mod13"); Carlist[playerid][h][mod13] = strval( data );
data = dini_Get(string,"AH_mod14"); Carlist[playerid][h][mod14] = strval( data );
data = dini_Get(string,"AH_mod15"); Carlist[playerid][h][mod15] = strval( data );
data = dini_Get(string,"AH_mod16"); Carlist[playerid][h][mod16] = strval( data );
data = dini_Get(string,"AH_mod17"); Carlist[playerid][h][mod17] = strval( data );
data = dini_Get(string,"AH_SpawnSaveX"); Carlist[playerid][h][SpawnSaveX] = floatstr( data );
data = dini_Get(string,"AH_SpawnSaveY"); Carlist[playerid][h][SpawnSaveY] = floatstr( data );
data = dini_Get(string,"AH_SpawnSaveZ"); Carlist[playerid][h][SpawnSaveZ] = floatstr( data );
data = dini_Get(string,"AH_SpawnSaveRot"); Carlist[playerid][h][SpawnSaveRot] = floatstr( data );
data = dini_Get(string,"AH_TankVolumen"); Carlist[playerid][h][TankVolumen] = strval( data );
data = dini_Get(string,"AH_RepairTime"); Carlist[playerid][h][RepairTime] = strval(data);
data = dini_Get(string,"AH_Versicherung"); Carlist[playerid][h][Versicherung] = strval(data);
data = dini_Get(string,"AH_StandTime"); Carlist[playerid][h][StandTime] = strval(data);
data = dini_Get(string,"AH_Meter"); Carlist[playerid][h][Meter] = strval(data);
}
}
else
{
format(string, sizeof(string),"SELECT * FROM `usercars` WHERE `Name` = '%dAutoNR%d'",PlayerInfo[playerid][pSQLID], h);
self_mysql_queryEx(string);
mysql_store_result(MySQLConnection);
if(mysql_num_rows(MySQLConnection) != 0)
{
mysql_fetch_row_format(string);
new val[ 256 ];
self_mysql_get_field("AH_Typ", val); Carlist[playerid][h][Typ] = strval( val );
self_mysql_get_field("AH_X", val); Carlist[playerid][h][pos_x] = floatstr( val );
self_mysql_get_field("AH_Y", val); Carlist[playerid][h][pos_y] = floatstr( val );
self_mysql_get_field("AH_Z", val); Carlist[playerid][h][pos_z] = floatstr( val );
self_mysql_get_field("AH_Rot", val); Carlist[playerid][h][z_angle] = floatstr( val );
self_mysql_get_field("AH_Status", val); Carlist[playerid][h][Status] = strval( val );
self_mysql_get_field("AH_Lock", val); Carlist[playerid][h][Lock] = strval( val );
self_mysql_get_field("AH_Paintjob", val); Carlist[playerid][h][Paintjob] = strval( val );
self_mysql_get_field("AH_Farbe1", val); Carlist[playerid][h][Farbe1] = strval( val );
self_mysql_get_field("AH_Farbe2", val); Carlist[playerid][h][Farbe2] = strval( val );
self_mysql_get_field("AH_mod1", val); Carlist[playerid][h][mod1] = strval( val );
self_mysql_get_field("AH_mod2", val); Carlist[playerid][h][mod2] = strval( val );
self_mysql_get_field("AH_mod3", val); Carlist[playerid][h][mod3] = strval( val );
self_mysql_get_field("AH_mod4", val); Carlist[playerid][h][mod4] = strval( val );
self_mysql_get_field("AH_mod5", val); Carlist[playerid][h][mod5] = strval( val );
self_mysql_get_field("AH_mod6", val); Carlist[playerid][h][mod6] = strval( val );
self_mysql_get_field("AH_mod7", val); Carlist[playerid][h][mod7] = strval( val );
self_mysql_get_field("AH_mod8", val); Carlist[playerid][h][mod8] = strval( val );
self_mysql_get_field("AH_mod9", val); Carlist[playerid][h][mod9] = strval( val );
self_mysql_get_field("AH_mod10", val); Carlist[playerid][h][mod10] = strval( val );
self_mysql_get_field("AH_mod11", val); Carlist[playerid][h][mod11] = strval( val );
self_mysql_get_field("AH_mod12", val); Carlist[playerid][h][mod12] = strval( val );
self_mysql_get_field("AH_mod13", val); Carlist[playerid][h][mod13] = strval( val );
self_mysql_get_field("AH_mod14", val); Carlist[playerid][h][mod14] = strval( val );
self_mysql_get_field("AH_mod15", val); Carlist[playerid][h][mod15] = strval( val );
self_mysql_get_field("AH_mod16", val); Carlist[playerid][h][mod16] = strval( val );
self_mysql_get_field("AH_mod17", val); Carlist[playerid][h][mod17] = strval( val );
self_mysql_get_field("AH_SpawnSaveX", val); Carlist[playerid][h][SpawnSaveX] = floatstr( val );
self_mysql_get_field("AH_SpawnSaveY", val); Carlist[playerid][h][SpawnSaveY] = floatstr( val );
self_mysql_get_field("AH_SpawnSaveZ", val); Carlist[playerid][h][SpawnSaveZ] = floatstr( val );
self_mysql_get_field("AH_SpawnSaveRot", val); Carlist[playerid][h][SpawnSaveRot] = floatstr( val );
self_mysql_get_field("AH_TankVolumen", val); Carlist[playerid][h][TankVolumen] = strval( val );
self_mysql_get_field("AH_RepairTime", val); Carlist[playerid][h][RepairTime] = strval( val );
self_mysql_get_field("AH_Versicherung", val); Carlist[playerid][h][Versicherung] = strval( val );
self_mysql_get_field("AH_StandTime", val); Carlist[playerid][h][StandTime] = strval( val );
self_mysql_get_field("AH_Meter", val); Carlist[playerid][h][Meter] = strval( val );
}
mysql_free_result(MySQLConnection);
}
if(Carlist[playerid][h][Typ] != -1 && Carlist[playerid][h][Status] == 0){
printf("Fahrzeugspeicherung: Beginning Spawn.");
Carlist[playerid][h][Carid] = CreateTunedCar(playerid, h);
printf("Fahrzeugspeicherung: End Spawn.");
}
}
return 1;
} -
Nun kommt dieser Fehler in der Log:
C[23:10:33] >> mysql_query( Connection handle: 1 ) [23:10:33] CMySQLHandler::Query(INSERT INTO `usercars` (`Name`, `AH_Typ`, `AH_X`, `AH_Y`, `AH_Z`, `AH_Rot`, `AH_Status`, `AH_Lock`, `AH_Paintjob`, `AH_Farbe1`, `AH_Farbe2`, `AH_mod1`, `AH_mod2`, `AH_mod3`, `AH_mod4`, `AH_mod5`, `AH_mod6`, `AH_mod7`, `AH_mod8`, `AH_mod9`, `AH_mod10`, `AH_mod11`, `AH_mod12`, `AH_mod13`, `AH_mod14`, `AH_mod15`, `AH_mod16`, `AH_mod17`, `AH_SpawnSaveX`, `AH_SpawnSaveY`, `AH_SpawnSaveZ`, `AH_SpawnSaveRot`, `AH_TankVolumen`, `AH_RepairTime`, `AH_Versicherung`, `AH_StandTime`, `AH_Meter`) VALUES ('111AutoNR0', '10', '739.7', '-1343.8', '15.1', '270.1', '0', '0', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '739.7', '-1343.8', '15.1', '270.1', '100', '0', '0', '0', '0')) - An error has occured. (Error ID: 1136, Column count doesn't match value count at row 1) [23:10:33] OnQueryError() - Called.
-
So ich hab nun format genommen, es speichert nichts.
C[21:37:28] >> mysql_query( Connection handle: 1 ) [21:37:28] CMySQLHandler::Query(INSERT INTO `usercars` (`Name`, `AH_Typ`, `AH_X`, `AH_Y`, `AH_Z`, `AH_Rot`, `AH_Status`, `AH_Lock`, `AH_Paintjob`, `AH_Farbe1`, `AH_Farbe2`, `AH_mod1`, `AH_mod2`, `AH_mod3`, `AH_mod4`, `AH_mod5`, `AH_mod6`, `AH_mod7`, `AH_mod8`, `AH_mod9`, `AH_mod10`, `AH_mod11`, `AH_mod12`, `AH_mod13`, `AH_mod14`, `AH_mod15`, `AH_mod16`, `AH_mod17`, `AH_SpawnSaveX`, `AH_SpawnSaveY`, `AH_SpawnSaveZ`, `AH_SpawnSaveRot`, `AH_TankVolumen`, `AH_RepairTime`, `AH_Versicherung`, `AH_StandTime`, `AH_Meter`) VALUES ('111AutoNR0', '39', '0.0', '0.0', '739.7', '-1343.8', '1097963930', '1132924109', '0', '0', '-1', '-1', '-1', '-1', '-1', ��������ݚΤ, ��������ۍd)) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ڽۍd, ��������ۍd)' at line 1) [21:37:28] OnQueryError() - Called.
Neuer Syntax Error
-
Abend :),
Ich habe folgendes Problem die Speicherung funktioniert nicht, und hab jetzt momentan Errors. Die Frage ist wie man den public gestalten kann.
Derzeitiger Error ist mysql_format weil der Code nicht vorhanden ist.
Dieser Public wird beim Kauf aufgerufen um die jeweiligen Werte in Spalten zu schreiben und vorallem eine Spalte zu erstellen.C
Alles anzeigenforward createcarupdate(playerid,chid); public createcarupdate(playerid,chid) { new var[2000],formi[50],formi2[200],formi3[200],formi4[200],formi5[200]; mysql_format(MySQL_Connection,formi2,200,"`AH_SpawnSaveX`, `AH_SpawnSaveY`, `AH_SpawnSaveZ`, `AH_SpawnSaveRot`, `AH_TankVolumen`, `AH_RepairTime`, `AH_Versicherung`, `AH_StandTime`, `AH_Meter`"); mysql_format(MySQL_Connection,formi3,200,"`AH_mod5`, AH_mod6`, AH_mod7`, `AH_mod8`, `AH_mod9`, `AH_mod10`, `AH_mod11`, `AH_mod12`, `AH_mod13`, `AH_mod14`, `AH_mod15`, `AH_mod16`, `AH_mod17`"); mysql_format(MySQL_Connection,formi4,200,"'%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'", Carlist[playerid][chid][mod5],Carlist[playerid][chid][mod6],Carlist[playerid][chid][mod7],Carlist[playerid][chid][mod8],Carlist[playerid][chid][mod9],Carlist[playerid][chid][mod10],Carlist[playerid][chid][mod11],Carlist[playerid][chid][mod12],Carlist[playerid][chid][mod13], Carlist[playerid][chid][mod14],Carlist[playerid][chid][mod15],Carlist[playerid][chid][mod16],Carlist[playerid][chid][mod17]); mysql_format(MySQL_Connection,formi5,200,"'%.1f', '%.1f', '%.1f', '%.1f', '%d', '%d', '%d', '%d', '%d'", Carlist[playerid][chid][SpawnSaveX],Carlist[playerid][chid][SpawnSaveY],Carlist[playerid][chid][SpawnSaveZ],Carlist[playerid][chid][SpawnSaveRot], Carlist[playerid][chid][TankVolumen],Carlist[playerid][chid][RepairTime],Carlist[playerid][chid][Versicherung],Carlist[playerid][chid][StandTime],Carlist[playerid][chid][Meter]); mysql_format(MySQL_Connection,formi,50,"%dAutoNR%d",PlayerInfo[playerid][pSQLID],chid); format(var, sizeof(var), "INSERT INTO `usercars` (`Name`, `AH_Typ`, `AH_X`, `AH_Y`, `AH_Z`, `AH_Rot`, `AH_Status`, `AH_Lock`, `AH_Paintjob`, `AH_Farbe1`, `AH_Farbe2`, `AH_mod1`, `AH_mod2`, `AH_mod3`, `AH_mod4`, %s, %s) VALUES ('%s', '%d', '%.1f', '%.1f', '%.1f', '%.1f', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', %s, %s)", formi3,formi2,formi,formi4,formi5,Carlist[playerid][chid][Typ],Carlist[playerid][chid][pos_x],Carlist[playerid][chid][pos_y],Carlist[playerid][chid][pos_z],Carlist[playerid][chid][z_angle],Carlist[playerid][chid][Status],Carlist[playerid][chid][Lock],Carlist[playerid][chid][Paintjob], Carlist[playerid][chid][Farbe1],Carlist[playerid][chid][Farbe2],Carlist[playerid][chid][mod1],Carlist[playerid][chid][mod2],Carlist[playerid][chid][mod3],Carlist[playerid][chid][mod4]); self_mysql_queryEx(var); }
Hier werden die Spalten editiert/updatet.C
Alles anzeigenpublic PlayerCarUpdate(playerid) { if(IsPlayerNPC(playerid)) { return 1; } new string[256], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); for(new h = 0; h < MaxVeh[playerid]; h++) { if(SaveServerMySQL==0) { format(string, sizeof(string), "cars/%dAutoNR%d.ini", PlayerInfo[playerid][pSQLID], h); new File: CarFile = fopen(string, io_write); if (CarFile) { new var[256]; format(var, 256, "AH_Typ=%d\n", Carlist[playerid][h][Typ]); fwrite(CarFile, var); format(var, 256, "AH_X=%.1f\n", Carlist[playerid][h][pos_x]); fwrite(CarFile, var); format(var, 256, "AH_Y=%.1f\n", Carlist[playerid][h][pos_y]); fwrite(CarFile, var); format(var, 256, "AH_Z=%.1f\n", Carlist[playerid][h][pos_z]); fwrite(CarFile, var); format(var, 256, "AH_Rot=%.1f\n", Carlist[playerid][h][z_angle]); fwrite(CarFile, var); format(var, 256, "AH_Status=%d\n", Carlist[playerid][h][Status]); fwrite(CarFile, var); format(var, 256, "AH_Lock=%d\n", Carlist[playerid][h][Lock]); fwrite(CarFile, var); format(var, 256, "AH_Paintjob=%d\n", Carlist[playerid][h][Paintjob]); fwrite(CarFile, var); format(var, 256, "AH_Farbe1=%d\n", Carlist[playerid][h][Farbe1]); fwrite(CarFile, var); format(var, 256, "AH_Farbe2=%d\n", Carlist[playerid][h][Farbe2]); fwrite(CarFile, var); format(var, 256, "AH_mod1=%d\n", Carlist[playerid][h][mod1]); fwrite(CarFile, var); format(var, 256, "AH_mod2=%d\n", Carlist[playerid][h][mod2]); fwrite(CarFile, var); format(var, 256, "AH_mod3=%d\n", Carlist[playerid][h][mod3]); fwrite(CarFile, var); format(var, 256, "AH_mod4=%d\n", Carlist[playerid][h][mod4]); fwrite(CarFile, var); format(var, 256, "AH_mod5=%d\n", Carlist[playerid][h][mod5]); fwrite(CarFile, var); format(var, 256, "AH_mod6=%d\n", Carlist[playerid][h][mod6]); fwrite(CarFile, var); format(var, 256, "AH_mod7=%d\n", Carlist[playerid][h][mod7]); fwrite(CarFile, var); format(var, 256, "AH_mod8=%d\n", Carlist[playerid][h][mod8]); fwrite(CarFile, var); format(var, 256, "AH_mod9=%d\n", Carlist[playerid][h][mod9]); fwrite(CarFile, var); format(var, 256, "AH_mod10=%d\n", Carlist[playerid][h][mod10]); fwrite(CarFile, var); format(var, 256, "AH_mod11=%d\n", Carlist[playerid][h][mod11]); fwrite(CarFile, var); format(var, 256, "AH_mod12=%d\n", Carlist[playerid][h][mod12]); fwrite(CarFile, var); format(var, 256, "AH_mod13=%d\n", Carlist[playerid][h][mod13]); fwrite(CarFile, var); format(var, 256, "AH_mod14=%d\n", Carlist[playerid][h][mod14]); fwrite(CarFile, var); format(var, 256, "AH_mod15=%d\n", Carlist[playerid][h][mod15]); fwrite(CarFile, var); format(var, 256, "AH_mod16=%d\n", Carlist[playerid][h][mod16]); fwrite(CarFile, var); format(var, 256, "AH_mod17=%d\n", Carlist[playerid][h][mod17]); fwrite(CarFile, var); format(var, 256, "AH_SpawnSaveX=%.1f\n", Carlist[playerid][h][SpawnSaveX]); fwrite(CarFile, var); format(var, 256, "AH_SpawnSaveY=%.1f\n", Carlist[playerid][h][SpawnSaveY]); fwrite(CarFile, var); format(var, 256, "AH_SpawnSaveZ=%.1f\n", Carlist[playerid][h][SpawnSaveZ]); fwrite(CarFile, var); format(var, 256, "AH_SpawnSaveRot=%.1f\n", Carlist[playerid][h][SpawnSaveRot]); fwrite(CarFile, var); format(var, 256, "AH_TankVolumen=%d\n", Carlist[playerid][h][TankVolumen]); fwrite(CarFile, var); format(var, 256, "AH_RepairTime=%d\n", Carlist[playerid][h][RepairTime]); fwrite(CarFile, var); format(var, 256, "AH_Versicherung=%d\n", Carlist[playerid][h][Versicherung]); fwrite(CarFile, var); format(var, 256, "AH_StandTime=%d\n", Carlist[playerid][h][StandTime]); fwrite(CarFile, var); format(var, 256, "AH_Meter=%d\n", Carlist[playerid][h][Meter]); fwrite(CarFile, var); fclose(CarFile); } } else { if(Carlist[playerid][h][Typ]>=1) { new var[1000]; format(var, sizeof(var), "UPDATE `usercars` SET `AH_Typ`='%d', `AH_X`='%.1f', `AH_Y`='%.1f', `AH_Z`='%.1f', `AH_Rot`='%.1f', `AH_Status`='%d', `AH_Lock`='%d', `AH_Paintjob`='%d', `AH_Farbe1`='%d', `AH_Farbe2`='%d', `AH_mod1`='%d', `AH_mod2`='%d', `AH_mod3`='%d', `AH_mod4`='%d' WHERE `Name`='%dAutoNR%d'", Carlist[playerid][h][Typ],Carlist[playerid][h][pos_x],Carlist[playerid][h][pos_y],Carlist[playerid][h][pos_z],Carlist[playerid][h][z_angle],Carlist[playerid][h][Status],Carlist[playerid][h][Lock],Carlist[playerid][h][Paintjob], Carlist[playerid][h][Farbe1],Carlist[playerid][h][Farbe2],Carlist[playerid][h][mod1],Carlist[playerid][h][mod2],Carlist[playerid][h][mod3],Carlist[playerid][h][mod4],PlayerInfo[playerid][pSQLID],h); self_mysql_queryEx(var); format(var, sizeof(var), "UPDATE `usercars` SET `AH_mod5`='%d', AH_mod6`='%d', AH_mod7`='%d', `AH_mod8`='%d', `AH_mod9`='%d', `AH_mod10`='%d', `AH_mod11`='%d', `AH_mod12`='%d', `AH_mod13`='%d', `AH_mod14`='%d', `AH_mod15`='%d', `AH_mod16`='%d', `AH_mod17`='%d' WHERE `Name`='%dAutoNR%d'", Carlist[playerid][h][mod5],Carlist[playerid][h][mod6], Carlist[playerid][h][mod7],Carlist[playerid][h][mod8],Carlist[playerid][h][mod9],Carlist[playerid][h][mod10],Carlist[playerid][h][mod11],Carlist[playerid][h][mod12],Carlist[playerid][h][mod13], Carlist[playerid][h][mod14],Carlist[playerid][h][mod15],Carlist[playerid][h][mod16],Carlist[playerid][h][mod17],PlayerInfo[playerid][pSQLID],h); self_mysql_queryEx(var); format(var, sizeof(var), "UPDATE `usercars` SET `AH_SpawnSaveX`='%.1f', `AH_SpawnSaveY`='%.1f', `AH_SpawnSaveZ`='%.1f', `AH_SpawnSaveRot`='%.1f', `AH_TankVolumen`='%d', `AH_RepairTime`='%d', `AH_Versicherung`='%d', `AH_StandTime`='%d', `AH_Meter`='%d' WHERE `Name`='%dAutoNR%d'", Carlist[playerid][h][SpawnSaveX],Carlist[playerid][h][SpawnSaveY],Carlist[playerid][h][SpawnSaveZ],Carlist[playerid][h][SpawnSaveRot], Carlist[playerid][h][TankVolumen],Carlist[playerid][h][RepairTime],Carlist[playerid][h][Versicherung],Carlist[playerid][h][StandTime],Carlist[playerid][h][Meter],PlayerInfo[playerid][pSQLID], h); self_mysql_queryEx(var); } } } return 1; }
@Jeffry
Freue mich auf eure Hilfe -
Guten Abend,
leider kenne ich mich nicht besonderst mit MySQL aus jedoch kann ich sagen das nichts davon richtig funktionieren kann.
Ich habe in der MySQL Datenbank bereits die Struktur erstellt bzw. sie war vorhanden.C
Alles anzeigenpublic LoadGangAutos() { if(SaveServerMySQL == 1) { new arrCoords[14][64]; new strFromFile2[256]; new File: file = fopen("Configs/cars.cfg", io_read); if (file) { new idx; while (idx < sizeof(GangAutoInfo)){ fread(file, strFromFile2); split(strFromFile2, arrCoords, '|'); GangAutoInfo[idx][cID] = strval(arrCoords[0]); GangAutoInfo[idx][cOwner] = strval(arrCoords[1]); GangAutoInfo[idx][cTyp] = strval(arrCoords[2]); GangAutoInfo[idx][cPosX] = floatstr(arrCoords[3]); GangAutoInfo[idx][cPosY] = floatstr(arrCoords[4]); GangAutoInfo[idx][cPosZ] = floatstr(arrCoords[5]); GangAutoInfo[idx][cRot] = floatstr(arrCoords[6]); GangAutoInfo[idx][cColor1] = strval(arrCoords[7]); GangAutoInfo[idx][cColor2] = strval(arrCoords[8]); GangAutoInfo[idx][cStatus] = strval(arrCoords[9]); GangAutoInfo[idx][cTank] = strval(arrCoords[10]); GangAutoInfo[idx][cReSpawnTime] = strval(arrCoords[11]); GangAutoInfo[idx][cStandTime] = strval(arrCoords[12]); GangAutoInfo[idx][cMeter] = strval(arrCoords[13]); if(GangAutoInfo[idx][cStandTime] == 0) { GangAutoInfo[idx][cStandTime] = Time(); } idx++; } fclose(file); } } else { new string[128]; for(new i = 0; i < sizeof(GangAutoInfo); i++) { format(string, sizeof(string),"SELECT * FROM `gangautos` WHERE `SlotID` = '%d'", i); self_mysql_queryEx(string); mysql_store_result(MySQLConnection); if(mysql_num_rows(MySQLConnection) != 0) { mysql_fetch_row_format(string); new val[ 256 ]; self_mysql_get_field("CarID", val); GangAutoInfo[i][cID] = strval( val ); self_mysql_get_field("OwnerID", val); GangAutoInfo[i][cOwner] = strval( val ); self_mysql_get_field("TypID", val); GangAutoInfo[i][cTyp] = strval( val ); self_mysql_get_field("PosX", val); GangAutoInfo[i][cPosX] = floatstr( val ); self_mysql_get_field("PosY", val); GangAutoInfo[i][cPosY] = floatstr( val ); self_mysql_get_field("PosZ", val); GangAutoInfo[i][cPosZ] = floatstr( val ); self_mysql_get_field("Rotation", val); GangAutoInfo[i][cRot] = floatstr( val ); self_mysql_get_field("Farbe1", val); GangAutoInfo[i][cColor1] = strval( val ); self_mysql_get_field("Farbe2", val); GangAutoInfo[i][cColor2] = strval( val ); self_mysql_get_field("Status", val); GangAutoInfo[i][cStatus] = strval( val ); self_mysql_get_field("Tank", val); GangAutoInfo[i][cTank] = strval( val ); self_mysql_get_field("ReSpawnTime", val); GangAutoInfo[i][cReSpawnTime] = strval( val ); //self_mysql_get_field("StandTime", val); GangAutoInfo[i][cStandTime] = strval( val ); } else { GangAutoInfo[i][cID] = -1; GangAutoInfo[i][cOwner] = -1; GangAutoInfo[i][cTyp] = -1; GangAutoInfo[i][cPosX] = 0; GangAutoInfo[i][cPosY] = 0; GangAutoInfo[i][cPosZ] = 0; GangAutoInfo[i][cRot] = 0; GangAutoInfo[i][cColor1] = -1; GangAutoInfo[i][cColor2] = -1; GangAutoInfo[i][cStatus] = -1; GangAutoInfo[i][cTank] = 50; GangAutoInfo[i][cReSpawnTime] = 1800; GangAutoInfo[i][cStandTime] = 0; } mysql_free_result(MySQLConnection); if(GangAutoInfo[i][cID] == 65535) { GangAutoInfo[i][cID] = -1; } } } return 1; } public SaveGangAutos() { new idx; new File: file2; idx = 0; while (idx < sizeof(GangAutoInfo)) { if(TankSave == 1) { if(GangAutoInfo[idx][cID] != -1) { GangAutoInfo[idx][cTank] = Gas[GangAutoInfo[idx][cID]]; } } new coordsstring[128]; format(coordsstring, sizeof(coordsstring), "%d|%d|%d|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d\n", GangAutoInfo[idx][cID], GangAutoInfo[idx][cOwner], GangAutoInfo[idx][cTyp], GangAutoInfo[idx][cPosX], GangAutoInfo[idx][cPosY], GangAutoInfo[idx][cPosZ], GangAutoInfo[idx][cRot], GangAutoInfo[idx][cColor1], GangAutoInfo[idx][cColor2], GangAutoInfo[idx][cStatus], GangAutoInfo[idx][cTank], GangAutoInfo[idx][cReSpawnTime], GangAutoInfo[idx][cStandTime], GangAutoInfo[idx][cMeter]); if(idx == 0) { file2 = fopen("Configs/cars.cfg", io_write); } else { file2 = fopen("Configs/cars.cfg", io_append); } fwrite(file2, coordsstring); idx++; fclose(file2); } print("GangAutos Geladen"); }
Könnte mir jemand behilflich sein die beiden Publics umzuändern ?
Gern auch mit Gegenleistung.Mit freundlichen Grüßen
-
Danke dir !
Hat geklappt. -
C
Alles anzeigenif(dialogid == DIALOG_ORGINVITE) { if(response) { if(PlayerInfo[playerid][pOrgaLeader] != -1 || PlayerInfo[playerid][pOrgaManager] != -1) { new sendername[MAX_PLAYER_NAME]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pOrgaID] == -1 && PlayerInfo[giveplayerid][pOrgaLeader] == -1) { new OrgTeam; OrgTeam = PlayerInfo[playerid][pOrgaID]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s hat dir eine Einladung gesendet der Organisation %s beizutreten. (Benutze /accept orginvite um zu akzeptieren)", sendername, PlayerInfo[playerid][pOrgaName]); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Du hast eine Einladung an %s gesendet.", giveplayerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); InviteOrgOffer[giveplayerid] = playerid; InviteOrgTeam[giveplayerid] = OrgTeam; return 1; } else { SendClientMessage(playerid, COLOR_BENUTZETEXT, "Dieser Spieler ist bereits in einer Organisation."); return 1; } } else { SendClientMessage(playerid, COLOR_BENUTZETEXT, "Dieser Spieler ist Offline"); return 1; } } else { SendClientMessage(playerid, COLOR_BENUTZETEXT, "Du bist nicht Leader oder Manager der Organisation."); return 1; } } return 1; }
Meine Frage ist wie ich den Namen den ich im Dialog eingegeben hab hier wieder Ausgeben kann.
Das ganze funktioniert nämlich nicht weil kein Name ausgegebn wird.Aufrufen tu ich das ganze so.
-
Abend der Timer führt irgendwie nicht aus.
Code
Alles anzeigenif(strcmp(cmdtext,"/pizza", true) == 0) { if(PlayerInfo[playerid][pJob] == 11) { if(PizzaDuty[playerid] == 1) { if(IsPlayerInRangeOfPoint(playerid,3.0,379.8357,-116.4166,1001.4922)) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CARRY); SetPlayerAttachedObject(playerid,1,1582,1, 0.027000, 0.534999, -0.034000, 177.600036, -92.599975, -0.399998, 1.000000, 1.000000, 1.000000); TogglePlayerControllable(playerid, 0); GameTextForPlayer(playerid, "~g~Bitte Warten ...", 2000, 3); SetTimer("Pizzageben2",1000,0); return 1; } } else { SendClientMessage(playerid,COLOR_ERRORTEXT,"Du musst OnDuty sein"); } } else { SendClientMessage(playerid,COLOR_ERRORTEXT,"Du bist kein Pizzabote"); } return 1; }
-
funktioniert danke dir.
-
Guten Abend,
So meine Frage ist wie ich ein Object an einem Auto attache. Ich habe 4 Autos im Script angegeben.
C
Alles anzeigennew PizzaCars[4]; forward IsAPizzaboteCar(carid); public IsAPizzaboteCar(carid) { for(new h = 0; h < sizeof(PizzaCars); h++){ if(carid == PizzaCars[h]){ return 1; } } return 0; } if(IsAPizzaboteCar(vid)){ if(PlayerInfo[playerid][pJob] == 11 && Pizzabote[playerid] == 1){} else{ SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist kein Pizzabote oder nicht im Dienst!"); return 1; }}
So das funktioniert auch alles, nun würde ich gern ein Schritt weitergehen und das Object
An folgenden Coordinaten des Vehicles attachen.
Das heißt sobald der Server starten sollen die 4 Autos (PizzaCars) spawnen mit dem Object jedoch attached.
MFG
Revolution Roleplay -
Ich möchte ja jetzt das die 4 Autos das Object attachted bekommen.
Cnew PizzaCars[4] PizzaCars[0] = CreateVehicle(589,2120.4277,-1781.7482,13.0476,62.4001,3,3,1000); PizzaCars[1] = CreateVehicle(589,2121.1704,-1777.0662,13.0500,60.7576,3,3,1000); PizzaCars[2] = CreateVehicle(589,2121.3147,-1772.1978,13.0522,59.5473,3,3,1000); PizzaCars[3] = CreateVehicle(589,2121.4348,-1767.4741,13.0536,61.8373,3,3,1000);
-
C
public CreateObjectOnPizzaCar(vehicleid) { new pizzaobject = CreateObject(1582,0,0,0,0,0,0,100.0); AttachObjectToVehicle(pizzaobject,PizzaCars,1582, 0, -0.5, 1.38, 90, 90, 0); return 1; }
error 035: argument type mismatch (argument 2)
Warum erkennt er die Variable "PizzaCars" nicht ? obwohl ich sie im Script doch bereits angegeben hab ?
-
Wie attachte ich Objecte an Autos, sie sollen ab den Serverstart für immer dran bleiben.
Das sind meine attache Coordinaten
Die Variable für meine Cars lautet
-
Ich hab nur die eine Kettensege mit Dildo gesehen gibts die auch ohne Dildo ?
-
Tag,
Ich suche ein Object das einen Bohrer ähnlich sieht, ich möchte dieses object dann an die Zellen tür createn.