Fehler ingame! Die Spieler können sich nicht untereinander sehen

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

  • Ist iwie aber mehr RP :D
    Im echten Leben sieht man auch nicht auf einen Blick wer alles "zuhause" ist ;)

    Nein man kann sich nicht das 2. mal im Server einloggen es sei den der Server wurde neugestartet. Und das darf nicht sein

    Wer PALWAL-Sternchen vergibt, bekommt aus Prinzip ein Like 😏


    @palwal Donald Trump ist einer der besten Präsidenten welche die USA je hatte, meine Meinung.

  • Poste mal das Callback (OnPlayerConnect?) mit dem du den Login Dialog anzeigen lässt.



    public OnPlayerConnect(playerid)
    {
    new query[128];
    RemoveObjects(playerid);

    PrisonText0[playerid] = TextDrawCreate(35.000000, 312.000000, "Du bist derzeit fuer noch");
    TextDrawBackgroundColor(PrisonText0[playerid], 255);
    TextDrawFont(PrisonText0[playerid], 1);
    TextDrawLetterSize(PrisonText0[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText0[playerid], -16776961);
    TextDrawSetOutline(PrisonText0[playerid], 0);
    TextDrawSetProportional(PrisonText0[playerid], 1);
    TextDrawSetShadow(PrisonText0[playerid], 1);


    PrisonText1[playerid] = TextDrawCreate(205.000000, 312.000000, "/ Minuten");
    TextDrawBackgroundColor(PrisonText1[playerid], 255);
    TextDrawFont(PrisonText1[playerid], 1);
    TextDrawLetterSize(PrisonText1[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText1[playerid], -16776961);
    TextDrawSetOutline(PrisonText1[playerid], 0);
    TextDrawSetProportional(PrisonText1[playerid], 1);
    TextDrawSetShadow(PrisonText1[playerid], 1);


    PrisonText2[playerid] = TextDrawCreate(292.000000, 313.000000, "im Prison wegen");
    TextDrawBackgroundColor(PrisonText2[playerid], 255);
    TextDrawFont(PrisonText2[playerid], 1);
    TextDrawLetterSize(PrisonText2[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText2[playerid], -16776961);
    TextDrawSetOutline(PrisonText2[playerid], 0);
    TextDrawSetProportional(PrisonText2[playerid], 1);
    TextDrawSetShadow(PrisonText2[playerid], 1);


    PrisonText3[playerid] = TextDrawCreate(407.000000, 313.000000, "/");
    TextDrawBackgroundColor(PrisonText3[playerid], 255);
    TextDrawFont(PrisonText3[playerid], 1);
    TextDrawLetterSize(PrisonText3[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText3[playerid], -16776961);
    TextDrawSetOutline(PrisonText3[playerid], 0);
    TextDrawSetProportional(PrisonText3[playerid], 1);
    TextDrawSetShadow(PrisonText3[playerid], 1);


    PrisonText4[playerid] = TextDrawCreate(35.000000, 300.000000, "Ausfuehrender Admin:");
    TextDrawBackgroundColor(PrisonText4[playerid], 255);
    TextDrawFont(PrisonText4[playerid], 1);
    TextDrawLetterSize(PrisonText4[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText4[playerid], -16776961);
    TextDrawSetOutline(PrisonText4[playerid], 0);
    TextDrawSetProportional(PrisonText4[playerid], 1);
    TextDrawSetShadow(PrisonText4[playerid], 1);


    PrisonText5[playerid] = TextDrawCreate(185.000000, 300.000000, "/");
    TextDrawBackgroundColor(PrisonText5[playerid], 255);
    TextDrawFont(PrisonText5[playerid], 1);
    TextDrawLetterSize(PrisonText5[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText5[playerid], -16776961);
    TextDrawSetOutline(PrisonText5[playerid], 0);
    TextDrawSetProportional(PrisonText5[playerid], 1);
    TextDrawSetShadow(PrisonText5[playerid], 1);

    //Loads
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,2797.1492,2608.1030,10.8258,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,63.1364,-74.9860,1001.5078,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,372.2674,-133.0091,1001.4922,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,8174,-24.6694,1000.6797,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-25.3030,-141.1886,1003.5469,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-1390.0854,2639.5400,-50.7298,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,365.0975,-11.5068,1001.8516,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,161.1964,-96.8135,1001.8047,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,460.5405,-88.7847,999.5547,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,316.7251,-170.2839,999.5938,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,227.2160,-7.8342,1002.2109,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,94.1271,1781.8829,-23.7572,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,2541.9011,-1303.9241,1025.0703,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,286.2747,-41.4266,1001.5156,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,501.5469,-67.8607,998.7578,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-25.9632,-187.8988,1003.5469,40.0);

    //ls mall
    RemoveBuildingForPlayer(playerid, 1283, 1073.1328, -1395.1094, 15.7813, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1082.1250, -1390.1172, 15.6406, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1112.6172, -1389.8672, 15.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1190.3047, -1389.8047, 15.5000, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1383.2734, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1350.4141, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1367.3828, 15.7734, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1216.5625, -1394.7109, 15.5469, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1320.8594, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1337.8359, 15.7734, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1299.7422, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1194.7969, -1290.8516, 15.7109, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1304.9688, 15.7734, 0.25);

    //Farm
    RemoveBuildingForPlayer(playerid, 13052, -69.0469, 86.8359, 2.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 3376, -96.0859, 3.1953, 6.6953, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -93.2266, -59.8906, 2.9297, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -108.0781, -58.5391, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.4141, -49.9844, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 12917, -99.9922, -40.3047, 1.9531, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -118.2891, -39.9219, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -118.2891, -39.9219, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -77.4609, -21.3203, 2.8906, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.6484, -28.9688, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.6484, -28.9688, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -67.6719, 2.0469, 2.8906, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -50.0156, 3.1797, 3.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 3375, -96.0859, 3.1953, 6.6953, 0.25);
    RemoveBuildingForPlayer(playerid, 12914, -75.1797, 12.1719, 3.7188, 0.25);
    RemoveBuildingForPlayer(playerid, 12918, -72.0391, 18.4453, 1.9531, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -94.5234, 31.6172, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -90.5313, 42.1484, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -81.8984, 56.8516, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -71.8359, 58.8750, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -92.8672, 58.3438, 3.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -91.9453, 47.8125, 3.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 12915, -69.0469, 86.8359, 2.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -41.2500, 98.4141, 3.4609, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -36.0156, 96.1875, 3.5703, 0.25);

    SetPlayerColor(playerid, 0xDCDCDCFF);
    format(SpielerInfo[playerid][pName], 32, "%s", GetName(playerid));
    format(query,sizeof(query),"SELECT `id` FROM `accounts` WHERE `name`='%s'",GetName(playerid));
    mysql_query(query);
    mysql_store_result();
    TogglePlayerSpectating(playerid, 1);
    new account;
    if(mysql_num_rows()!=0)
    {
    account = 1;
    }
    else {
    account = 0;
    }
    mysql_free_result();


    if(account == 1 && SpielerInfo[playerid][pLogged] == 0)
    {
    new string[880];
    PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
    PlayAudioStreamForPlayer(playerid, "http://www.ngl-roleplay.de/musik/loginmusik.mp3");
    format(string, sizeof(string), "Willkommen auf %s\n\nHier musst du dein Passwort eingeben.\n\n\n\nVergiss dein Passwort nicht, \nund achte darauf das keiner dein Passwort kennt.", SERVERNAME);
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{0087FF}Login", string, "Einloggen", "Abbrechen");
    }
    else if(account == 0 && SpielerInfo[playerid][pLogged] == 0)
    {
    PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
    PlayAudioStreamForPlayer(playerid, "http://www.ngl-roleplay.de/musik/loginmusik.mp3");
    ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Registration", "Du benötigst einen Account, um auf diesem Server zu spielen! \n\n Bitte suche dir ein neues Passwort aus!", "Registrieren", "Abbrechen");
    }
    timer[playerid] = SetTimerEx("Speedometer",1000, 1,"i",playerid);
    return 1;
    }

    Wer PALWAL-Sternchen vergibt, bekommt aus Prinzip ein Like 😏


    @palwal Donald Trump ist einer der besten Präsidenten welche die USA je hatte, meine Meinung.

  • Lass es mal so laufen und poste dann den Server Log, wenn der Dialog nicht angezeigt wird:
    Dies nennt sich Debugging.


    public OnPlayerConnect(playerid)
    {
    printf("OnPlayerConnect started for ID: %d", playerid);
    new query[128];
    RemoveObjects(playerid);


    PrisonText0[playerid] = TextDrawCreate(35.000000, 312.000000, "Du bist derzeit fuer noch");
    TextDrawBackgroundColor(PrisonText0[playerid], 255);
    TextDrawFont(PrisonText0[playerid], 1);
    TextDrawLetterSize(PrisonText0[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText0[playerid], -16776961);
    TextDrawSetOutline(PrisonText0[playerid], 0);
    TextDrawSetProportional(PrisonText0[playerid], 1);
    TextDrawSetShadow(PrisonText0[playerid], 1);


    printf("OPC 1 for ID: %d", playerid);
    PrisonText1[playerid] = TextDrawCreate(205.000000, 312.000000, "/ Minuten");
    TextDrawBackgroundColor(PrisonText1[playerid], 255);
    TextDrawFont(PrisonText1[playerid], 1);
    TextDrawLetterSize(PrisonText1[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText1[playerid], -16776961);
    TextDrawSetOutline(PrisonText1[playerid], 0);
    TextDrawSetProportional(PrisonText1[playerid], 1);
    TextDrawSetShadow(PrisonText1[playerid], 1);


    PrisonText2[playerid] = TextDrawCreate(292.000000, 313.000000, "im Prison wegen");
    TextDrawBackgroundColor(PrisonText2[playerid], 255);
    TextDrawFont(PrisonText2[playerid], 1);
    TextDrawLetterSize(PrisonText2[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText2[playerid], -16776961);
    TextDrawSetOutline(PrisonText2[playerid], 0);
    TextDrawSetProportional(PrisonText2[playerid], 1);
    TextDrawSetShadow(PrisonText2[playerid], 1);


    PrisonText3[playerid] = TextDrawCreate(407.000000, 313.000000, "/");
    TextDrawBackgroundColor(PrisonText3[playerid], 255);
    TextDrawFont(PrisonText3[playerid], 1);
    TextDrawLetterSize(PrisonText3[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText3[playerid], -16776961);
    TextDrawSetOutline(PrisonText3[playerid], 0);
    TextDrawSetProportional(PrisonText3[playerid], 1);
    TextDrawSetShadow(PrisonText3[playerid], 1);


    PrisonText4[playerid] = TextDrawCreate(35.000000, 300.000000, "Ausfuehrender Admin:");
    TextDrawBackgroundColor(PrisonText4[playerid], 255);
    TextDrawFont(PrisonText4[playerid], 1);
    TextDrawLetterSize(PrisonText4[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText4[playerid], -16776961);
    TextDrawSetOutline(PrisonText4[playerid], 0);
    TextDrawSetProportional(PrisonText4[playerid], 1);
    TextDrawSetShadow(PrisonText4[playerid], 1);


    printf("OPC 2 for ID: %d", playerid);
    PrisonText5[playerid] = TextDrawCreate(185.000000, 300.000000, "/");
    TextDrawBackgroundColor(PrisonText5[playerid], 255);
    TextDrawFont(PrisonText5[playerid], 1);
    TextDrawLetterSize(PrisonText5[playerid], 0.400000, 1.000000);
    TextDrawColor(PrisonText5[playerid], -16776961);
    TextDrawSetOutline(PrisonText5[playerid], 0);
    TextDrawSetProportional(PrisonText5[playerid], 1);
    TextDrawSetShadow(PrisonText5[playerid], 1);


    //Loads
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,2797.1492,2608.1030,10.8258,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,63.1364,-74.9860,1001.5078,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,372.2674,-133.0091,1001.4922,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,8174,-24.6694,1000.6797,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-25.3030,-141.1886,1003.5469,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-1390.0854,2639.5400,-50.7298,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,365.0975,-11.5068,1001.8516,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,161.1964,-96.8135,1001.8047,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,460.5405,-88.7847,999.5547,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,316.7251,-170.2839,999.5938,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,227.2160,-7.8342,1002.2109,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,94.1271,1781.8829,-23.7572,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,2541.9011,-1303.9241,1025.0703,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,286.2747,-41.4266,1001.5156,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,501.5469,-67.8607,998.7578,40.0);
    CreatePlayer3DTextLabel(playerid,"AUSGANG\nDrücke Enter",0xFFFF00FF,-25.9632,-187.8988,1003.5469,40.0);


    printf("OPC 3 for ID: %d", playerid);
    //ls mall
    RemoveBuildingForPlayer(playerid, 1283, 1073.1328, -1395.1094, 15.7813, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1082.1250, -1390.1172, 15.6406, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1112.6172, -1389.8672, 15.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1190.3047, -1389.8047, 15.5000, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1383.2734, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1350.4141, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1367.3828, 15.7734, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1216.5625, -1394.7109, 15.5469, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1320.8594, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1337.8359, 15.7734, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1299.7422, 15.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 1283, 1194.7969, -1290.8516, 15.7109, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1304.9688, 15.7734, 0.25);


    //Farm
    RemoveBuildingForPlayer(playerid, 13052, -69.0469, 86.8359, 2.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 3376, -96.0859, 3.1953, 6.6953, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -93.2266, -59.8906, 2.9297, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -108.0781, -58.5391, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.4141, -49.9844, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 12917, -99.9922, -40.3047, 1.9531, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -118.2891, -39.9219, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -118.2891, -39.9219, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -77.4609, -21.3203, 2.8906, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.6484, -28.9688, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -115.6484, -28.9688, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -67.6719, 2.0469, 2.8906, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -50.0156, 3.1797, 3.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 3375, -96.0859, 3.1953, 6.6953, 0.25);
    RemoveBuildingForPlayer(playerid, 12914, -75.1797, 12.1719, 3.7188, 0.25);
    RemoveBuildingForPlayer(playerid, 12918, -72.0391, 18.4453, 1.9531, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -94.5234, 31.6172, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -90.5313, 42.1484, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -81.8984, 56.8516, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3276, -71.8359, 58.8750, 2.8828, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -92.8672, 58.3438, 3.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -91.9453, 47.8125, 3.5703, 0.25);
    RemoveBuildingForPlayer(playerid, 12915, -69.0469, 86.8359, 2.1094, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -41.2500, 98.4141, 3.4609, 0.25);
    RemoveBuildingForPlayer(playerid, 3374, -36.0156, 96.1875, 3.5703, 0.25);


    printf("OPC 4 for ID: %d", playerid);
    SetPlayerColor(playerid, 0xDCDCDCFF);
    format(SpielerInfo[playerid][pName], 32, "%s", GetName(playerid));
    format(query,sizeof(query),"SELECT `id` FROM `accounts` WHERE `name`='%s'",GetName(playerid));
    mysql_query(query);
    mysql_store_result();
    TogglePlayerSpectating(playerid, 1);
    printf("OPC 5 for ID: %d", playerid);
    new account;
    if(mysql_num_rows()!=0)
    {
    account = 1;
    }
    else {
    account = 0;
    }
    mysql_free_result();


    printf("OPC 6 for ID: %d", playerid);
    if(account == 1 && SpielerInfo[playerid][pLogged] == 0)
    {
    printf("OPC 7 for ID: %d", playerid);
    new string[880];
    PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
    PlayAudioStreamForPlayer(playerid, "http://www.ngl-roleplay.de/musik/loginmusik.mp3");
    printf("OPC 8 for ID: %d", playerid);
    format(string, sizeof(string), "Willkommen auf %s\n\nHier musst du dein Passwort eingeben.\n\n\n\nVergiss dein Passwort nicht, \nund achte darauf das keiner dein Passwort kennt.", SERVERNAME);
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{0087FF}Login", string, "Einloggen", "Abbrechen");
    }
    else if(account == 0 && SpielerInfo[playerid][pLogged] == 0)
    {
    printf("OPC 9 for ID: %d", playerid);
    PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
    PlayAudioStreamForPlayer(playerid, "http://www.ngl-roleplay.de/musik/loginmusik.mp3");
    printf("OPC 10 for ID: %d", playerid);
    ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Registration", "Du benötigst einen Account, um auf diesem Server zu spielen! \n\n Bitte suche dir ein neues Passwort aus!", "Registrieren", "Abbrechen");
    }
    printf("OPC 11 for ID: %d", playerid);
    timer[playerid] = SetTimerEx("Speedometer",1000, 1,"i",playerid);
    printf("OPC ended for ID: %d", playerid);
    return 1;
    }