Beiträge von Maho

    //EDIT komme nicht mehr weiter query empty was heißt das ?


    [19:57:58] [ERROR] error #1065 while executing query "": Query was empty
    [19:57:58] [ERROR] error #1065 while executing query "": Query was empty
    [19:57:58] [ERROR] error #1065 while executing query "": Query was empty

    Da kamst du mit den Klammern durcheinander, mach es mal so:

    Ja hast recht, Danke :D


    Aber jetzt hab ich noch ein problem sobald ich geld einzahle und es mit EINZAHLEN bestätige crasht der server.



    ----------
    Loaded log file: "server_log.txt".
    ----------



    SA-MP Dedicated Server
    ----------------------
    v0.3.7-R2, (C)2005-2015 SA-MP Team



    [00:30:34] filterscripts = "" (string)
    [00:30:34]
    [00:30:34] Server Plugins
    [00:30:34] --------------
    [00:30:34] Loading plugin: crashdetect
    [00:30:34] CrashDetect plugin 4.19.4
    [00:30:34] Loaded.
    [00:30:34] Loading plugin: sscanf
    [00:30:34]



    [00:30:34] ===============================



    [00:30:34] sscanf plugin loaded.



    [00:30:34] Version: 2.8.3



    [00:30:34] (c) 2018 Alex "Y_Less" Cole



    [00:30:34] ===============================



    [00:30:34] Loaded.
    [00:30:34] Loading plugin: streamer
    [00:30:34]



    *** Streamer Plugin v2.9.4 by Incognito loaded ***



    [00:30:34] Loaded.
    [00:30:34] Loading plugin: mysql
    [00:30:34] >> plugin.mysql: R41-4 successfully loaded.
    [00:30:34] Loaded.
    [00:30:34] Loaded 4 plugins.



    [00:30:34]
    [00:30:34] Filterscripts
    [00:30:34] ---------------
    [00:30:34] Loaded 0 filterscripts.



    [00:30:34] [MySQL] Verbindungsaufbau...
    [00:30:34] [MySQL] Die Verbindung zur Datenbank wurde erfolgreich hergestellt! Handle: 1
    [00:30:34] Server Einstellungen werden Geladen.
    [00:30:34] Server Einstellungen wurden Geladen.
    [00:30:34] ========================================
    [00:30:34] Selfmade Script (c) by iTsRooT
    [00:30:34] Createt 25.07.2019
    [00:30:34] ========================================
    [00:30:34] Number of vehicle models: 0
    [00:30:34] MYSQL: Server Infomationen werden Geladen.
    [00:30:34] MYSQL: Server Infomationen wurden Geladen.
    [00:30:34] MYSQL: Fraktionen werden Geladen.
    [00:30:34] MYSQL: Fraktionen wurden Geladen.
    [00:30:39] [connection] 127.0.0.1:49716 requests connection cookie.
    [00:30:40] [connection] incoming connection: 127.0.0.1:49716 id: 0
    [00:30:40] [join] RooT has joined the server (0:127.0.0.1)
    [00:30:57] [debug] Server crashed while executing selfmade.amx
    [00:30:57] [debug] AMX backtrace:
    [00:30:57] [debug] #0 native strval () in samp-server.exe
    [00:30:57] [debug] #1 00008a18 in public OnDialogResponse (0, 17, 1, -1, 375868) in selfmade.amx
    [00:30:58] [debug] Native backtrace:
    [00:30:58] [debug] #0 0040335f in ?? () in samp-server.exe
    [00:30:58] [debug] #1 0019f648 in ?? ()
    [00:30:58] [debug] #2 68fa5c7a in ?? () in plugins\crashdetect.DLL
    [00:30:58] [debug] #3 004010b6 in ?? () in samp-server.exe
    [00:30:58] [debug] #4 68fb92dc in ?? () in plugins\crashdetect.DLL
    [00:30:58] [debug] Registers:
    [00:30:58] [debug] EAX: 00000000 EBX: 00000032 ECX: 0019f618 EDX: 00000000
    [00:30:58] [debug] ESI: 00000000 EDI: 02a3ada8 EBP: 00000000 ESP: 0019f660
    [00:30:58] [debug] EIP: 68fb92dc EFLAGS: 00010293
    [00:30:58] [debug] Stack:
    [00:30:58] [debug] ESP+00000000: 02a3ada8 0000000a 0019f7f4 02c65eec
    [00:30:58] [debug] ESP+00000020: 00008744 02a3ada8 00000000 0005fc18
    [00:30:58] [debug] ESP+00000040: 00000009 0019f7a0 00000000 00825348
    [00:30:58] [debug] ESP+00000060: 00000009 00000000 00000000 00822679
    [00:30:58] [debug] ESP+00000080: 0019f6f8 777af22b 65fbbc10 65f60000
    [00:30:58] [debug] ESP+000000a0: 65f60000 00000015 65fbbc8c 777d3de7
    [00:30:58] [debug] ESP+000000c0: 656a976c 0000ffff 00000000 02a3ada8
    [00:30:58] [debug] ESP+000000e0: 00000000 0019f7f4 02c65eec 00000000
    [00:30:58] [debug] ESP+00000100: 00000000 0005fc18 02a3ada8 02bf1d54
    [00:30:58] [debug] ESP+00000120: 0019f794 68fbdc92 0000000a 0019f7f4
    [00:30:58] [debug] ESP+00000140: 0000000a 0019f7f4 02c65eec 00000002
    [00:30:58] [debug] ESP+00000160: 007c7700 02a3ada8 00000000 02be933c
    [00:30:58] [debug] ESP+00000180: 0005fc18 001e8480 0005fc10 0019f850
    [00:30:58] [debug] ESP+000001a0: 00000002 02a3ada8 00000005 65fb3610
    [00:30:58] [debug] ESP+000001c0: 00000000 00000000 02a3ada8 00000001
    [00:30:58] [debug] ESP+000001e0: 0019f854 68fb7df6 0019f850 007c6a40
    [00:30:58] [debug] ESP+00000200: 02a3ada8 0019f884 65f63484 02a3ada8
    [00:30:58] [debug] ESP+00000220: 00000000 0019fb4c 0046ec31 00000000
    [00:30:58] [debug] ESP+00000240: 02a3ada8 00000011 02a3ada8 00000001
    [00:30:58] [debug] ESP+00000260: 0019f8dc 0019fa30 02c61f18 00000000
    [00:30:58] [debug] ESP+00000280: 00493912 00000002 00000011 00000001
    [00:30:58] [debug] ESP+000002a0: 0241d901 0019f918 01010001 0019ffff
    [00:30:58] [debug] ESP+000002c0: 00000038 0019fb58 00700000 00610064
    [00:30:58] [debug] ESP+000002e0: 65f60000 00822738 65f60110 01f60000
    [00:30:58] [debug] ESP+00000300: 00822738 00000011 0019f998 7777c6fa
    [00:30:58] [debug] ESP+00000320: 0080af80 0019fa78 00000000 00000050
    [00:30:58] [debug] ESP+00000340: 00000000 0019fa78 00000009 0080af80
    [00:30:58] [debug] ESP+00000360: 00000000 00822738 02a3ada8 0080af80
    [00:30:58] [debug] ESP+00000380: 0080cab0 00000000 00000000 00000000
    [00:30:58] [debug] ESP+000003a0: 00000001 00000000 00000000 00000000
    [00:30:58] [debug] ESP+000003c0: 646c6547 656a9994 6c68617a 656a9a14
    [00:30:58] [debug] ESP+000003e0: 00000000 00000000 00000000 00000000
    [00:30:58] [debug] Loaded modules:
    [00:30:58] [debug] 00400000 - 00519000 samp-server.exe
    [00:30:58] [debug] 77750000 - 778ec000 ntdll.dll
    [00:30:58] [debug] 759a0000 - 75a80000 KERNEL32.DLL
    [00:30:58] [debug] 757a0000 - 7599a000 KERNELBASE.dll
    [00:30:58] [debug] 76740000 - 76c91000 SHELL32.dll
    [00:30:58] [debug] 75500000 - 755c0000 msvcrt.dll
    [00:30:58] [debug] 750a0000 - 750db000 cfgmgr32.dll
    [00:30:58] [debug] 75200000 - 75322000 ucrtbase.dll
    [00:30:58] [debug] 776b0000 - 77739000 shcore.dll
    [00:30:58] [debug] 74f00000 - 74fbf000 RPCRT4.dll
    [00:30:58] [debug] 74db0000 - 74dd0000 SspiCli.dll
    [00:30:58] [debug] 74da0000 - 74daa000 CRYPTBASE.dll
    [00:30:58] [debug] 74fc0000 - 75022000 bcryptPrimitives.dll
    [00:30:58] [debug] 755c0000 - 75639000 sechost.dll
    [00:30:58] [debug] 75a80000 - 75cf8000 combase.dll
    [00:30:58] [debug] 770b0000 - 776ac000 windows.storage.dll
    [00:30:58] [debug] 77030000 - 770b0000 msvcp_win.dll
    [00:30:58] [debug] 76560000 - 765de000 advapi32.dll
    [00:30:58] [debug] 77010000 - 7702c000 profapi.dll
    [00:30:58] [debug] 76020000 - 76074000 powrprof.dll
    [00:30:58] [debug] 76510000 - 76554000 shlwapi.dll
    [00:30:58] [debug] 76090000 - 760b3000 GDI32.dll
    [00:30:58] [debug] 75390000 - 754f6000 gdi32full.dll
    [00:30:58] [debug] 76ca0000 - 76e39000 USER32.dll
    [00:30:58] [debug] 75330000 - 75347000 win32u.dll
    [00:30:58] [debug] 751c0000 - 751cf000 kernel.appcore.dll
    [00:30:58] [debug] 75370000 - 75382000 cryptsp.dll
    [00:30:58] [debug] 746c0000 - 746e4000 WINMM.dll
    [00:30:58] [debug] 73160000 - 73168000 WSOCK32.dll
    [00:30:58] [debug] 74690000 - 746b3000 WINMMBASE.dll
    [00:30:58] [debug] 75640000 - 7569f000 WS2_32.dll
    [00:30:58] [debug] 751d0000 - 751f5000 IMM32.DLL
    [00:30:58] [debug] 68fa0000 - 68ff1000 crashdetect.DLL
    [00:30:58] [debug] 68ee0000 - 68f9f000 MSVCR100.dll
    [00:30:58] [debug] 65fd0000 - 66039000 MSVCP100.dll
    [00:30:58] [debug] 10000000 - 1000e000 sscanf.DLL
    [00:30:58] [debug] 6e490000 - 6e4a3000 VCRUNTIME140.dll
    [00:30:58] [debug] 65f60000 - 65fc7000 streamer.DLL
    [00:30:58] [debug] 5ec20000 - 5ec8e000 MSVCP140.dll
    [00:30:58] [debug] 66ce0000 - 66d2e000 mysql.DLL
    [00:30:58] [debug] 65e80000 - 65e9a000 log-core.dll
    [00:30:58] [debug] 5e5e0000 - 5e6ad000 libmariadb.dll
    [00:30:58] [debug] 76e50000 - 76fe9000 CRYPT32.dll
    [00:30:58] [debug] 75030000 - 7503e000 MSASN1.dll
    [00:30:58] [debug] 73190000 - 7319a000 Secur32.dll
    [00:30:58] [debug] 739d0000 - 739e1000 napinsp.dll
    [00:30:58] [debug] 739b0000 - 739c6000 pnrpnsp.dll
    [00:30:58] [debug] 73960000 - 73970000 wshbth.dll
    [00:30:58] [debug] 73840000 - 73856000 NLAapi.dll
    [00:30:58] [debug] 74930000 - 74963000 IPHLPAPI.DLL
    [00:30:58] [debug] 73f60000 - 73fb2000 mswsock.dll
    [00:30:58] [debug] 73860000 - 738f0000 DNSAPI.dll
    [00:30:58] [debug] 76080000 - 76087000 NSI.dll
    [00:30:58] [debug] 73780000 - 7378b000 winrnr.dll
    [00:30:58] [debug] 73810000 - 73831000 mdnsNSP.dll
    [00:30:58] [debug] 73800000 - 73808000 rasadhlp.dll
    [00:30:58] [debug] 736d0000 - 73721000 fwpuclnt.dll
    [00:30:58] [debug] 76ff0000 - 77009000 bcrypt.dll

    Ich gebe im Dialog eine zahl ein habe zu test 1000 genommen doch mir wird tzdm angezeigt "Der betrag muss eine ZAHL sein!"."
    Ich habe mich bissen infomiert und habe herrausgefunden das "inputtext" ein string ist wie mache ich das zu zu einem intiger?


    if(dialogid == DIALOG_FRAKBANK_GELDEIN)
    {
    if(response)
    {
    if(IsNumeric(inputtext)) return SCM(playerid,ROT,"Der betrag muss eine ZAHL sein!");
    {
    if(strval(inputtext)<1||strval(inputtext)>500000) return SCM(playerid,ROT,"Der betrag muss zwischen 0 - 500.000$ sein!");
    if(GetPlayerMoney(playerid) < strval(inputtext))return SCM(playerid,ROT,"Du hast nicht soviel Geld!");
    GivePlayerMoney(playerid, strval(-inputtext));
    new fID = PlayerInfo[playerid][pFraktion];
    FrakInfo[fID][geld] += strval(inputtext);
    }
    }
    else
    {
    SCM(playerid,ROT,"Vorgang Abgebrochen");
    }
    return 1;
    }

    //EDIT

    Wie sieht die Variable/Funktion denn aus?

    was genau brauchst du ?





    enum fDataEnum
    {
    fraksql,
    frakname[50],
    frakfarbe[25],
    interior,
    vwelt,
    Float:sposx,
    Float:sposy,
    Float:sposz,
    Float:sposa,
    Float:aposx,
    Float:aposy,
    Float:aposz,
    Float:eposx,
    Float:eposy,
    Float:eposz,
    frakrank1[25],
    frakrank2[25],
    frakrank3[25],
    frakrank4[25],
    frakrank5[25],
    frakrank6[25],
    };
    new FrakInfo[MAX_FRAKTIONEN][fDataEnum];



    forward LoadFrakInfo();
    public LoadFrakInfo()
    {
    new rows;
    cache_get_row_count(rows);
    print("MYSQL: Fraktionen werden Geladen.");
    for(new i; i<rows; i++)
    {
    cache_get_value_name_int(i, "frakid", FrakInfo[i][fraksql]);
    cache_get_value_name(i, "frakname", FrakInfo[i][frakname],50);
    cache_get_value_name_int(i, "interior", FrakInfo[i][interior]);
    cache_get_value_name_int(i, "vwelt", FrakInfo[i][vwelt]);
    cache_get_value_name(i, "frakfarbe", FrakInfo[i][frakfarbe],25);
    cache_get_value_name(i, "frakrank1", FrakInfo[i][frakrank1],25);
    cache_get_value_name(i, "frakrank2", FrakInfo[i][frakrank2],25);
    cache_get_value_name(i, "frakrank3", FrakInfo[i][frakrank3],25);
    cache_get_value_name(i, "frakrank4", FrakInfo[i][frakrank4],25);
    cache_get_value_name(i, "frakrank5", FrakInfo[i][frakrank5],25);
    cache_get_value_name(i, "frakrank6", FrakInfo[i][frakrank6],25);
    cache_get_value_name_float(i, "sposx", FrakInfo[i][sposx]);
    cache_get_value_name_float(i, "sposy", FrakInfo[i][sposy]);
    cache_get_value_name_float(i, "sposz", FrakInfo[i][sposz]);
    cache_get_value_name_float(i, "sposa", FrakInfo[i][sposa]);
    cache_get_value_name_float(i, "aposx", FrakInfo[i][aposx]);
    cache_get_value_name_float(i, "aposy", FrakInfo[i][aposy]);
    cache_get_value_name_float(i, "aposz", FrakInfo[i][aposz]);
    cache_get_value_name_float(i, "eposx", FrakInfo[i][eposx]);
    cache_get_value_name_float(i, "eposy", FrakInfo[i][eposy]);
    cache_get_value_name_float(i, "eposz", FrakInfo[i][eposz]);
    printf("id:%i, name:%s,farbe:%s, int:%i, vwelt:%i, spx:%f, spy:%f, spz:%f, spa:%f, apx:%f, apy:%f, apz:%f, epx:%f, epy:%f, epz:%f",FrakInfo[i][fraksql],FrakInfo[i][frakname],FrakInfo[i][frakfarbe],FrakInfo[i][interior],FrakInfo[i][vwelt],FrakInfo[i][sposx],FrakInfo[i][sposy],FrakInfo[i][sposz],FrakInfo[i][sposa],FrakInfo[i][aposx],FrakInfo[i][aposy],FrakInfo[i][aposz],FrakInfo[i][eposx],FrakInfo[i][eposy],FrakInfo[i][eposz]);
    new str[100];
    format(str,sizeof(str), ""HTML_LIGHTBLUE">> %s <<\n"HTML_WHITE"Betreten mit "HTML_GREEN"'ENTER'",FrakInfo[i][frakname]);
    CreateDynamic3DTextLabel(str,ORANGE,FrakInfo[i][eposx],FrakInfo[i][eposy],FrakInfo[i][eposz]+0.50,15,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0);
    format(str,sizeof(str), ""HTML_LIGHTBLUE">> %s <<\n"HTML_WHITE"Verlassen mit "HTML_GREEN"'ENTER'",FrakInfo[i][frakname]);
    CreateDynamic3DTextLabel(str,ORANGE,FrakInfo[i][aposx],FrakInfo[i][aposy],FrakInfo[i][aposz]+0.50,15,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,FrakInfo[i][vwelt]);
    CreateDynamicPickup(1318,1,FrakInfo[i][eposx],FrakInfo[i][eposy],FrakInfo[i][eposz],0);
    CreateDynamicPickup(1318,1,FrakInfo[i][aposx],FrakInfo[i][aposy],FrakInfo[i][aposz],FrakInfo[i][vwelt]);
    CreateDynamic3DTextLabel("Fraktionslager\n/Ausruesten\n/Frakbank",ORANGE,FrakInfo[i][sposx],FrakInfo[i][sposy]+0.50,FrakInfo[i][sposz],15,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,FrakInfo[i][vwelt]);
    CreateDynamicPickup(1240,1,FrakInfo[i][sposx],FrakInfo[i][sposy]+0.50,FrakInfo[i][sposz],FrakInfo[i][vwelt]);



    }
    print("MYSQL: Fraktionen wurden Geladen.");
    return 1;
    }

    //edit new problem


    die //makierungen lesen



    ocmd:makeleader(playerid,params[])
    {
    if(!PlayerInfo[playerid][pLoggedIn]) return NO_CONNECT_ME;
    if(!IsPlayerAnAdmin(playerid, 5)) return NO_ADMIN;
    new string[120],fID, pID, frak;
    if(sscanf(params,"ui", pID, frak)) return SCM(playerid,ROT,"Info:" #HTML_WHITE" /makeleader [playerid/name] [fraktion-id]");
    if(!PlayerInfo[pID][pLoggedIn]) return NO_CONNECT_P;
    if(!IsPlayerConnected(pID))return NO_CONNECT_P;
    if(frak<0||frak>MAX_FRAKTIONEN) return SCM(playerid,ROT,"Info:" #HTML_WHITE" /makeleader [playerid/name] [fraktion-id]");
    PlayerInfo[pID][pFraktion] = frak; //Hier wird der Spieler in die Jeweilige fraktion gesetzt.
    SpawnPlayer(pID);
    fID = PlayerInfo[pID][pFraktion]; //Hier wird die Fraktion des Spielers ermittelt doch es kommt die Alte fragen raus
    format(string,sizeof(string), "%s %s hat dich zum Leader der Fraktion %s gemacht.",Adminrang(playerid), PlayerInfo[playerid][pName], FrakInfo[fID][frakname]); // hier FrakInfo[fID][frakname] hier kommt immer die alte fraktion raus
    SCM(pID,ROT,string);
    format(string,sizeof(string), "Du hast %s zum Leader der Fraktion %s gemacht.", PlayerInfo[pID][pName], FrakInfo[fID][frakname]);
    SCM(playerid,ROT,string);
    new log[100];
    format(log,sizeof(log), "%s hat dem Spieler %s zum Leader der %s gemacht.",PlayerInfo[playerid][pName],PlayerInfo[pID][pName], FrakInfo[fID][frakname]);
    Log("Makeleader",log);
    return 1;
    }

    Aprilia SR 50 motrad NEU 2400€:


    2x AGV GT-VELOCE helm 740€
    2x AGV GT-VELOCE blaue visier 120€
    2x Sena 20s evo 440€
    2x Berik Short-X Handschuhe 100€
    2x Fox Black Belt Nirengurt 70€
    LeoVince Handmade ZX Rennauspuff 130€
    Stage6 f1 Rückspiegel rechts 25€
    Stage6 f1 Rückspiegel links. 25€
    Tank super 95 10€
    2takt motoren öl 14,79€
    3x redbull. 3,60€
    Motorrad shampo. 15,95€
    4x Tücher. 5€
    2x Eimer. 10€
    Krächer hochdruckreiniger K 5. 340€
    1kg reinigungs knete. 75€
    1l gleitmittel für reinigungs knete 35€

    ich habe mich gerade ungelesen und anschließend soll die Funktion GetPlayerTargetActor(); unter folgendem callback nicht funktionieren:
    OnPlayerUpdate,
    OnPlayerKeyStateChange(Ausnahme du nutzt ein Timer da es sonst rum buggen soll wenn man die Taste gedrückt hält)


    Ps: ich habe dies nicht ausprobiert sondern im Englischen Samp Forum gelesen.



    //edit was mich wundert in der SAMP wiki wird das Beispiel auch im callback OnPlayerUpdate genutzt.