Beiträge von Akizo

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

    Hey Community,


    Habe ein kleines Problem mit inputtext unter OnDialogResponse...


    Mein Code
    donate[playerid][dinput] = inputtext;


    Der string donate[playerid][dinput] ist 128 groß.
    und als Error bekomme ich folgendes:



    : error 047: array sizes do not match, or destination array is too small


    Ich hoffe mir kann dabei jemand helfen.


    MFG
    Mythen

    Ich denke mal das Master_FM das so meint:



    dcmd_admins(playerid,params[])
    {
    #pragma unused params


    new i = 0, aname[256], string[256];
    for(; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(Player[i][admin] >= 1)
    {
    GetPlayerName(i, aname, sizeof(aname));
    format(string, sizeof(string),"%s\n%s Level: %d", string, aname, Player[i][admin]);
    }
    }
    }
    ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_LIST,"Admin online Liste",string,"OK","Abbrechen");
    return 1;
    }


    Der Vorige String muss ja auch wieder eingefügt werden ;)

    Jetzt läuft eigentlich soweit alles einwand frei. Bis auf eine Sache <.<


    Ich habe jetzt oben

    new Text:DrawBox;
    new Text:DrawHInfo;
    new Text:DrawTrenn;
    new Text:DrawBesitzer;
    new Text:DrawPreis;
    new Text:DrawLevel;
    new Text:DrawCommand;


    dann

    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    for(new h = 0; h < sizeof(Property); h++)
    {
    if(pickupid == Property[h][hpickid])
    {


    new besitzer[1024],preis[256],drlevel[128],command[256];
    //Textdraw Haus Info Box Test
    DrawBox = TextDrawCreate(491.000000, 105.000000, "_");
    TextDrawBackgroundColor(DrawBox, 255);
    TextDrawFont(DrawBox, 1);
    TextDrawLetterSize(DrawBox, 0.239998, 8.399992);
    TextDrawColor(DrawBox, 16711935);
    TextDrawSetOutline(DrawBox, 1);
    TextDrawSetProportional(DrawBox, 1);
    TextDrawUseBox(DrawBox, 1);
    TextDrawBoxColor(DrawBox, 125);
    TextDrawTextSize(DrawBox, 611.000000, 770.000000);
    DrawHInfo = TextDrawCreate(491.000000, 105.000000, "Haus Info");
    TextDrawBackgroundColor(DrawHInfo, 255);
    TextDrawFont(DrawHInfo, 1);
    TextDrawLetterSize(DrawHInfo, 0.239999, 1.500002);
    TextDrawColor(DrawHInfo, 16711935);
    TextDrawSetOutline(DrawHInfo, 1);
    TextDrawSetProportional(DrawHInfo, 1);
    DrawTrenn = TextDrawCreate(490.000000, 113.000000, "------------------------------------");
    TextDrawBackgroundColor(DrawTrenn, 255);
    TextDrawFont(DrawTrenn, 1);
    TextDrawLetterSize(DrawTrenn, 0.239999, 1.500002);
    TextDrawColor(DrawTrenn, 16711935);
    TextDrawSetOutline(DrawTrenn, 0);
    TextDrawSetProportional(DrawTrenn, 1);
    TextDrawSetShadow(DrawTrenn, 0);
    if(Property[h][hOwned] == 1)
    {
    if(Property[h][hRentabil] == 0)
    {
    format(besitzer, sizeof(besitzer), "Besitzer: %s",Property[h][hOwner]);
    format(preis, sizeof(preis), "Nicht Mietbar");
    format(drlevel, sizeof(drlevel), "Level: %d",Property[h][hLevel]);
    format(command, sizeof(command), "");
    }
    else
    {
    format(besitzer, sizeof(besitzer), "Besitzer: %s",Property[h][hOwner]);
    format(preis, sizeof(preis), "Miete: $%d",Property[h][hRent]);
    format(drlevel, sizeof(drlevel), "Level: %d",Property[h][hLevel]);
    format(command, sizeof(command), "Benutze /rentroom");
    }
    }
    else
    {
    format(besitzer, sizeof(besitzer), "Besitzer: %s",Property[h][hOwner]);
    format(preis, sizeof(preis), "Preis: $%d",Property[h][hValue]);
    format(drlevel, sizeof(drlevel), "Level: %d",Property[h][hLevel]);
    format(command, sizeof(command), "Benutze /buyhouse");
    }
    DrawBesitzer = TextDrawCreate(491.000000, 124.000000, besitzer);
    TextDrawBackgroundColor(DrawBesitzer, 255);
    TextDrawFont(DrawBesitzer, 1);
    TextDrawLetterSize(DrawBesitzer, 0.239999, 1.500002);
    TextDrawColor(DrawBesitzer, -1);
    TextDrawSetOutline(DrawBesitzer, 1);
    TextDrawSetProportional(DrawBesitzer, 1);
    DrawPreis = TextDrawCreate(491.000000, 138.000000, preis);
    TextDrawBackgroundColor(DrawPreis, 255);
    TextDrawFont(DrawPreis, 1);
    TextDrawLetterSize(DrawPreis, 0.239999, 1.500002);
    TextDrawColor(DrawPreis, -1);
    TextDrawSetOutline(DrawPreis, 1);
    TextDrawSetProportional(DrawPreis, 1);
    DrawLevel = TextDrawCreate(491.000000, 152.000000, drlevel);
    TextDrawBackgroundColor(DrawLevel, 255);
    TextDrawFont(DrawLevel, 1);
    TextDrawLetterSize(DrawLevel, 0.239999, 1.500002);
    TextDrawColor(DrawLevel, -1);
    TextDrawSetOutline(DrawLevel, 1);
    TextDrawSetProportional(DrawLevel, 1);
    DrawCommand = TextDrawCreate(491.000000, 166.000000, command);
    TextDrawBackgroundColor(DrawCommand, 255);
    TextDrawFont(DrawCommand, 1);
    TextDrawLetterSize(DrawCommand, 0.239999, 1.500002);
    TextDrawColor(DrawCommand, -1);
    TextDrawSetOutline(DrawCommand, 1);
    TextDrawSetProportional(DrawCommand, 1);


    TextDrawShowForPlayer(playerid, DrawBox);
    TextDrawShowForPlayer(playerid, DrawHInfo);
    TextDrawShowForPlayer(playerid, DrawTrenn);
    TextDrawShowForPlayer(playerid, DrawBesitzer);
    TextDrawShowForPlayer(playerid, DrawPreis);
    TextDrawShowForPlayer(playerid, DrawLevel);
    TextDrawShowForPlayer(playerid, DrawCommand);
    SetTimerEx("HInfoAus", 3600, false, "d", playerid);
    }
    }
    return 1;
    }



    Dan noch direkt unter dem Public:

    forward HInfoAus(playerid);
    public HInfoAus(playerid)
    {
    TextDrawHideForPlayer(playerid, DrawBox);
    TextDrawHideForPlayer(playerid, DrawHInfo);
    TextDrawHideForPlayer(playerid, DrawTrenn);
    TextDrawHideForPlayer(playerid, DrawBesitzer);
    TextDrawHideForPlayer(playerid, DrawPreis);
    TextDrawHideForPlayer(playerid, DrawLevel);
    TextDrawHideForPlayer(playerid, DrawCommand);
    }



    Die Anzeige etc funktioniert alles perfekt.
    Bis man mit /Buyhouse ein Haus kauft. Bei /buyhouse wird nur der Owner soweit eingetragen.
    Dan wir man direkt ins Haus geportet. Noch läuft alles gut.
    Wenn man dann mit /hexit das haus verlässt. kommt man ja direkt ins Pickup vom Haus.
    Und dan wird kein TextDraw mehr angezeigt weil der Server ausgeht.
    Also sobald man nen Haus kauft. und irgendjemand dan in das Haus Pickup rein geht. Geht der Server aus.


    Weiß jemand wodrann das liegt?


    //Edit: Paar rechtschreib fehler behoben. ( Villeicht aber nicht alle ^^ )
    //Edit2: Weiß hier niemand wieso der ständig dan Abschmiert wenn man ins Pickup geht wenn das Haus gekauft wurde?
    //Edit3: Fehler Selbst gefunden, Doofheit muss echt weh tun :rolleyes:
    Fehler war hier:
    if(Property[h][hRentabil] == 0)
    {
    format(besitzer, sizeof(besitzer), "Besitzer: %s",Property[h][hOwner]);
    format(preis, sizeof(preis), "Nicht Mietbar");
    format(drlevel, sizeof(drlevel), "Level: %d",Property[h][hLevel]);
    format(command, sizeof(command), "");
    }


    format(command, sizeof(command),"");
    So leer es auch bleibt. Jedesmal stürtzt dan der server ab ;)
    Habe einfach jetzt so gemacht
    format(command, sizeof(command),"_");
    da ein _ beim Textdraw nicht als Text angezeigt wird, sondern unsichtbar ist.

    er hatte bereits ein Pickup drin.


    so sah es vorher bei ihm aus



    public OnPlayerPickUpPickup(playerid, pickupid)
    {


    //Hier war das erste Pick Up
    }
    {
    //Und hier das 2te
    }


    er hatte sogesehen also den Public geschlossen und wollte dan immanoch so nen PickUp machen ^^

    Habs jetzt Selbst raus mit dem TextDraw Editor ausm Englischen Forum.


    Jetzt mein 2tes Problem:


    Ich lasse die TextDraws anzeigen wenn man in ein Pickup Geht.
    Und wollte sie dan nach 10sek mit nem Timer wieder auschalten:


    forward HInfoAus();
    public HInfoAus()
    {
    TextDrawHideForPlayer(playerid, DrawBox);
    TextDrawHideForPlayer(playerid, DrawHInfo);
    TextDrawHideForPlayer(playerid, DrawTrenn);
    TextDrawHideForPlayer(playerid, DrawBesitzer);
    TextDrawHideForPlayer(playerid, DrawPreis);
    TextDrawHideForPlayer(playerid, DrawLevel);
    TextDrawHideForPlayer(playerid, DrawCommand);
    }


    SetTimer("HInfoAus", 5000, false);



    Errors:


    Die Error Zeilen sind die TextDrawHideForPlayer zeilen im Timer.


    Weiß da jemand eine Lösung?

    Hey Community,


    Könnte mir jemand nen Script teil geben wie man sowas hier machen kann?


    Am Besten wäre wenn es 5 Textdraw zeilen hätte und unter der Geld Anzeige angezeigt wird.
    Ich hoffe mir könnte da jemand helfen.


    MFG
    My
    then

    Sry das ich jetzt mal noch so nen Alten Thread hervorrufe.
    Aber ich habe eine Frage zum Tutorial
    Ich benutze den Include a_sampmysql.inc .
    Da ich keine lust habe alle System in meinem Script wieder um zu schreiben und gerne hiervon diesen befehl benutzen möchte:
    stock mysql_GetInt(Table[], Field[], Where[], Is[])
    {
    new query[128];
    mysql_real_escape_string(Table, Table);
    mysql_real_escape_string(Field, Field);
    mysql_real_escape_string(Where, Where);
    mysql_real_escape_string(Is, Is);
    format(query, 128, "SELECT %s FROM %s WHERE %s = '%s'", Field, Table, Where, Is);
    mysql_query(query);
    mysql_store_result();
    new sqlint = mysql_fetch_int();
    mysql_free_result();
    return sqlint;
    }


    Ich habe es einigermaßen an die sampmysql.inc angepasst undzwar so:
    stock mysql_GetInt(Table[], Field[], Where[], Is[])
    {
    new query[128];
    samp_mysql_real_escape_string(Table, Table);
    samp_mysql_real_escape_string(Field, Field);
    samp_mysql_real_escape_string(Where, Where);
    samp_mysql_real_escape_string(Is, Is);
    format(query, 128, "SELECT %s FROM %s WHERE %s = '%s'", Field, Table, Where, Is);
    samp_mysql_query(query);
    samp_mysql_store_result();
    new sqlint = samp_mysql_fetch_int();
    samp_mysql_free_result();
    return sqlint;
    }


    Doch ich bekomme dort
    new sqlint = samp_mysql_fetch_int();
    einen Fehler. Da es kein samp_mysql_fetch_int gibt.
    In a_sampmysql.inc gibt es nur samp_mysql_fetch_row aber dann bekomm ich den fehler das fehlehnde argumente gibt....


    Ich hoffe da kann mir jemand helfen.

    Hey Breadfish Community,


    Ich bin zurzeit dran ein Selfmade Roleplay Script am machen.
    Ich kommen eigentlich soweit ganz gut damit klar. Nur eins stört mich jetzt.
    Als Vorlage habe ich mir den Basis RP GameMode von BlackFox_UD_ genommen.
    Doch jetzt habe ich das Problem, seit dem ich bei OnGameModeInit die AddPlayerClasses rausgenommen habe.
    Und man dan Spawnt kommt folgendes:


    Gespawnt wird man so:
    OnPlayerRequestClass
    public OnPlayerRequestClass(playerid, classid)
    {
    SetTimerEx("Spawn",50,0,"i",playerid);
    return 1;
    }


    Der Timer:
    public Spawn(playerid)
    {
    SpawnPlayer(playerid);
    return 1;
    }


    OnPlayerSpawn
    public OnPlayerSpawn(playerid)
    {
    if(!player[playerid][eingeloggt])
    {
    SendClientMessage(playerid,ROT,"Du warst nicht eingeloggt! Verbinde noch einmal und versuche es erneut.");
    Kick(playerid);
    return 1;
    }
    if(player[playerid][team] > 0)
    {
    SetDataByTeam(playerid,player[playerid][team],player[playerid][rang]);
    }
    else
    {
    SetPlayerSkin(playerid,29);
    SetPlayerPos(playerid,666.3345,-549.3985,16.1493);
    }
    return 1;
    }


    Bei SetDataByTeam wird nur abgefragt welche Fraktion man ist und welcher Rang.
    Das Else ist für den Newbi Spawn.


    Ganz oben habe ich Natürlich forward Spawn(playerid); drin stehen.


    Ich hoffe das mir da jemand helfen kann.


    Mit Freundlichen Grüßen
    Mythen