Error Pawn

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(51506) : error 021: symbol already defined: "playerid"
    C:\Users\ArcticbytesRL\Desktop\MrM Original\gamemodes\mrm.pwn(51533) : error 021: symbol already defined: "playerid"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    51533 new playerid=spareid;
    51506 new playerid=spareid;


    Der error kommt seit ich dies entklammert habe:
    new pAutos[128];
    pAutos=getPlayerAutos(playerid);
    printf("Für %s werden Autos %s geladen.",SpielerName(playerid),pAutos);
    new playerCar[6][5];
    explode(playerCar,pAutos,",");


    Wenn ich das nicht rein mache Crasht der Server beim Login.


    Mfg

  • case 777://public anmelden
    {
    new playerid=spareid;
    mysql_store_result(mysql_load);
    if(mysql_result_stored(mysql_load))
    {
    if(mysql_num_rows(mysql_load)==0)
    {
    //passwort falsch
    SpielerInfo[playerid][Eingeloggt] = 0;
    PasswortFalsch(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    else
    {
    mysql_free_result(mysql_load);
    //Pw richtig
    format(query,sizeof(query),"SELECT * FROM user WHERE Name='%s'",SpielerName(playerid));
    mysql_query(query,1777,playerid,mysql_load);
    return 1;
    }
    }
    owner("Bei 777 wurde kein Result gestord.");
    return 1;
    }
    case 55:
    {
    mysql_store_result(mysql_save);
    new playerid=spareid;
    new pID=GetPVarInt(playerid,"crimeid");
    format(longstr,sizeof(longstr),"{FFFFFF}Name: %s\n\n{2a77a1}WPS\t\tGrund{FFFFFF}",SpielerName(pID));
    new Crimes[7][128];
    while(mysql_fetch_row(data,"|",mysql_save))
    {
    explode(Crimes,data,"|");
    format(longstr,sizeof(longstr),"%s\n%i WPS\t\t%s",longstr,strval(Crimes[2]),Crimes[3]);
    }
    mysql_free_result(mysql_save);
    ShowPlayerDialog(playerid,DIALOG_INFO,DIALOG_STYLE_MSGBOX,"Polizeicomputer",longstr,"OK","");
    return 1;
    }
    }
    return 1;
    }

  • public OnMysqlQuery(resultid, spareid, MySQL:handle)
    {
    switch(resultid)
    {
    case 78962:
    {
    mysql_store_result(handle);
    if(mysql_result_stored(handle))
    {
    new tmp_name[20],betrag;
    format(longstr,sizeof(longstr),"");
    while(mysql_fetch_row(data,"|",handle))
    {
    sscanf(data,"p<|>{i}s[20]i",tmp_name,betrag);
    format(longstr,sizeof(longstr),"%s\n%s (%i/10)",longstr,tmp_name,betrag);
    }
    mysql_free_result(handle);
    ShowPlayerDialog(spareid,DIALOG_WAFFENKAMMER,DIALOG_STYLE_LIST,"Waffenkammer",longstr,"Nehmen","Abbrechen");
    return 1;
    }
    }
    case 56878:
    {
    mysql_store_result(handle);
    //id adminid userid ip seelvl date text topsecret
    if(mysql_result_stored(handle))
    {
    format(longstr,sizeof(longstr),"{BFC0C2}Adminkommentare von %s:\n",SpielerName(GetPVarInt(spareid,"straflogOF")));
    new tmp_admin,tmp_date,tmp_text[256],x;
    while(mysql_fetch_row(data,"|",handle))
    {
    x++;
    sscanf(data,"p<|>iis[256]",tmp_admin,tmp_date,tmp_text);

    format(longstr,sizeof(longstr),"%s\n{2a77a1}%i. | %s (%s): {BFC0C2}%s",longstr,x,getDateFromTimestamp(tmp_date),getPlayerNameByDB(tmp_admin),tmp_text);
    }
    ShowPlayerDialog(spareid,DIALOG_ADMIN_KOMMENTS,DIALOG_STYLE_MSGBOX,"Straflog",longstr,"Neu","Schließen");
    mysql_free_result(handle);
    return 1;
    }
    mysql_free_result(handle);
    }
    case 45689:
    {
    mysql_store_result(handle);
    //admin,date,type,until,reason
    if(mysql_result_stored(handle))
    {
    format(longstr,sizeof(longstr),"{BFC0C2}Straflog von %s:\n",SpielerName(GetPVarInt(spareid,"straflogOF")));
    new tmp_admin[MAX_PLAYER_NAME],tmp_date,tmp_type[20],tmp_until,tmp_reason[128],x;
    while(mysql_fetch_row(data,"|",handle))
    {
    x++;
    sscanf(data,"p<|>s[35]is[20]is[128]",tmp_admin,tmp_date,tmp_type,tmp_until,tmp_reason);
    if(!strcmp(tmp_admin,"TrainBOT",true)){tmp_admin="ACS";}
    format(longstr,sizeof(longstr),"%s\n{2a77a1}%i. | %s (%s): {BFC0C2}%s(%i) - %s",longstr,x,getDateFromTimestamp(tmp_date),tmp_admin,tmp_type,tmp_until,tmp_reason);
    }
    ShowPlayerDialog(spareid,DIALOG_INFO,DIALOG_STYLE_MSGBOX,"Straflog",longstr,"OK","");
    mysql_free_result(handle);
    return 1;
    }
    mysql_free_result(handle);
    }
    case 7563:
    {
    BizAuto[spareid][d_id]=mysql_insert_id(handle);
    }
    case 19:
    {
    new data2[64],wstring[10];
    new waffe, wammo;
    new now_time=GetTickCount();
    mysql_store_result(handle);
    new playerid=spareid;
    if(mysql_num_rows(handle)==0)
    {
    mysql_free_result(handle);
    format(query,sizeof(query),"INSERT INTO waffensaves (Name) VALUES ('%s')",SpielerName(playerid));
    mysql_query(query);
    mysql_free_result();
    return 1;
    }
    mysql_free_result(handle);
    for(new i=1; i<=11; i++)
    {
    mysql_queryf("SELECT Waffe%i, Ammo%i FROM waffensaves WHERE Name='%s'",i,i,SpielerName(playerid));
    mysql_store_result();
    format(wstring,sizeof(wstring),"Waffe%i",i);
    mysql_fetch_field(wstring,data);
    format(wstring,sizeof(wstring),"Ammo%i",i);
    mysql_fetch_field(wstring,data2);
    waffe=strval(data);
    wammo=strval(data2);
    GivePlayerWeapon(playerid,waffe,wammo);
    mysql_free_result();
    mysql_queryf("UPDATE waffensaves SET Ammo%i='0' WHERE Name='%s'",i,SpielerName(playerid));
    mysql_free_result();
    }
    mysql_queryf("SELECT armor FROM waffensaves WHERE Name='%s'",SpielerName(playerid));
    mysql_store_result();
    mysql_fetch_field("armor",data);
    mysql_free_result();
    wammo=strval(data);
    SetPlayerArmour(playerid,wammo);
    SetPVarInt(playerid,"waffengeladen",1);
    printf("Waffenladen %s dauert %ims",SpielerName(playerid),GetTickCount()-now_time);
    return 1;
    }
    case 1234:
    {
    mysql_store_result(mysql_car);
    new playerid=spareid;
    new loadvehs=4;
    if(SpielerInfo[playerid][pRank]>0){loadvehs=6;}
    new x=0;
    while(mysql_fetch_row(data,"|",mysql_car))
    {
    if(x==loadvehs){mysql_free_result(mysql_car);return 1;}
    new id=getFreePlayerAuto();
    sscanf(data, "p<|>is[40]iffffiiiffffs[64]iiis[10]iiiiiiiiiiiiiiiiiiiiiifiiiis[64]s[64]s[64]s[64]s[64]iiiffff",PlayerAuto[id][d_id],PlayerAuto[id][vkey],PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],PlayerAuto[id][preis],
    PlayerAuto[id][a_x],PlayerAuto[id][a_y],PlayerAuto[id][a_z],PlayerAuto[id][a_a],PlayerAuto[id][car_grund],PlayerAuto[id][benzin],PlayerAuto[id][kaputt],PlayerAuto[id][angemeldet],PlayerAuto[id][kennzeichen],PlayerAuto[id][vmod0],PlayerAuto[id][vmod1],PlayerAuto[id][vmod2],PlayerAuto[id][vmod3],PlayerAuto[id][vmod4],
    PlayerAuto[id][vmod5],PlayerAuto[id][vmod6],PlayerAuto[id][vmod7],PlayerAuto[id][vmod8],PlayerAuto[id][vmod9],PlayerAuto[id][vmod10],PlayerAuto[id][vmod11],PlayerAuto[id][vmod12],PlayerAuto[id][vmod13],PlayerAuto[id][paintjob],PlayerAuto[id][car_mats],PlayerAuto[id][car_hanf],PlayerAuto[id][car_lsd],PlayerAuto[id][car_lunch],PlayerAuto[id][car_c4],PlayerAuto[id][car_koks],
    PlayerAuto[id][neon],PlayerAuto[id][car_distance],PlayerAuto[id][car_pizza0],PlayerAuto[id][car_pizza1],PlayerAuto[id][car_laden],PlayerAuto[id][lastwechsel],PlayerAuto[id][key1],PlayerAuto[id][key2],PlayerAuto[id][key3],PlayerAuto[id][key4],PlayerAuto[id][key5],PlayerAuto[id][car_abtime],PlayerAuto[id][calarm],PlayerAuto[id][finder],PlayerAuto[id][lastx],PlayerAuto[id][lasty],PlayerAuto[id][lastz],PlayerAuto[id][lastr]);
    PlayerAuto[id][id_x] = CreateVehicleEx(PlayerAuto[id][vmodel],PlayerAuto[id][v_xc],PlayerAuto[id][v_yc],PlayerAuto[id][v_zc],PlayerAuto[id][v_ac],PlayerAuto[id][vfarbe1],PlayerAuto[id][vfarbe2],-1);
    RespawnVehicle(499,PlayerAuto[id][id_x]);
    //Kofferraum
    carLSD[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lsd];
    carKoks[PlayerAuto[id][id_x]]=PlayerAuto[id][car_koks];
    carHanf[PlayerAuto[id][id_x]]=PlayerAuto[id][car_hanf];
    carMats[PlayerAuto[id][id_x]]=PlayerAuto[id][car_mats];
    carC4[PlayerAuto[id][id_x]]=PlayerAuto[id][car_c4];
    carLunch[PlayerAuto[id][id_x]]=PlayerAuto[id][car_lunch];
    carPizza[0][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza0];
    carPizza[1][PlayerAuto[id][id_x]]=PlayerAuto[id][car_pizza1];
    istkaputt[PlayerAuto[id][id_x]]=PlayerAuto[id][kaputt];
    distanz[PlayerAuto[id][id_x]]=PlayerAuto[id][car_distance];
    FahrzeugTunen(PlayerAuto[id][id_x]);
    lockVehicle(PlayerAuto[id][id_x]);
    format(string,sizeof(string),"%s-%d",PlayerAuto[id][kennzeichen],PlayerAuto[id][id_x]);
    if(PlayerAuto[id][angemeldet]==1)
    {
    SetVehicleNumberPlateEx(PlayerAuto[id][id_x],string);
    }
    else
    {
    SetVehicleNumberPlateEx(PlayerAuto[id][id_x],"{FF0000}-NA-");
    }
    tank[PlayerAuto[id][id_x]]=PlayerAuto[id][benzin];
    printf("Fahrzeug : %d (ID:%d) geladen und gefunden. [BESITZER : %s]",id,PlayerAuto[id][id_x],PlayerAuto[id][vkey]);
    //zähler erhöhen
    x++;
    }
    mysql_free_result(mysql_car);
    return 1;
    }
    case 5566:
    {
    mysql_store_result(mysql_load);
    new playerid=spareid;
    if(mysql_result_stored(mysql_load))
    {
    if(mysql_num_rows(mysql_load)==1)
    {
    mysql_fetch_int(mysql_load);
    //new tmp_passwort[30],tmp_baned,tmp_timeban;
    //mysql_fetch_row(data,"|",mysql_load);
    // sscanf(data,"p<|>{s[25]}s[30]ii",tmp_passwort,tmp_baned,tmp_timeban);
    //printf("data: %s",data);
    //printf("tmp_passwort: %s | tmp_baned: %i | tmp_timeban: %i",tmp_passwort,tmp_baned,tmp_timeban);
    mysql_fetch_field("Baned",data,mysql_load);
    if(strval(data)!=0)
    {
    mysql_free_result(mysql_load);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Du wurdest gebannt. Wende dich an die Admins");
    laterKick(playerid);
    return 1;
    }

    mysql_fetch_field("Timeban",data,mysql_load);
    if(gettime()<strval(data))
    {
    mysql_free_result(mysql_load);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Du bist noch gebannt. Komm später wieder oder wende dich an die Admins.");
    laterKick(playerid);
    return 1;
    }


    mysql_fetch_field("Passwort",data,mysql_load);


    if(strlen(data)==0)
    {
    mysql_free_result(mysql_load);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Du hast kein Passwort. Wende dich bitte an einen ServerMananger/Owner.");
    laterKick(playerid);
    return 1;
    }
    }
    if(mysql_num_rows(mysql_load)==1)
    {
    mysql_free_result(mysql_load);
    PlayAudioStreamForPlayer(playerid,"https://www.dropbox.com/s/3lc77zerululp1n/Loginn.mp3?dl=0");
    format(string,sizeof(string),"{FFFFFF}Dein Account, {33CCFF}%s {FFFFFF}wurde gefunden.\nBitte logge dich mit deinem Passwort ein.",SpielerName(playerid));
    ShowPlayerDialog(playerid,Login,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbruch");
    }
    else
    {
    if(strfind(SpielerName(playerid),"[LoT]",true) != -1 || strfind(SpielerName(playerid),"[",true) == 0)
    {
    mysql_free_result(mysql_load);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Du darfst dich nicht mit diesem Tag registrieren.");
    laterKick(playerid);
    return 1;
    }
    if(allowregister==0)
    {
    mysql_free_result(mysql_load);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Die Registrierung auf dem Server ist zur zeit deaktiviert. Eine Nachricht wurde an die Admins gesendet.");
    format(string,sizeof(string),"%s hat versucht sich zu registrieren, während dieses deaktiviert war.",SpielerName(playerid));
    SendAdminMessage(COLOR_BLUE,string);
    laterKick(playerid);
    return 1;
    }
    mysql_free_result(mysql_load);
    mysql_queryf("SELECT * FROM badnames WHERE name='%s'",SpielerName(playerid));
    mysql_store_result();
    if(mysql_num_rows()>=1){mysql_free_result();SendClientMessage(playerid,Gruen,"Dein Name ist nicht erlaubt. Wähle bitte einen anderen.");laterKick(playerid);return 1;}
    mysql_free_result();
    mysql_queryf("SELECT * FROM logins WHERE ip='%s'",SpielerIP(playerid));
    mysql_store_result();
    PlayAudioStreamForPlayer(playerid,"https://www.dropbox.com/s/3lc77zerululp1n/Loginn.mp3?dl=0");
    format(string,sizeof(string),"{FFFFFF}Dein Account, {33CCFF}%s {FFFFFF}wurde nicht gefunden.\nBitte registriere dich, und gib das gewünsche Passwort ein.",SpielerName(playerid));
    ShowPlayerDialog(playerid,Register,DIALOG_STYLE_PASSWORD,"Regestrieren",string,"Register","Abbruch");
    }
    mysql_free_result(mysql_load);
    return 1;
    }
    printf("1. Query für %s ist fehlgeschlagen, da mysql_store_result nicht aufgerufen worden konnte.",SpielerName(playerid));
    format(string,sizeof(string),"1. Query für %s ist fehlgeschlagen, da mysql_store_result nicht aufgerufen worden konnte.",SpielerName(playerid));
    owner(string);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Es ist ein Fehler aufgetreten. Versuchs nochmal.");
    Kick(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    case 1777://public anmelden
    {
    an_time=GetTickCount();
    new playerid=spareid;
    loadPlayerAutos(playerid);
    mysql_store_result(mysql_load);
    if(mysql_result_stored(mysql_load))
    {
    mysql_fetch_field("Name",data,mysql_load);
    if(strcmp(SpielerName(playerid),data,true))
    {
    format(string,sizeof(string),"Anmeldung für %s ist fehlgeschlagen, da die Namen nicht mit dem Account stimmt. (dbName: %s)",SpielerName(playerid),data);
    owner(string);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Es ist ein Fehler beim Login aufgetreten. Versuchs nochmal.");
    Kick(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    mysql_fetch_field("saving",data,mysql_load);
    if(strval(data)==1)
    {
    format(string,sizeof(string),"Anmeldung für %s ist fehlgeschlagen, da er noch am speichern war.",SpielerName(playerid));
    owner(string);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Es ist ein Fehler beim Login aufgetreten. Versuchs später nochmal.");
    Kick(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    resetoldvars(playerid);
    mysql_fetch_field("Geld",data,mysql_load);
    GibGeld(playerid,strval(data));
    mysql_fetch_field("Jail",data,mysql_load);
    SpielerInfo[playerid][Jail] = strval(data);
    mysql_fetch_field("Mats",data,mysql_load);
    SpielerInfo[playerid][Mats] = strval(data);
    mysql_fetch_field("Jailed",data,mysql_load);
    SpielerInfo[playerid][Jailed] = strval(data);
    mysql_fetch_field("Skin",data,mysql_load);
    SetPlayerSkin(playerid,strval(data));
    SpielerInfo[playerid][Skin]=strval(data);
    mysql_fetch_field("Tut",data,mysql_load);
    SpielerInfo[playerid][contract] = strval(data);
    mysql_fetch_field("Death",data,mysql_load);
    tot[playerid] = strval(data);
    isttot[playerid]=0;
    if(strval(data)>=1)
    {
    isttot[playerid]=1;
    }
    mysql_fetch_field("Wanteds",data,mysql_load);
    SetPlayerWantedLevel(playerid,strval(data));
    mysql_fetch_field("Wanteds",data,mysql_load);
    SpielerInfo[playerid][Wanteds] = strval(data);
    mysql_fetch_field("Alevel",data,mysql_load);
    SpielerInfo[playerid][Admin] = strval(data);
    mysql_fetch_field("Spawnchange",data,mysql_load);
    SpielerInfo[playerid][Spawnchange] = strval(data);
    mysql_fetch_field("swat",data,mysql_load);
    SpielerInfo[playerid][swat] = strval(data);
    mysql_fetch_field("Baned",data,mysql_load);
    SpielerInfo[playerid][ban] = strval(data);
    mysql_fetch_field("Fraktion",data,mysql_load);
    SpielerInfo[playerid][Frakt] = strval(data);
    mysql_fetch_field("Rang",data,mysql_load);
    SpielerInfo[playerid][Rank] = strval(data);
    mysql_fetch_field("Subrang",data,mysql_load);
    SpielerInfo[playerid][Subrank] = strval(data);
    mysql_fetch_field("Job",data,mysql_load);
    SpielerInfo[playerid][Job] = strval(data);
    mysql_fetch_field("HIN",data,mysql_load);
    SpielerInfo[playerid][HIN] = strval(data);
    mysql_fetch_field("Level",data,mysql_load);
    SpielerInfo[playerid][Level] = strval(data);
    mysql_fetch_field("Respekt",data,mysql_load);
    SpielerInfo[playerid][Respekt] = strval(data);
    mysql_fetch_field("distance",data,mysql_load);
    SpielerInfo[playerid][pdistance] = floatstr(data);
    mysql_fetch_field("Car",data,mysql_load);
    SpielerInfo[playerid][Car]=strval(data);
    mysql_fetch_field("Paytime",data,mysql_load);
    SpielerInfo[playerid][Paytime] = strval(data);
    mysql_fetch_field("Bank",data,mysql_load);
    SpielerInfo[playerid][Bank] = strval(data);
    mysql_fetch_field("Motel",data,mysql_load);
    SpielerInfo[playerid][Motel]=strval(data);
    mysql_fetch_field("pRank",data,mysql_load);
    SpielerInfo[playerid][pRank] = strval(data);
    mysql_fetch_field("Geschlecht",data,mysql_load);
    SpielerInfo[playerid][Geschlecht] = strval(data);
    mysql_fetch_field("phonebook",data,mysql_load);
    SpielerInfo[playerid][phonebook] = strval(data);
    mysql_fetch_field("rented",data,mysql_load);
    SpielerInfo[playerid][rented] = strval(data);
    mysql_fetch_field("alg",data,mysql_load);
    SpielerInfo[playerid][alg] = strval(data);
    mysql_fetch_field("flug",data,mysql_load);
    SpielerInfo[playerid][flug] = strval(data);
    mysql_fetch_field("WSchein",data,mysql_load);
    SpielerInfo[playerid][WSchein] = strval(data);
    mysql_fetch_field("bl",data,mysql_load);
    SpielerInfo[playerid][bl] = strval(data);
    SetPlayerScore(playerid,SpielerInfo[playerid][Level]);
    mysql_fetch_field("C4",data,mysql_load);
    SpielerInfo[playerid][C4] = strval(data);
    mysql_fetch_field("pangel",data,mysql_load);
    SpielerInfo[playerid][pangel]=strval(data);
    mysql_fetch_field("gefischt",data,mysql_load);
    SpielerInfo[playerid][gefischt]=strval(data);
    mysql_fetch_field("gehalt",data,mysql_load);
    SpielerInfo[playerid][pgehalt]=strval(data);
    mysql_fetch_field("robtime",data,mysql_load);
    SpielerInfo[playerid][robtime]=strval(data);
    mysql_fetch_field("hanf",data,mysql_load);
    SpielerInfo[playerid][phanf]=strval(data);
    mysql_fetch_field("explodetime",data,mysql_load);
    SpielerInfo[playerid][explodetime]=strval(data);
    mysql_fetch_field("warn",data,mysql_load);
    SpielerInfo[playerid][warn]=strval(data);
    mysql_fetch_field("lsd",data,mysql_load);
    SpielerInfo[playerid][lsd]=strval(data);
    mysql_fetch_field("dutyskin",data,mysql_load);
    SpielerInfo[playerid][dutyskin]=strval(data);
    mysql_fetch_field("quittime",data,mysql_load);
    SpielerInfo[playerid][quittime]=strval(data);
    mysql_fetch_field("drivingskill",data,mysql_load);
    SpielerInfo[playerid][drivingskill]=strval(data);
    mysql_fetch_field("drivingpoints",data,mysql_load);
    SpielerInfo[playerid][drivingpoints]=strval(data);
    mysql_fetch_field("totvirtual",data,mysql_load);
    totvirtual[playerid]=strval(data);
    mysql_fetch_field("totinterior",data,mysql_load);
    totinterior[playerid]=strval(data);
    mysql_fetch_field("totx",data,mysql_load);
    TotX[playerid]=floatstr(data);
    mysql_fetch_field("toty",data,mysql_load);
    TotY[playerid]=floatstr(data);
    mysql_fetch_field("totz",data,mysql_load);
    TotZ[playerid]=floatstr(data);
    mysql_fetch_field("fightstyle",data,mysql_load);
    SpielerInfo[playerid][fightstyle]=strval(data);
    SetPlayerFightingStyle(playerid,SpielerInfo[playerid][fightstyle]);
    mysql_fetch_field("GWD",data,mysql_load);
    SpielerInfo[playerid][GWD]=strval(data);
    mysql_fetch_field("lunch",data,mysql_load);
    SpielerInfo[playerid][lunch]=strval(data);
    mysql_fetch_field("reisepass",data,mysql_load);
    SpielerInfo[playerid][reisepass]=strval(data);
    mysql_fetch_field("gang",data,mysql_load);
    SpielerInfo[playerid][gang]=strval(data);
    mysql_fetch_field("grank",data,mysql_load);
    SpielerInfo[playerid][grank]=strval(data);
    mysql_fetch_field("alka",data,mysql_load);
    SpielerInfo[playerid][alka]=strval(data);
    mysql_fetch_field("guser",data,mysql_load);
    strmid(SpielerInfo[playerid][guser],data,0,35,35);
    mysql_fetch_field("helm",data,mysql_load);
    SpielerInfo[playerid][helm]=strval(data);
    mysql_fetch_field("scheintime",data,mysql_load);
    SpielerInfo[playerid][stime]=strval(data);
    mysql_fetch_field("uadmin",data,mysql_load);
    uadmin[playerid]=strval(data);
    mysql_fetch_field("bike",data,mysql_load);
    SpielerInfo[playerid][bike]=strval(data);
    mysql_fetch_field("partner",data,mysql_load);
    strmid(SpielerInfo[playerid][partner],data,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
    mysql_fetch_field("deckname",data,mysql_load);
    strmid(SpielerInfo[playerid][deckname],data,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
    mysql_fetch_field("muted",data,mysql_load);
    SetPVarInt(playerid,"muted",strval(data));
    mysql_fetch_field("koks",data,mysql_load);
    SpielerInfo[playerid][koks]=strval(data);
    mysql_fetch_field("leader",data,mysql_load);
    SpielerInfo[playerid][leader]=strval(data);
    mysql_fetch_field("card",data,mysql_load);
    SpielerInfo[playerid][card]=strval(data);
    mysql_fetch_field("eventwarn",data,mysql_load);
    SpielerInfo[playerid][eventwarn]=strval(data);
    mysql_fetch_field("races",data,mysql_load);
    SpielerInfo[playerid][races]=strval(data);
    mysql_fetch_field("wins",data,mysql_load);
    SpielerInfo[playerid][wins]=strval(data);
    mysql_fetch_field("CM",data,mysql_load);
    SetPVarInt(playerid,"CM",strval(data));
    mysql_fetch_field("handy",data,mysql_load);
    SpielerInfo[playerid][handy]=strval(data);
    mysql_fetch_field("flatrate",data,mysql_load);
    SpielerInfo[playerid][flatrate]=strval(data);
    mysql_fetch_field("vertrag",data,mysql_load);
    SpielerInfo[playerid][vertrag]=strval(data);
    mysql_fetch_field("telefoniert",data,mysql_load);
    SpielerInfo[playerid][ptelefoniert]=strval(data);
    mysql_fetch_field("coins",data,mysql_load);
    SpielerInfo[playerid][coins]=strval(data);
    mysql_fetch_field("pizza0",data,mysql_load);
    SpielerInfo[playerid][pizza0]=strval(data);
    mysql_fetch_field("pizza1",data,mysql_load);
    SpielerInfo[playerid][pizza1]=strval(data);
    mysql_fetch_field("punkte",data,mysql_load);
    SpielerInfo[playerid][punkte]=strval(data);
    mysql_fetch_field("id",data,mysql_load);
    SetPVarInt(playerid,"dbid",strval(data));
    mysql_fetch_field("kasten",data,mysql_load);
    SpielerInfo[playerid][kasten]=strval(data);
    mysql_fetch_field("EM",data,mysql_load);
    SetPVarInt(playerid,"EM",strval(data));
    mysql_fetch_field("FM",data,mysql_load);
    SetPVarInt(playerid,"FM",strval(data)),
    mysql_fetch_field("dmkills",data,mysql_load);
    SetPVarInt(playerid,"dmkills",strval(data));
    mysql_fetch_field("dmdeaths",data,mysql_load);
    SetPVarInt(playerid,"dmdeaths",strval(data));
    mysql_fetch_field("dmpunkte",data,mysql_load);
    SetPVarInt(playerid,"dmpunkte",strval(data));
    mysql_fetch_field("donuts",data,mysql_load);
    SpielerInfo[playerid][donuts]=strval(data);
    mysql_fetch_field("morde",data,mysql_load);
    SpielerInfo[playerid][morde]=strval(data);
    mysql_fetch_field("gestime",data,mysql_load);
    SpielerInfo[playerid][gestime]=strval(data);
    mysql_fetch_field("kanister",data,mysql_load);
    SpielerInfo[playerid][kanister]=strval(data);
    mysql_fetch_field("kirche",data,mysql_load);
    SpielerInfo[playerid][kirche]=strval(data);
    mysql_fetch_field("boatschein",data,mysql_load);
    SpielerInfo[playerid][boatschein]=strval(data);
    mysql_fetch_field("lkwschein",data,mysql_load);
    SpielerInfo[playerid][lkwschein]=strval(data);
    mysql_fetch_field("angelschein",data,mysql_load);
    SpielerInfo[playerid][angelschein]=strval(data);
    mysql_fetch_field("gwkills",data,mysql_load);
    SpielerInfo[playerid][gwkills]=strval(data);
    mysql_fetch_field("gwtode",data,mysql_load);
    SpielerInfo[playerid][gwtode]=strval(data);
    mysql_fetch_field("gwflaggen",data,mysql_load);
    SpielerInfo[playerid][gwflaggen]=strval(data);
    mysql_fetch_field("gwstarted",data,mysql_load);
    SpielerInfo[playerid][gwstarted]=strval(data);
    mysql_fetch_field("fskill",data,mysql_load);
    SpielerInfo[playerid][fskill]=strval(data);
    mysql_fetch_field("lmittel",data,mysql_load);
    SetPVarInt(playerid,"lebensmittel",strval(data));
    mysql_fetch_field("zelle",data,mysql_load);
    SetPVarInt(playerid,"zelle",strval(data));
    mysql_fetch_field("radio",data,mysql_load);
    SetPVarInt(playerid,"radio",strval(data));
    mysql_fetch_field("radioURL",data,mysql_load);
    SetPVarString(playerid,"radioURL",data);
    mysql_fetch_field("pausweis",data,mysql_load);
    SpielerInfo[playerid][pausweis]=strval(data);
    mysql_fetch_field("anzug",data,mysql_load);
    SetPVarInt(playerid,"anzug",strval(data));
    mysql_fetch_field("premium",data,mysql_load);
    SpielerInfo[playerid][u_premium]=strval(data);
    mysql_fetch_field("Passwort",data,mysql_load);
    SetPVarString(playerid,"pw",data);
    mysql_fetch_field("karttime",data,mysql_load);
    SpielerInfo[playerid][karttime]=strval(data);
    mysql_fetch_field("lastx",data,mysql_load);
    SpielerInfo[playerid][lastx]=floatstr(data);
    mysql_fetch_field("lasty",data,mysql_load);
    SpielerInfo[playerid][lasty]=floatstr(data);
    mysql_fetch_field("lastz",data,mysql_load);
    SpielerInfo[playerid][lastz]=floatstr(data);
    mysql_fetch_field("lastr",data,mysql_load);
    SpielerInfo[playerid][lastr]=floatstr(data);
    mysql_fetch_field("lastworld",data,mysql_load);
    SpielerInfo[playerid][lastworld]=strval(data);
    mysql_fetch_field("lastinter",data,mysql_load);
    SpielerInfo[playerid][lastinter]=strval(data);
    mysql_fetch_field("cartows",data,mysql_load);
    SpielerInfo[playerid][cartows]=strval(data);
    mysql_fetch_field("death_reason",data,mysql_load);
    SetPVarInt(playerid,"death_reason",strval(data));
    mysql_fetch_field("frees",data,mysql_load);
    SpielerInfo[playerid][frees]=strval(data);


    if(SpielerInfo[playerid][karttime]<=0)
    {
    SpielerInfo[playerid][karttime]=999999;
    }


    mysql_free_result(mysql_load);

    loadFische(playerid);


    SetPVarInt(playerid,"lasthaus",-1);


    SetPVarInt(playerid,"newsms",getNewSms(playerid));


    //skincheck
    if(SpielerInfo[playerid][Geschlecht]==0)
    {
    if(GetPlayerSkin(playerid)==0)
    {
    SetPlayerSkin(playerid,defaultmskin);
    SpielerInfo[playerid][Skin]=defaultmskin;
    }
    }
    if(SpielerInfo[playerid][Geschlecht]==1)
    {
    if(GetPlayerSkin(playerid)==0)
    {
    SetPlayerSkin(playerid,defaultwskin);
    SpielerInfo[playerid][Skin]=defaultwskin;
    }
    }


    mysql_queryf("UPDATE user SET online='1',lastplayed='%i' WHERE Name='%s'",gettime(),SpielerName(playerid));


    if(SpielerInfo[playerid][drivingskill]==0)
    {
    SpielerInfo[playerid][drivingskill]=1;
    }


    SpielerInfo[playerid][Eingeloggt] = 1;
    if(IsPlayerAnAdmin(playerid,1)&&uadmin[playerid]==0)
    {
    //new string[128];
    format(string,sizeof(string),"<< Teammitglied {FF0000}%s {2a77a1}hat sich eingeloggt. >>",SpielerName(playerid));
    SendAdminMessage(COLOR_BLUE,string);
    SaveALogin(playerid);
    }
    if(!IsPlayerInFrakt(playerid,0))
    {
    format(string,sizeof(string),"<< Fraktionsmitglied {FF0000}%s {33CCFF}hat sich eingeloggt. >>",SpielerName(playerid));
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(!IsPlayerConnected(i))continue;
    if(!IsPlayerInFrakt(i,SpielerInfo[playerid][Frakt]))continue;
    if(i==playerid)continue;
    SendClientMessage(i,0x33CCDDFF,string);
    }
    mysql_queryf("SELECT zeile1,zeile2,zeile3 FROM motd WHERE frakt_id='%i'",SpielerInfo[playerid][Frakt]);
    mysql_store_result();
    mysql_fetch_field("zeile1",data);
    if(strlen(data))
    {
    format(string,sizeof(string),"*Fraktion: %s",data);
    SendClientMessage(playerid,0x33CCDDFF,string);
    }
    mysql_fetch_field("zeile2",data);
    if(strlen(data))
    {
    format(string,sizeof(string),"*Fraktion: %s",data);
    SendClientMessage(playerid,0x33CCDDFF,string);
    }
    mysql_fetch_field("zeile3",data);
    if(strlen(data))
    {
    format(string,sizeof(string),"*Fraktion: %s",data);
    SendClientMessage(playerid,0x33CCDDFF,string);
    }
    mysql_free_result();
    }
    if(strcmp(SpielerInfo[playerid][partner],"",true)&&strcmp(SpielerInfo[playerid][partner],"Niemand",true))
    {
    new pID=ReturnUser(SpielerInfo[playerid][partner]);
    if(!strcmp(SpielerInfo[playerid][partner],SpielerName(pID),true))
    {
    format(string,sizeof(string),"<< Ehepartner {FF0000}%s {00CC33}hat sich eingeloggt. >>",SpielerName(playerid));
    SendClientMessage(pID,Gruen,string);
    }
    }
    //Autos laden
    new pAutos[128];
    pAutos=getPlayerAutos(playerid);
    printf("Für %s werden Autos %s geladen.",SpielerName(playerid),pAutos);
    new playerCar[6][5];
    explode(playerCar,pAutos,",");
    //Autos laden ende
    checkAwards(playerid);
    saveLogin(playerid);
    SetPlayerColor(playerid,COLOR_WHITE);
    SetSpawnInfo(playerid,0,SpielerInfo[playerid][Skin],0.0,0.0,0.0,0.0,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    if(getTutState(playerid)<13&&SpielerInfo[playerid][Jail]==-1&&SpielerInfo[playerid][Jailed]==0)
    {
    hatGesehen[playerid]=1;
    ShowPlayerDialog(playerid,DIALOG_TUTABORT,DIALOG_STYLE_MSGBOX,"Achtung!","Du hast das Tutorial beim letzten Ausloggen noch nicht beendet. Möchtest du jetzt fortfahren?","Ja","Nein");
    }
    SetPVarInt(playerid,"loginspawn",1);
    //SetPVarInt(playerid,"putAtLastPos",1);
    printf("Anmeldung für %s ist komplett fertig (%ims).",SpielerName(playerid),GetTickCount()-an_time);

    if(!strcmp(SpielerName(playerid),"Chizl",true))
    {
    SendClientMessageToAll(COLOR_PINK,"<< ServerTroll Chizl hat sich eingeloggt. >>");
    }
    return 1;
    }
    else
    {
    printf("Anmeldung für %s ist fehlgeschlagen, da mysql_store_result nicht aufgerufen worden konnte.",SpielerName(playerid));
    format(string,sizeof(string),"Anmeldung für %s ist fehlgeschlagen, da mysql_store_result nicht aufgerufen worden konnte.",SpielerName(playerid));
    owner(string);
    SendClientMessage(playerid,COLOR_BRIGHTRED,"Es ist ein Fehler beim Login aufgetreten. Versuchs nochmal.");
    Kick(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    }
    case 777://public anmelden
    {
    new playerid=spareid;
    mysql_store_result(mysql_load);
    if(mysql_result_stored(mysql_load))
    {
    if(mysql_num_rows(mysql_load)==0)
    {
    //passwort falsch
    SpielerInfo[playerid][Eingeloggt] = 0;
    PasswortFalsch(playerid);
    mysql_free_result(mysql_load);
    return 1;
    }
    else
    {
    mysql_free_result(mysql_load);
    //Pw richtig
    format(query,sizeof(query),"SELECT * FROM user WHERE Name='%s'",SpielerName(playerid));
    mysql_query(query,1777,playerid,mysql_load);
    return 1;
    }
    }
    owner("Bei 777 wurde kein Result gestord.");
    return 1;
    }
    case 55:
    {
    mysql_store_result(mysql_save);
    new playerid=spareid;
    new pID=GetPVarInt(playerid,"crimeid");
    format(longstr,sizeof(longstr),"{FFFFFF}Name: %s\n\n{2a77a1}WPS\t\tGrund{FFFFFF}",SpielerName(pID));
    new Crimes[7][128];
    while(mysql_fetch_row(data,"|",mysql_save))
    {
    explode(Crimes,data,"|");
    format(longstr,sizeof(longstr),"%s\n%i WPS\t\t%s",longstr,strval(Crimes[2]),Crimes[3]);
    }
    mysql_free_result(mysql_save);
    ShowPlayerDialog(playerid,DIALOG_INFO,DIALOG_STYLE_MSGBOX,"Polizeicomputer",longstr,"OK","");
    return 1;
    }
    }
    return 1;
    }