Hey,
keine Fehler mehr.
Bekomme den Register-Dialog, gebe ein PW ein und erhalte den Login-Dialog welcher sagt das Passwort sei falsch.
PUBLIC:OnPlayerLogin(playerid)
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdmin] = 2000;
TextDrawShowForPlayer(playerid, UhrzeitStundeMinute);
TextDrawShowForPlayer(playerid, DatumTagMonat);
CancelSelectTextDraw(playerid);
StopAudioStreamForPlayer(playerid);
new string[1500],
sendername[MAX_PLAYER_NAME];
//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]
new status[256];
format(status, sizeof(status), "UPDATE `users` SET `Status`='1' WHERE `Name`='%s'", sendername);
mysql_query(status);
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))//Wir fragen ab ob der angegebene Spieler auch Online ist, und kein NPC ist (nur zur sicherhheit)
{
format(string, sizeof(string),"SELECT * FROM `users` WHERE `Name` = '%s' LIMIT 1;", sendername);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows() >= 1)
{
new val[256];
mysql_fetch_row(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("Checkpoint", val); CCP[playerid] = strval( val );
self_mysql_get_field("CPrison", val); xPrison[playerid] = strval( val );
self_mysql_get_field("RunningCP", val); RunningCP[playerid] = strval( val );
self_mysql_get_field("BNDRadar", val); BNDRadar[playerid] = strval( val );
self_mysql_get_field("TeamRadar", val); TeamRadar[playerid] = 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("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("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("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("Jobgeld", val); PlayerInfo[playerid][pJobLohn] = 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("House", val); PlayerInfo[playerid][pHaus] = strval( val );
self_mysql_get_field("Mieten", val); PlayerInfo[playerid][pMieten] = strval( val );
self_mysql_get_field("HealPaket", val); PlayerInfo[playerid][pHealPaket] = strval( val );
self_mysql_get_field("ArmourPaket", val); PlayerInfo[playerid][pArmourPaket] = strval( val );
self_mysql_get_field("WaffenPaket", val); PlayerInfo[playerid][pWaffenPaket] = strval( val );
self_mysql_get_field("OverHealPaket", val); PlayerInfo[playerid][pOverHealPaket] = 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("NewsSkill", val); PlayerInfo[playerid][pNewsSkill] = strval( val );
self_mysql_get_field("FishSkill", val); PlayerInfo[playerid][pFishSkill] = strval( val );
self_mysql_get_field("MechSkill", val); PlayerInfo[playerid][pMechSkill] = 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("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("PistolSkill", val); PlayerInfo[playerid][pPistolSkill] = strval( val );
self_mysql_get_field("MaschinePistolSkill", val); PlayerInfo[playerid][pMaschinePistolSkill] = strval( val );
self_mysql_get_field("SturmgewehrPistolSkill", val); PlayerInfo[playerid][pSturmgewehrPistolSkill] = strval( val );
self_mysql_get_field("ShotGunSkill", val); PlayerInfo[playerid][pShotGunSkill] = strval( val );
self_mysql_get_field("Tutorial", val); PlayerInfo[playerid][pTut] = strval( val );
self_mysql_get_field("Cptut", val); PlayerInfo[playerid][pCPTUT] = strval( val );
self_mysql_get_field("kh", val); PlayerInfo[playerid][pKHTIME] = 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("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 );
}
mysql_free_result();
if(PlayerInfo[playerid][pLevel] < 0)
{
PlayerInfo[playerid][pLevel] = 1;
SetPlayerScore(playerid, 1);
}
new DeleteDate = 15778463 + gettime();
format(string, sizeof(string), "UPDATE `users` SET `DeleteDatum`=%d, `LastLoginDatum`=%d WHERE `Name`='%s'", DeleteDate, gettime(), sendername);
mysql_query(string);
if(PlayerInfo[playerid][pDonatorRank] >= 1)
{
MaxVeh[playerid] = 6;
}
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][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));
if(PlayerInfo[playerid][pCPTUT] == 0 && PlayerInfo[playerid][pTut] == 1)
{
SendClientMessage(playerid, COLOR_ERRORTEXT, "________________________________________________________________________");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid, COLOR_TUTORIAL, "Du hast das Tutorial noch nicht fertig!");
SendClientMessage(playerid, COLOR_TUTORIAL, "Hole dir einen Roller per /rentroller und Spiele das Tutorial durch!");
SendClientMessage(playerid, COLOR_ERRORTEXT, "________________________________________________________________________");
}
if(PlayerInfo[playerid][pJailed] == 2){
SetTimerEx("ImPrisonarsch", 2000,0,"i",playerid);
}
if(xPrison[playerid] == 1){
SetTimerEx("ImCPPrisonarsch", 2000,0,"i",playerid);
}
PlayerCarConnect(playerid);
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),"AdmWarn: 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.");
}
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);
TextDrawShowForPlayer(playerid,TicketsTextdraw);
}
//-------------------- Waffen Skills --------------------
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
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;
//GameTextForPlayer(playerid, tmp, 1, 1);
Logintime[playerid] = 1;
gPlayerLogged[playerid] = 1;
StuffInfo[sLoggins] += 1;
start_screen{playerid} = false;
SetCameraBehindPlayer(playerid);
if(AdminIPClose == 0 || TogAdminMessage[playerid] == 0)
{
new noIP[256];
format(string, sizeof(string), "AdmWarn: Spieler %s hat sich mit der IP: %s eingeloggt!",sendername,PlayerInfo[playerid][pUserIP]);
format(noIP, sizeof(noIP), "AdmWarn: Spieler %s hat sich eingeloggt!", sendername);
ForAllPlayers(i)
{
new adminlv = PlayerInfo[i][pAdmin];
if(!IsPlayerConnected(i) || adminlv <= 0) continue;
if(adminlv >= 1338)
SendClientMessage(i, COLOR_LIGHTRED, string);
else
SendClientMessage(i, COLOR_LIGHTRED, noIP);
}
}
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] == 0)
{
SetPlayerPos(playerid, 1784.8639,-1943.3843,13.5528);
InterpolateCameraPos(playerid, 1794.888427, -1918.687866, 65.714218, 1796.820068, -1904.459472, 96.568595, 8000);
InterpolateCameraLookAt(playerid, 1795.196044, -1918.379150, 60.733245, 1796.392944, -1904.545654, 91.587623, 8000);
TogglePlayerControllable(playerid, 1);
ShowPlayerDialog(playerid, tutorialdialog, DIALOG_STYLE_MSGBOX, "German Night Life", "{FFFFFF}Herzlich Willkommen auf {00AAFF}German Night Life{FFFFFF}\nBei uns musst du dir ein Tutorial ansehen.\nWir haben zwei verschiedene Versionen.\nWelche möchtest du sehen?\nEmpfehlung: Die Normale", "Normal", "Kurz");
}
if(PlayerInfo[playerid][pTut] == 1)
{
SpawnPlayer(playerid);
}
if(PlayerInfo[playerid][pTeam] != -1)
{
new Team = PlayerInfo[playerid][pTeam], stringnachricht[256], stringnachricht1[256];
strmid(stringnachricht, (KassenInfo[Team][GangMotd]), 0, strlen(KassenInfo[Team][GangMotd]), 255);
format(stringnachricht1, sizeof(stringnachricht1), "{990000}Fraktionsnachricht: {FFFFFF}%s", stringnachricht);
SendClientMessage(playerid, COLOR_GRAD2, stringnachricht1);
}
}
return 1;
}
PUBLIC:OnPlayerRegister(playerid, password[])
{
StuffInfo[sNeuUser] += 1;
if(IsPlayerConnected(playerid))
{
new string[128],
playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
format(string, sizeof(string), "INSERT INTO `users` (`Name`, `Password`) VALUES ('%s', '%s')", playername, GeneratePassword(password));
self_mysql_queryEx(string);
print("erster Print");
PlayerInfo[playerid][pSQLID] = mysql_insert_id();
format(string, sizeof(string), "UPDATE `users` SET `RegisterDatum`='%d' WHERE `Name`='%s'", Time(), playername);
print("zweiter Print");
self_mysql_queryEx(string);
print("dritter Print");
PlayerInfo[playerid][pChar] = 26;
gOoc[playerid] = 0;
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][pBizKey] = -1;
PlayerInfo[playerid][pBank] = 0;
GivePlayerMoneys(playerid, 5000);
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;
PlayerInfo[playerid][pPistolSkill] = 2;
PlayerInfo[playerid][pMaschinePistolSkill] = 2;
PlayerInfo[playerid][pSturmgewehrPistolSkill] = 2;
PlayerInfo[playerid][pShotGunSkill] = 1;
//PlayerInfo[playerid][GNLPoints] = 20;
/*Scheine*/
PlayerInfo[playerid][pGunLic] = 0;
PlayerInfo[playerid][pFlyLic] = 0;
PlayerInfo[playerid][pCarLic] = 0;
PlayerInfo[playerid][pBikeLic] = 0;
PlayerInfo[playerid][pCPTUT] = 0;
PlayerInfo[playerid][pKHTIME] = 0;
print("vierter Print");
PlayerUpdate(playerid);
print("fuenfter Print");
}
return 1;
}
PUBLIC:PlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid)) { return 1; }
print("sechster Print");
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new endstring[1600];
new var[129];
new Float: p[4];
GetPlayerPos(playerid, p[0], p[1], p[2]);
GetPlayerFacingAngle(playerid, p[3]);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`AdminLevel`='%d', ", PlayerInfo[playerid][pAdmin]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Checkpoint`='%d', ", CCP[playerid]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CPrison`='%d', ", xPrison[playerid]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`RunningCP`='%d', ", RunningCP[playerid]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`TeamRadar`='%d', ", TeamRadar[playerid]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BNDRadar`='%d', ", BNDRadar[playerid]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Rolex`='%d', ", PlayerInfo[playerid][pRolex]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Swissonic`='%d', ", PlayerInfo[playerid][pSwissonic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Casio`='%d', ", PlayerInfo[playerid][pCasio]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Breitling`='%d', ", PlayerInfo[playerid][pBreitling]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Nixon`='%d', ", PlayerInfo[playerid][pNixon]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`IceWatch`='%d', ", PlayerInfo[playerid][pIceWatch]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`StartCoints`='%d', ", PlayerInfo[playerid][pStartCoints]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Coints`='%d', ", PlayerInfo[playerid][pCoints]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`SpawnhealZeit`='%d', ", PlayerInfo[playerid][pSpawnhealZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DeaglespawnZeit`='%d', ", PlayerInfo[playerid][pDeaglespawnZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`M4SpawnZeit`='%d', ", PlayerInfo[playerid][pM4SpawnZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MP5SpawnZeit`='%d', ", PlayerInfo[playerid][pMP5SpawnZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MehrZinsenZeit`='%d', ", PlayerInfo[playerid][pMehrZinsenZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Medickit`='%d', ", PlayerInfo[playerid][pMedickit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Startbonus`='%d', ", PlayerInfo[playerid][pStartbonus]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Kreditkarte`='%d', ", PlayerInfo[playerid][pKreditkarte]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`KreditkarteBenutzung`='%d', ", PlayerInfo[playerid][pKreditkartebenutzen]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Personalausweis`='%d', ", PlayerInfo[playerid][pPersonalausweis]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Namechange`='%d', ", PlayerInfo[playerid][pSchongeandert]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DonateRank`='%d', ", PlayerInfo[playerid][pDonatorRank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`UpgradePoints`='%d', ", PlayerInfo[playerid][gPupgrade]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ConnectedTime`='%d', ", PlayerInfo[playerid][pConnectTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Registered`='%d', ", PlayerInfo[playerid][pReg]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Sex`='%d', ", PlayerInfo[playerid][pSex]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Age`='%d', ", PlayerInfo[playerid][pAlter]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Origin`='%d', ", PlayerInfo[playerid][pOrigin]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Muted`='%d', ", PlayerInfo[playerid][pMuted]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Respect`='%d', ", PlayerInfo[playerid][pRespekt]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Gehalt`='%d', ", PlayerInfo[playerid][pGehalt]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Bank`='%d', ", PlayerInfo[playerid][pBank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Jobgeld`='%d', ", PlayerInfo[playerid][pJobLohn]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Crimes`='%d', ", PlayerInfo[playerid][pCrimes]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Kills`='%d', ", PlayerInfo[playerid][pKills]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`sKills`='%d', ", PlayerInfo[playerid][psKills]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Deaths`='%d', ", PlayerInfo[playerid][pDeaths]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Arrested`='%d', ", PlayerInfo[playerid][pArrested]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ArrestTime`='%d', ", PlayerInfo[playerid][pArrestTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PhoneBook`='%d', ", PlayerInfo[playerid][pPhoneBook]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`LottoNr`='%d', ", PlayerInfo[playerid][pLottoNr]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Fishes`='%d', ", PlayerInfo[playerid][pFishes]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BiggestFish`='%d', ", PlayerInfo[playerid][pBiggestFish]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Job`='%d'", PlayerInfo[playerid][pJob]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_queryEx(endstring);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`HeadValue`='%d', ", PlayerInfo[playerid][pHeadValue]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Jailed`='%d', ", PlayerInfo[playerid][pJailed]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`JailTime`='%d', ", PlayerInfo[playerid][pJailTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Leader`='%d', ", PlayerInfo[playerid][pLeader]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Member`='%d', ", PlayerInfo[playerid][pMember]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Rank`='%d', ", PlayerInfo[playerid][pRank]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Skin`='%d', ", PlayerInfo[playerid][pChar]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Vertragszeit`='%d'", PlayerInfo[playerid][pVertragszeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_queryEx(endstring);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`NewsSkill`='%d', ", PlayerInfo[playerid][pNewsSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`House`='%d', ", PlayerInfo[playerid][pHaus]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Mieten`='%d', ", PlayerInfo[playerid][pMieten]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`HealPaket`='%d', ", PlayerInfo[playerid][pHealPaket]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ArmourPaket`='%d', ", PlayerInfo[playerid][pArmourPaket]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`WaffenPaket`='%d', ", PlayerInfo[playerid][pWaffenPaket]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OverHealPaket`='%d', ", PlayerInfo[playerid][pOverHealPaket]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishSkill`='%d', ", PlayerInfo[playerid][pFishSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MechSkill`='%d', ", PlayerInfo[playerid][pMechSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`pSHealth`='%.1f', ", PlayerInfo[playerid][pSHealth]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PhoneNr`='%d', ", PlayerInfo[playerid][pNummer]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Hotel`='%d', ", PlayerInfo[playerid][pPhotelkey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Biz`='%d', ", PlayerInfo[playerid][pBizKey]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CarLic`='%d', ", PlayerInfo[playerid][pCarLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FlyLic`='%d', ", PlayerInfo[playerid][pFlyLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BoatLic`='%d', ", PlayerInfo[playerid][pBoatLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FishLic`='%d', ", PlayerInfo[playerid][pFishLic]);
strcat(endstring, var, sizeof(endstring));
// format(var, sizeof(var), "`GNLPoints`='%d', ", PlayerInfo[playerid][pGNLPoints]);
// strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`GunLic`='%d', ", PlayerInfo[playerid][pGunLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Zollpass`='%d'", PlayerInfo[playerid][pZollpass]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_queryEx(endstring);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`Gun1`='%d', ", PlayerInfo[playerid][pGun1]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Gun2`='%d', ", PlayerInfo[playerid][pGun2]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Gun3`='%d', ", PlayerInfo[playerid][pGun3]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Gun4`='%d', ", PlayerInfo[playerid][pGun4]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Ammo1`='%d', ", PlayerInfo[playerid][pAmmo1]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Ammo2`='%d', ", PlayerInfo[playerid][pAmmo2]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Ammo3`='%d', ", PlayerInfo[playerid][pAmmo3]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Ammo4`='%d', ", PlayerInfo[playerid][pAmmo4]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CarTime`='%d', ", PlayerInfo[playerid][pCarTime]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PayDay`='%d', ", PlayerInfo[playerid][pPayDay]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PayDayHad`='%d', ", PlayerInfo[playerid][pPayDayHad]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CDPlayer`='%d', ", PlayerInfo[playerid][pCDPlayer]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`AlcoholPerk`='%d', ", PlayerInfo[playerid][pAlcoholPerk]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PainKillerPerk`='%d', ", PlayerInfo[playerid][pPainKillerPerk]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`PistolSkill`='%d', ", PlayerInfo[playerid][pPistolSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MaschinePistolSkill`='%d', ", PlayerInfo[playerid][pMaschinePistolSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`SturmgewehrPistolSkill`='%d', ", PlayerInfo[playerid][pSturmgewehrPistolSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ShotGunSkill`='%d', ", PlayerInfo[playerid][pShotGunSkill]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DrugPerk`='%d', ", PlayerInfo[playerid][pDrugPerk]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MiserPerk`='%d', ", PlayerInfo[playerid][pMiserPerk]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`TraderPerk`='%d', ", PlayerInfo[playerid][pTraderPerk]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Tutorial`='%d', ", PlayerInfo[playerid][pTut]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Cptut`='%d', ", PlayerInfo[playerid][pCPTUT]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`kh`='%d', ", PlayerInfo[playerid][pKHTIME]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Warnings`='%d'", PlayerInfo[playerid][pWarns]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_queryEx(endstring);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`Fuel`='%d', ", PlayerInfo[playerid][pFuel]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Married`='%d', ", PlayerInfo[playerid][pMarried]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`MarriedTo`='%s', ", PlayerInfo[playerid][pMarriedTo]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`WantedLevel`='%d', ", PlayerInfo[playerid][pWantedLevel]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Spawn`='%d', ", PlayerInfo[playerid][pSpawn]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`SavedMaterials`='%d', ", PlayerInfo[playerid][pSaveMats]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`SavedDrugs`='%d', ", PlayerInfo[playerid][pSaveDrugs]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BikeLic`='%d', ", PlayerInfo[playerid][pBikeLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`LKWLic`='%d', ", PlayerInfo[playerid][pLKWLic]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`WerberName`='%s', ", PlayerInfo[playerid][pWerberName]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`FightingStyle`='%d', ", PlayerInfo[playerid][pFightingStyle]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Handy`='%d'", PlayerInfo[playerid][pHandy]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
self_mysql_queryEx(endstring);
format(endstring, sizeof(endstring), "UPDATE `users` SET ");
format(var, sizeof(var), "`OnDutySkin`='%d', ", PlayerInfo[playerid][pOnDutySkin]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`CarLicPoints`='%d', ", PlayerInfo[playerid][pCarLicPoints]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`BikeLicPoints`='%d', ", PlayerInfo[playerid][pBikeLicPoints]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`InviteSperre`='%d', ", PlayerInfo[playerid][pInviteSperre]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`warntime1`='%d', ", PlayerInfo[playerid][pWarnTime1]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`warntime2`='%d', ", PlayerInfo[playerid][pWarnTime2]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`Ticketsopen`='%d', ", PlayerInfo[playerid][pTicketsopen]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OldName`='%s', ", PlayerInfo[playerid][pOldName]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`ClientIP`='%s', ", PlayerInfo[playerid][pUserIP]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OrgMember`='%d', ", PlayerInfo[playerid][pOrgaID]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OrgLeader`='%d', ", PlayerInfo[playerid][pOrgaLeader]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OrgManager`='%d', ", PlayerInfo[playerid][pOrgaManager]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), "`OrgName`='%s'", PlayerInfo[playerid][pOrgaName]);
strcat(endstring, var, sizeof(endstring));
format(var, sizeof(var), " WHERE `Name`='%s'", playername);
strcat(endstring, var, sizeof(endstring));
print("siebter Print");
self_mysql_queryEx(endstring);
print("achter Print");
}
return 1;
}