Connecten Dauert Lange

In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
  • Hier ist mein Code Jeffry:
    und meine frage wann sollte ich PlayerTextDraw verwenden und wann sollte ich ganz normale verwenden ?


    public OnPlayerConnect(playerid)
    {
    new string[128];
    format(string,sizeof(string),"Tüv: Ja");
    convert_encoding(string);
    GameTextForAll(string,5000,4);
    Textdraw7[playerid] = CreatePlayerTextDraw(playerid, 227.600082, 202.595504, string);
    PlayerTextDrawLetterSize(playerid, Textdraw7[playerid], 0.223996, 1.261510);
    PlayerTextDrawAlignment(playerid, Textdraw7[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw7[playerid], -1061109505);
    PlayerTextDrawSetShadow(playerid, Textdraw7[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw7[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw7[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw7[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Textdraw7[playerid], 1);



    Login[playerid] = CreatePlayerTextDraw(playerid,249.000000, 141.000000, "Login/Registrieren");
    PlayerTextDrawBackgroundColor(playerid,Login[playerid], 255);
    PlayerTextDrawFont(playerid,Login[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Login[playerid], 0.500000, 1.300000);
    PlayerTextDrawTextSize(playerid, Login[playerid], 390.000000, 10.000000);
    PlayerTextDrawColor(playerid,Login[playerid], 16711935);
    PlayerTextDrawSetOutline(playerid,Login[playerid], 0);
    PlayerTextDrawSetProportional(playerid,Login[playerid], 1);
    PlayerTextDrawSetShadow(playerid,Login[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,Login[playerid], 0);


    Informationen[playerid] = CreatePlayerTextDraw(playerid,260.000000, 180.000000, "Informationen");
    PlayerTextDrawBackgroundColor(playerid,Informationen[playerid], 255);
    PlayerTextDrawFont(playerid,Informationen[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Informationen[playerid], 0.500000, 1.300000);
    PlayerTextDrawTextSize(playerid, Informationen[playerid], 375.000000, 10.000000);
    PlayerTextDrawColor(playerid,Informationen[playerid], 16711935);
    PlayerTextDrawSetOutline(playerid,Informationen[playerid], 0);
    PlayerTextDrawSetProportional(playerid,Informationen[playerid], 1);
    PlayerTextDrawSetShadow(playerid,Informationen[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,Informationen[playerid], 0);


    Verlassen[playerid] = CreatePlayerTextDraw(playerid,277.000000, 222.000000, "Verlassen");
    PlayerTextDrawBackgroundColor(playerid,Verlassen[playerid], 255);
    PlayerTextDrawFont(playerid,Verlassen[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Verlassen[playerid], 0.500000, 1.300000);
    PlayerTextDrawTextSize(playerid, Verlassen[playerid], 350.0, 10.0);
    PlayerTextDrawColor(playerid,Verlassen[playerid], 16711935);
    PlayerTextDrawSetOutline(playerid,Verlassen[playerid], 0);
    PlayerTextDrawSetProportional(playerid,Verlassen[playerid], 1);
    PlayerTextDrawSetShadow(playerid,Verlassen[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,Verlassen[playerid], 0);


    PlayerTextDrawSetSelectable(playerid,Login[playerid],1);
    PlayerTextDrawSetSelectable(playerid,Informationen[playerid],1);
    PlayerTextDrawSetSelectable(playerid,Verlassen[playerid],1);
    SelectTextDraw(playerid,0x33CCFFAA);


    TextDrawShowForPlayer(playerid,connect1);
    TextDrawShowForPlayer(playerid,connect2);
    TextDrawShowForPlayer(playerid,connect3);
    TextDrawShowForPlayer(playerid,connect4);
    TextDrawShowForPlayer(playerid,connect5);
    TextDrawShowForPlayer(playerid,connect6);
    TextDrawShowForPlayer(playerid,connect7);
    TextDrawShowForPlayer(playerid,connect8);
    TextDrawShowForPlayer(playerid,connect9);
    TextDrawShowForPlayer(playerid,connect10);
    PlayerTextDrawShow(playerid,Login[playerid]);
    PlayerTextDrawShow(playerid,Informationen[playerid]);
    PlayerTextDrawShow(playerid,Verlassen[playerid]);
    ad[playerid] = 0;

    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");
    SendClientMessage(playerid, weiß, " ");


    format(string, sizeof(string), "[Login] %s [%i] hat den Server betreten!", getPlayerName(playerid), playerid);
    SendAdminMessage(NEON_GRÜN, string);
    printf("Der Spieler %s hat den Server Betreten!)",getPlayerName(playerid));


    TogglePlayerSpectating(playerid, 1);

    Tacho[playerid][besitz] = CreatePlayerTextDraw(playerid,505.000000, 336.000000, "xSnake");
    PlayerTextDrawBackgroundColor(playerid,Tacho[playerid][besitz], 255);
    PlayerTextDrawFont(playerid,Tacho[playerid][besitz], 2);
    PlayerTextDrawLetterSize(playerid,Tacho[playerid][besitz], 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Tacho[playerid][besitz], -1);
    PlayerTextDrawSetOutline(playerid,Tacho[playerid][besitz], 1);
    PlayerTextDrawSetProportional(playerid,Tacho[playerid][besitz], 0);
    PlayerTextDrawUseBox(playerid,Tacho[playerid][besitz], 1);
    PlayerTextDrawBoxColor(playerid,Tacho[playerid][besitz], 115);
    PlayerTextDrawTextSize(playerid,Tacho[playerid][besitz], 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Tacho[playerid][besitz], 0);


    Tacho[playerid][Name] = CreatePlayerTextDraw(playerid,505.000000, 353.000000, "Winsor");
    PlayerTextDrawBackgroundColor(playerid,Tacho[playerid][Name], 255);
    PlayerTextDrawFont(playerid,Tacho[playerid][Name], 2);
    PlayerTextDrawLetterSize(playerid,Tacho[playerid][Name], 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Tacho[playerid][Name], -16776961);
    PlayerTextDrawSetOutline(playerid,Tacho[playerid][Name], 1);
    PlayerTextDrawSetProportional(playerid,Tacho[playerid][Name], 1);
    PlayerTextDrawUseBox(playerid,Tacho[playerid][Name], 1);
    PlayerTextDrawBoxColor(playerid,Tacho[playerid][Name], 115);
    PlayerTextDrawTextSize(playerid,Tacho[playerid][Name], 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Tacho[playerid][Name], 0);


    Tacho[playerid][Speed] = CreatePlayerTextDraw(playerid,505.000000, 369.000000, "Speed: KM/H");
    PlayerTextDrawBackgroundColor(playerid,Tacho[playerid][Speed], 255);
    PlayerTextDrawFont(playerid,Tacho[playerid][Speed], 2);
    PlayerTextDrawLetterSize(playerid,Tacho[playerid][Speed], 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Tacho[playerid][Speed], -1);
    PlayerTextDrawSetOutline(playerid,Tacho[playerid][Speed], 1);
    PlayerTextDrawSetProportional(playerid,Tacho[playerid][Speed], 1);
    PlayerTextDrawUseBox(playerid,Tacho[playerid][Speed], 1);
    PlayerTextDrawBoxColor(playerid,Tacho[playerid][Speed], 115);
    PlayerTextDrawTextSize(playerid,Tacho[playerid][Speed], 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Tacho[playerid][Speed], 0);


    Tacho[playerid][Zustand] = CreatePlayerTextDraw(playerid,505.000000, 401.000000, "Zustand:");
    PlayerTextDrawBackgroundColor(playerid,Tacho[playerid][Zustand], 255);
    PlayerTextDrawFont(playerid,Tacho[playerid][Zustand], 2);
    PlayerTextDrawLetterSize(playerid,Tacho[playerid][Zustand], 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Tacho[playerid][Zustand], -1);
    PlayerTextDrawSetOutline(playerid,Tacho[playerid][Zustand], 1);
    PlayerTextDrawSetProportional(playerid,Tacho[playerid][Zustand], 1);
    PlayerTextDrawUseBox(playerid,Tacho[playerid][Zustand], 1);
    PlayerTextDrawBoxColor(playerid,Tacho[playerid][Zustand], 115);
    PlayerTextDrawTextSize(playerid,Tacho[playerid][Zustand], 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Tacho[playerid][Zustand], 0);


    /*Textdraw4 = CreatePlayerTextDraw(playerid,505.000000, 417.000000, "Kilometer");
    PlayerTextDrawBackgroundColor(playerid,Textdraw4, 255);
    PlayerTextDrawFont(playerid,Textdraw4, 2);
    PlayerTextDrawLetterSize(playerid,Textdraw4, 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Textdraw4, -1);
    PlayerTextDrawSetOutline(playerid,Textdraw4, 1);
    PlayerTextDrawSetProportional(playerid,Textdraw4, 1);
    PlayerTextDrawUseBox(playerid,Textdraw4, 1);
    PlayerTextDrawBoxColor(playerid,Textdraw4, 136);
    PlayerTextDrawTextSize(playerid,Textdraw4, 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Textdraw4, 0);*/


    Tacho[playerid][ptank] = CreatePlayerTextDraw(playerid,505.000000, 385.000000, "Tank");
    PlayerTextDrawBackgroundColor(playerid,Tacho[playerid][ptank], 255);
    PlayerTextDrawFont(playerid,Tacho[playerid][ptank], 2);
    PlayerTextDrawLetterSize(playerid,Tacho[playerid][ptank], 0.250000, 1.000000);
    PlayerTextDrawColor(playerid,Tacho[playerid][ptank], -1);
    PlayerTextDrawSetOutline(playerid,Tacho[playerid][ptank], 1);
    PlayerTextDrawSetProportional(playerid,Tacho[playerid][ptank], 1);
    PlayerTextDrawUseBox(playerid,Tacho[playerid][ptank], 1);
    PlayerTextDrawBoxColor(playerid,Tacho[playerid][ptank], 115);
    PlayerTextDrawTextSize(playerid,Tacho[playerid][ptank], 631.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Tacho[playerid][ptank], 0);


    Job[playerid] = CreatePlayerTextDraw(playerid,515.000000, 210.500000, "Packete Eingelagert %d/10");
    PlayerTextDrawBackgroundColor(playerid,Job[playerid], 255);
    PlayerTextDrawFont(playerid,Job[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Job[playerid], 0.259999, 1.100000);
    PlayerTextDrawColor(playerid,Job[playerid], -65281);
    PlayerTextDrawSetOutline(playerid,Job[playerid], 0);
    PlayerTextDrawSetProportional(playerid,Job[playerid], 1);
    PlayerTextDrawSetShadow(playerid,Job[playerid], 1);
    PlayerTextDrawUseBox(playerid,Job[playerid], 1);
    PlayerTextDrawBoxColor(playerid,Job[playerid], 0x00000077);
    PlayerTextDrawTextSize(playerid,Job[playerid], 630.000000, 230.000000);
    PlayerTextDrawSetSelectable(playerid,Job[playerid], 1);


    Job1[playerid] = CreatePlayerTextDraw(playerid,515.000000, 198.000000, "Postbote");
    PlayerTextDrawBackgroundColor(playerid,Job1[playerid], 255);
    PlayerTextDrawFont(playerid,Job1[playerid], 1);
    PlayerTextDrawLetterSize(playerid,Job1[playerid], 0.370000, 0.899999);
    PlayerTextDrawColor(playerid,Job1[playerid], -16776961);
    PlayerTextDrawSetOutline(playerid,Job1[playerid], 0);
    PlayerTextDrawSetProportional(playerid,Job1[playerid], 1);
    PlayerTextDrawSetShadow(playerid,Job1[playerid], 1);
    PlayerTextDrawUseBox(playerid,Job1[playerid], 1);
    PlayerTextDrawBoxColor(playerid,Job1[playerid], 0x000000FF);
    PlayerTextDrawTextSize(playerid,Job1[playerid], 630.000000, 0.000000);
    PlayerTextDrawSetSelectable(playerid,Job1[playerid], 0);


    TextDrawShowForAll(nameLabel);
    TextDrawShowForAll(versionLabel);
    return SetTimerEx("TachoUpdate", 50, true, "i", playerid);
    }

  • Wie meinst du das mit "Connecten dauert zu lange"?


    Mach aus:


    return SetTimerEx("TachoUpdate", 50, true, "i", playerid);


    return 1;


    Und starte und ggf. kille den Timer bei OnPlayerStateChange.
    Zudem würde ich die Timer Zeit auf 1000 stellen, 50 ist schon extrem :D

  • Es ist so das ich Auf dem Server Komme dann kommt das


    [14:02:11] {FFFFFF}SA-MP {B9C9BF}0.3.7 {FFFFFF}Started
    [14:02:11] Connecting to 127.0.0.1...


    und dann dauert das sehr Lange bis meine Textdraw's angezeigt werden und dann wenn sie angezeigt werden dann dauert es nochmal 2-3 Sec bis das kommt
    [14:02:16] Connected. Joining the game...


    und dann ich die dann Anklicken kann

  • Ja habe ich


    [14:28:34] {FFFFFF}SA-MP {B9C9BF}0.3.7 {FFFFFF}Started
    [14:28:37] Connecting to 127.0.0.1:7777...
    [14:28:38] Connected. Joining the game...
    //Die Zeit Hier Zwischen es Dauert immer sehr Lange aber wieso ?
    [14:28:44] Connected to {B9C9BF}Red-Game0v3r-Reallife

  • Das ist dafür wenn jemand z.b /spawn macht und der Spieler Tot das der Spieler wieder aufm Friedhof und ist wenn er stirbt es dann auch dort ist


    public OnPlayerRequestClass(playerid, classid)
    {
    if(sInfo[playerid][PTot] == 1)
    {
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"Du bist soeben gestorben!");
    SendClientMessage(playerid,weiß,"Gleich wird ein Wunder passieren!");
    SetTimer("sekunde",sInfo[playerid][tott],0);
    SetPlayerVirtualWorld(playerid,89);
    SetPlayerPos(playerid,816.6987,-1103.0229,25.7914);
    }
    if(sInfo[playerid][jailtime] > 0)
    {
    SendClientMessage(playerid,IGELB,"Du musst deine Zeit im Knast noch absitzen!");
    SetTimer("sekunde",sInfo[playerid][jailtime],0);
    SetPlayerInterior(playerid,10);
    SetPlayerVirtualWorld(playerid,24);
    SetPlayerPos(playerid,sInfo[playerid][kx],sInfo[playerid][ky],sInfo[playerid][kz]);
    }
    else
    {
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SpawnPlayer(playerid);
    }
    return 1;
    }

  • dann haste schon wieder viel mehr Platz.


    Der Platz in der .pwn ist nebensache.


    Es ist schneller Code direkt auszuführen als über schleifen...in diesem Fall sollte er es so lassen, da das schneller ist ;)


    mfg. :thumbup:

    ast2ufdyxkb1.png


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. :S

  • Beitrag von reaL. ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.