Beiträge von Nixon

    Hi community,
    ich habe schon seit sehr langem ein funktionierendes Login/Register system aber man kann ja auch irgendwie machen dass man das passwort das mein schriebt nicht sieht dass dann da nur punkte sind aber wie soll ich das am besten angehen ?
    //edit ich habe was gefunden aber da bekomme ich errors und zwar mit DIALOG_STYLE_PASSWORD
    da sagt der mir dass ich es nicht definiert habe hier ist der link http://wiki.sa-mp.com/wiki/ShowPlayerDialog

    ne das bringt nichts ich glaube es klappt alles ausser dieses OnDialogResponse in filtersctips bei mir irgendwie
    //edit habs geschafft indem ich überall bei OnDialogResponse da callback return 0;
    gesetzt zuerst habe ich das nur bei dem filterscript porbt aber nachdem ich es überall probiert habe klappts jetzt :D

    Hi community,
    undzwar habe ich ein filterscript erstellt das auch funkt wenn man es im orginal gamemode einbaut aber wenn man es als filterscript bentutzt dann
    öfnnet sich der richtige dialog aber wenn man irgendwo draufklickt passiert nichts garnichts.
    Das problem hatte ich auch bei einem filterscript von T4125Gamer hier sind nochmal die codes:

    // This is a comment
    // uncomment the line below if you want to write a filterscript


    #include <a_samp>
    #include <ocmd>
    #include <dini>
    #define ROT 0xFF000FFF
    new id;



    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" banksystem by lcp9");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }




    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }



    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    LoadAccount(playerid);
    }
    else
    {
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    dini_Create(Spielerdatei);
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }
    stock SpielerSpeichern(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    dini_IntSet(Spielerdatei,"bank",GetPVarInt(playerid,"bank"));

    return 1;
    }
    ocmd:bank(playerid, params[])
    {
    new str[128];
    format(str,sizeof(str),"{0005FF}You have {19FF00}%d${0005FF} in your bank account",GetPVarInt(playerid,"bank"));
    SendClientMessage(playerid,ROT,str);
    ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,str,"{3C00FF}Deposit money\n{3C00FF}Withdraw money\n{3C00FF}Transfer money","Yes","Cancel");
    return 1;
    }
    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    SetPVarInt(playerid,"bank",dini_Int(Spielerdatei,"bank"));
    return 1;
    }
    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == 50)
    {
    if(response)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,51,1,"Deposit!","How much money to deposit?","Ok","Cancel");
    return 1;
    }
    else if(listitem == 1)
    {
    ShowPlayerDialog(playerid,52,1,"Withdraw!","How much money to withdraw?","Ok","Cancel");
    return 1;
    }
    else if(listitem == 2)
    {
    ShowPlayerDialog(playerid,53,1,"Transfer money","To him do want to give money?","Ok","Cancel");
    return 1;

    }
    }
    }
    if(dialogid == 51)
    {
    if(response)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);


    if(GetPlayerMoney(playerid) < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You haven't got enought money!");
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"You deposited %d$",strval(inputtext));
    GivePlayerMoney(playerid,-strval(inputtext));
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") +strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    if(dialogid == 52)
    {
    if(response)
    {


    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    if(GetPVarInt(playerid,"bank") < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You don't have so much money on your bank !");
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"You withdraw %d$",strval(inputtext));
    GivePlayerMoney(playerid,strval(inputtext));
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") -strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    if(dialogid == 53)
    {
    if(response)
    {


    new give[MAX_PLAYER_NAME];
    id = strval(inputtext);
    new string[128];
    format(string,sizeof(string),"Ok you choosed id(%d)\nNow Enter The Amount You Want To Transfer",id);
    SendClientMessage(playerid,ROT,string);
    GetPlayerName(playerid, give, MAX_PLAYER_NAME);
    new get[MAX_PLAYER_NAME];
    GetPlayerName(id, get, MAX_PLAYER_NAME);
    GetPlayerName(strval(inputtext), get,MAX_PLAYER_NAME);
    ShowPlayerDialog(playerid,54,DIALOG_STYLE_INPUT,"PAY","How much you want to pay?","ok","Cancel");
    return 1;
    }
    }
    if(dialogid == 54)
    {
    if(response)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);


    if(GetPVarInt(playerid,"bank") < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You haven't got enought money!");
    return 1;
    }
    else
    {


    new string[128];
    new Name[MAX_PLAYER_NAME];
    new give[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerName(id, Name, sizeof(Name));
    GetPlayerName(playerid, give, MAX_PLAYER_NAME);
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") -strval(inputtext));
    SetPVarInt(id,"bank", GetPVarInt(playerid,"bank") +strval(inputtext));
    format(string,sizeof(string),"You gave player %s %d $",Name,strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    new string2[128];
    format(string2,sizeof(string2),"Player %s gave you %d $",pname,strval(inputtext));
    SendClientMessage(id,ROT,string2);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }
    //edit ich habe irgendwie zwei themen angelegt WTF?! auf einmal hää
    ich habs zweimal probt aber bei dem ersten mal kam die meldung fehler wegen 30 sekunden keine message machen aber hat sich irgendwi trozdem erstellt

    Hi community,
    ich habe mal ein filterscript gebaut aber dies klappt nicht ich hatte das schonmal bei einem filterscript von T4125Gamer das problem war bei beidem dass wenn man /(irgendwas)
    machst wo sich dann ein diaoog öfnnet öfnet er sich auch aber wenn man irgendwo drauf klick passiert da nichts ich habe hier mal meinem kompletten filterscript
    (ich habe 0.3e)

    // This is a comment
    // uncomment the line below if you want to write a filterscript


    #include <a_samp>
    #include <ocmd>
    #include <dini>
    #define ROT 0xFF000FFF
    new id;



    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" banksystem by lcp9");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }




    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }



    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    LoadAccount(playerid);
    }
    else
    {
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    dini_Create(Spielerdatei);
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }
    stock SpielerSpeichern(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    dini_IntSet(Spielerdatei,"bank",GetPVarInt(playerid,"bank"));

    return 1;
    }
    ocmd:bank(playerid, params[])
    {
    new str[128];
    format(str,sizeof(str),"{0005FF}You have {19FF00}%d${0005FF} in your bank account",GetPVarInt(playerid,"bank"));
    SendClientMessage(playerid,ROT,str);
    ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,str,"{3C00FF}Deposit money\n{3C00FF}Withdraw money\n{3C00FF}Transfer money","Yes","Cancel");
    return 1;
    }
    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    SetPVarInt(playerid,"bank",dini_Int(Spielerdatei,"bank"));
    return 1;
    }
    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == 50)
    {
    if(response)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,51,1,"Deposit!","How much money to deposit?","Ok","Cancel");
    return 1;
    }
    else if(listitem == 1)
    {
    ShowPlayerDialog(playerid,52,1,"Withdraw!","How much money to withdraw?","Ok","Cancel");
    return 1;
    }
    else if(listitem == 2)
    {
    ShowPlayerDialog(playerid,53,1,"Transfer money","To him do want to give money?","Ok","Cancel");
    return 1;

    }
    }
    }
    if(dialogid == 51)
    {
    if(response)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);


    if(GetPlayerMoney(playerid) < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You haven't got enought money!");
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"You deposited %d$",strval(inputtext));
    GivePlayerMoney(playerid,-strval(inputtext));
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") +strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    if(dialogid == 52)
    {
    if(response)
    {


    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);
    if(GetPVarInt(playerid,"bank") < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You don't have so much money on your bank !");
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"You withdraw %d$",strval(inputtext));
    GivePlayerMoney(playerid,strval(inputtext));
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") -strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    if(dialogid == 53)
    {
    if(response)
    {


    new give[MAX_PLAYER_NAME];
    id = strval(inputtext);
    new string[128];
    format(string,sizeof(string),"Ok you choosed id(%d)\nNow Enter The Amount You Want To Transfer",id);
    SendClientMessage(playerid,ROT,string);
    GetPlayerName(playerid, give, MAX_PLAYER_NAME);
    new get[MAX_PLAYER_NAME];
    GetPlayerName(id, get, MAX_PLAYER_NAME);
    GetPlayerName(strval(inputtext), get,MAX_PLAYER_NAME);
    ShowPlayerDialog(playerid,54,DIALOG_STYLE_INPUT,"PAY","How much you want to pay?","ok","Cancel");
    return 1;
    }
    }
    if(dialogid == 54)
    {
    if(response)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/bank/%s.txt",name);


    if(GetPVarInt(playerid,"bank") < strval(inputtext))
    {
    SendClientMessage(playerid,ROT,"You haven't got enought money!");
    return 1;
    }
    else
    {


    new string[128];
    new Name[MAX_PLAYER_NAME];
    new give[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    GetPlayerName(id, Name, sizeof(Name));
    GetPlayerName(playerid, give, MAX_PLAYER_NAME);
    SetPVarInt(playerid,"bank", GetPVarInt(playerid,"bank") -strval(inputtext));
    SetPVarInt(id,"bank", GetPVarInt(playerid,"bank") +strval(inputtext));
    format(string,sizeof(string),"You gave player %s %d $",Name,strval(inputtext));
    SendClientMessage(playerid,ROT,string);
    new string2[128];
    format(string2,sizeof(string2),"Player %s gave you %d $",pname,strval(inputtext));
    SendClientMessage(id,ROT,string2);
    SpielerSpeichern(playerid);
    return 1;
    }
    }
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }
    //edit ich habe irgendwie zwei themen angelegt WTF?! auf einmal hää
    ich habs zweimal probt aber bei dem ersten mal kam die meldung fehler wegen 30 sekunden keine message machen aber hat sich irgendwi trozdem erstellt

    Hi brotfische,
    ich habe ein problem wie man strings mitdini speichert weil dies nicht funkt:

    dini_Set(Spielerdatei,"convoysystem",GetPVarString(Spielerdatei,"convoysystem"));

    weil ich das diesen error bekomme :

    C:\Users\Patrick\Downloads\samp03e_svr_R2_win32\gamemodes\mitauto.pwn(8239) : error 035: argument type mismatch (argument 1)


    wer soll besser wisser sein? ich doch nicht oder?

    was in der console steht ?
    nichts ich habe doch kein sendrcon
    oder so gemacht
    //edit achso dark shadow dieses printf macht das und was da steht ist alles ausser name2 (mein problem) und bei pID stand 105 :(
    //edit das stand da:
    [hide]
    [14:39:34] [TEST] Name1 : lcp9, Name2 : , playerid: 1, pID : 105, Text: hi[/hide]

    hohn kramer wenn du nich ein public davor setzt musst du noch ganz oben forward rangname(rang);
    machen
    MFG
    //edit ich würde jedoch kein public davor setzen und forward ich wird einfach warten bis du es anwendest

    dieses warning wirst du wegbekommen wenn du dies : rangname(rang) irgendwann benutzt also einfach weiter scripten und der ist bald weg :D
    hat aber nichts wirklich garnichts damit zutun dass es nicht klappt :thumbup:

    Ich persönlich sehe da jetzt keinen Fehler.
    Kopiere mal aus deinem Chatlog was da raus kommt.
    Ansonsten mal pID, playerid, pname und name mal mit printf in der Konsole ausgeben


    Gruß


    was meinst du mit printf ich weiss net was dat ist :(
    und es steht immer wenn ich den command ausführe wie schon gesgat : lcp9 reported (nichts obwohl das narme stehen muss) with the text: test
    oder was ist sonst chatlog?