Beiträge von CaZe

    Hm, dass kann eigentlich nicht hinhauen, da es ja bei dem Befehl ausgelesen wird. Und auch in der DB der Name der selbe wi InGame ist.
    /confighouse

    ocmd:confighouse(playerid,params[])
    {
    if(!IsPlayerOnline(playerid))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not logged in.");
    for(new h=0;h<MAX_HOUSES;h++)
    {
    if(IsPlayerInRangeOfPoint(playerid,2,HouseInfo[h][h_exitX],HouseInfo[h][h_exitY],HouseInfo[h][h_exitZ]))
    {
    if(!strcmp(HouseInfo[h][h_owner],getPlayerName(playerid),false))
    {
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    }
    }
    return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not close to your House.");
    }

    Klappt doch Danke dir hatte vergessen zu compilen :S
    //EDIT::
    Und ne kleiner Frage: Wieso schreibe ich diese Zeile über mehrere Zeilen:

    mysql_format(Handle,query,sizeof(query),"UPDATE user SET Geld='%i',KontoMoney='%i',Level='%i',ALevel='%i',Skin='%i',Sex='%i',Fraktion='%i',OwnHouse='%i',HouseID='%i',Spawn='%i' WHERE BINARY username='%e'",GetPlayerMoney(playerid),SpielerInfo[playerid][pKonto],GetPlayerScore(playerid),SpielerInfo[playerid][pGender],SpielerInfo[playerid][pALevel],GetPlayerSkin(playerid),SpielerInfo[playerid][pFrak],SpielerInfo[playerid][pOwnHouse],SpielerInfo[playerid][pHouseID],SpielerInfo[playerid][pSpawn],getPlayerName(playerid));

    Denn er gibt mir diesen Error aus:

    Code
    C:\Users\Patrice\Desktop\Sa-Mp\gamemodes\ForFun.pwn(2740) : error 075: input line too long (after substitutions)

    Guten Tag,
    ich habe gerade bemerkt das er bei dem Befehl /confighouse die Dialoge nicht öffnet.
    Das gibt die Konsole aus:


    Hier der Code:
    [pwn=2082]
    if(dialogid == DIALOG_HOUSE_CONFIG)
    {
    if(response)
    {
    if(listitem == 0)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the Rent Price in the line below.\nCurrent Rent Price: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_rentprice]);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_RENTPRICE,DIALOG_STYLE_INPUT,"{FF7800}TRP - Rentprice",str,"Set","Back");
    return 1;
    }
    if(listitem == 1)
    {
    format(str,sizeof(str),"Rentable\nNot Rentable");
    ShowPlayerDialog(playerid,DIALOG_HOUSE_RENTABLE,DIALOG_STYLE_LIST,"{FF7800}TRP - Rentable",str,"Set","Back");
    return 1;
    }
    if(listitem == 2)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the amount that you want to deposit in your safe.\nCurrent Amount: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_money]);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_DEPOSIT,DIALOG_STYLE_INPUT,"{FF7800}TRP - Deposit",str,"Deposit","Back");
    return 1;
    }
    if(listitem == 3)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the amount that you want to deposit from your safe.\nCurrent Amount: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_money]);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_WITHDRAW,DIALOG_STYLE_INPUT,"{FF7800}TRP - Withdraw",str,"Withdraw","Back");
    return 1;
    }
    }
    }
    if(dialogid == DIALOG_HOUSE_RENTPRICE)
    {
    if(response)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the Rent Price in the line below.\nCurrent Rent Price: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_rentprice]);
    if(!IsNumeric(inputtext))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You have to enter a Number."),ShowPlayerDialog(playerid,DIALOG_HOUSE_RENTPRICE,DIALOG_STYLE_INPUT,"{FF7800}TRP - Rentprice",str,"Ok","Back");
    if(strval(inputtext) < 0 || strval(inputtext) > 2500)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}The Minimal Amount is 0$ and the Maximum Amount is 2500$."),ShowPlayerDialog(playerid,DIALOG_HOUSE_RENTPRICE,DIALOG_STYLE_INPUT,"{FF7800}TRP - Rentprice",str,"Ok","Back");
    HouseInfo[houseowner][h_rentprice] = strval(inputtext);
    format(str,sizeof(str),"[SInfo] {FFFFFF}The Rent Price is now %i$",HouseInfo[houseowner][h_rentprice]);
    SendClientMessage(playerid,Gelb,str);
    Delete3DTextLabel(HouseInfo[houseowner][h_label]);
    format(str,sizeof(str),"This Villa is already bought.\nType /rent to rent a room in this Villa.\nOwner: %s\nRent Price: %i$",HouseInfo[houseowner][h_owner],HouseInfo[houseowner][h_rentprice]);
    HouseInfo[houseowner][h_label] = Create3DTextLabel(str,Weiß,HouseInfo[houseowner][h_enterX],HouseInfo[houseowner][h_enterY],HouseInfo[houseowner][h_enterZ],10.0,0,0);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    }
    if(dialogid == DIALOG_HOUSE_RENTABLE)
    {
    if(response)
    {
    format(str,sizeof(str),"Rentable\nNot Rentable");
    if(listitem == 0)
    {
    HouseInfo[houseowner][h_rentable] = 1;
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return SendClientMessage(playerid,Gelb,"[SInfo] {FFFFFF}Your house is now {FF7800}Rentable{FFFFFF}.");
    }
    else if(listitem == 1)
    {
    HouseInfo[houseowner][h_rentable] = 0;
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return SendClientMessage(playerid,Gelb,"[SInfo] {FFFFFF}Your house is no longer {FF7800}Rentable{FFFFFF}.");
    }
    return 1;
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    }
    if(dialogid == DIALOG_HOUSE_DEPOSIT)
    {
    if(response)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the amount that you want to deposit in your safe.\nCurrent Amount: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_money]);
    if(!IsNumeric(inputtext))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You have to enter a Number."),ShowPlayerDialog(playerid,DIALOG_HOUSE_DEPOSIT,DIALOG_STYLE_INPUT,"{FF7800}TRP - Deposit",str,"Deposit","Back");
    if(strval(inputtext) <= 0)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}The amount can't be smaller then 0 or cant't be 0"),ShowPlayerDialog(playerid,DIALOG_HOUSE_DEPOSIT,DIALOG_STYLE_INPUT,"{FF7800}TRP - Deposit",str,"Deposit","Back");
    HouseInfo[houseowner][h_money] = HouseInfo[houseowner][h_money]+strval(inputtext);
    GivePlayerMoney(playerid,-strval(inputtext));
    format(str,sizeof(str),"[SInfo] {FFFFFF}Your current amount in your House Safe is now: %i$",HouseInfo[houseowner][h_money]);
    SendClientMessage(playerid,Gelb,str);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    }
    if(dialogid == DIALOG_HOUSE_WITHDRAW)
    {
    if(response)
    {
    format(str,sizeof(str),"{FFFFFF}Please enter the amount that you want to deposit from your safe.\nCurrent Amount: {FF7800}%i{FFFFFF}$",HouseInfo[houseowner][h_money]);
    if(!IsNumeric(inputtext))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You have to enter a Number."),ShowPlayerDialog(playerid,DIALOG_HOUSE_WITHDRAW,DIALOG_STYLE_INPUT,"{FF7800}TRP - Withdraw",str,"Withdraw","Back");
    if(strval(inputtext) <= 0)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}The amount can't be smaller then 0 or can't be 0"),ShowPlayerDialog(playerid,DIALOG_HOUSE_WITHDRAW,DIALOG_STYLE_INPUT,"{FF7800}TRP - Withdraw",str,"Withdraw","Back");
    if(strval(inputtext) > HouseInfo[houseowner][h_money])return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You dont have enough money in your safe."),ShowPlayerDialog(playerid,DIALOG_HOUSE_WITHDRAW,DIALOG_STYLE_INPUT,"{FF7800}TRP - Withdraw",str,"Withdraw","Back");
    HouseInfo[houseowner][h_money] = HouseInfo[houseowner][h_money]-strval(inputtext);
    GivePlayerMoney(playerid,strval(inputtext));
    format(str,sizeof(str),"[SInfo] {FFFFFF}You have withdrawn %i$",strval(inputtext));
    SendClientMessage(playerid,Gelb,str);
    format(str,sizeof(str),"[SInfo] {FFFFFF}Your current amount in your House Safe is now: %i$",HouseInfo[houseowner][h_money]);
    SendClientMessage(playerid,Gelb,str);
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_HOUSE_CONFIG,DIALOG_STYLE_LIST,"{FF7800}TRP - Confighouse","Change Rentprice\nRentAble\nDeposit Money\nWithdraw Money","Ok","Cancel");
    return 1;
    }
    }


    [/pwn]


    Danke im voraus


    //EDIT::
    Code bearbeitet.
    Info.
    Jeffry:



    new str[250];

    Nabend,
    eine kleine Frage:
    Ich habe das Problem wenn ich mit dem Namen: CaZe auf den Server komme er die Daten von den Spieler caze ausliest.
    Also ich kann mich nicht mit dem Namen "CaZe" auf dem Server registrieren weil er sagt der Account "caze" wäre es.

    mysql_format(Handle,query,sizeof(query),"Select * FROM user WHERE username='%e'",getPlayerName(playerid));
    mysql_pquery(Handle,query,"UserCheck","i",playerid);

    Danke im voraus

    Tag liebe Leute,
    ich habe das Problem, dass das Script immer ausgibt ich hätte mein Passwort falsch eingeben welches aber richtig eingegeben wurde(Mehrmals getestet)
    Hier einmal die Codes dazu:


    OnPasswordResponse


    public OnPasswordResponse(playerid)
    {

    OnPasswordResponse
    new num_fields, num_rows;
    new str[256];
    cache_get_data(num_rows, num_fields);
    if(num_rows == 0)
    {
    if(SpielerInfo[playerid][pLoginTry] == 0)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 1 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 1)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 2 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 2)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 3 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 3)
    {
    SendClientMessage(playerid,Rot,"Error: {FFFFFF}The entered password was to often wrong. You have been kicked.");
    SetTimerEx("KickTimer",500,false,"i",playerid);
    SpielerInfo[playerid][pLoginTry] = 0;
    return 1;
    }
    }
    else
    {
    LoadAccount(playerid);
    if(IsPlayerAnAdmin(playerid))
    SendClientMessage(playerid,Gelb,"[SInfo] {FFFFFF}You are an Admin.");
    }
    return 1;
    }


    Dialog Login


    if(dialogid == DIALOG_LOGIN)
    {
    if(!response)
    {
    SendClientMessage(playerid,Rot,"Error: {FFFFFF}You have canceled the Login. Please login to play on this Server.");
    SetTimerEx("KickTimer",500,false,"i",playerid);
    return 1;
    }
    format(key,sizeof(key),"%s",inputtext);
    mysql_format(Handle,query,sizeof(query),"SELECT * FROM user WHERE username='%e' AND password=MD5('%e')",getPlayerName(playerid),key);
    mysql_pquery(Handle,query,"OnPasswordResponse","i",playerid);
    }


    SQL
    [21:22:04] [DEBUG] mysql_format - connection: 1, len: 125, format: "SELECT * FROM user WHERE username='%e' AND password=MD5('%e')"[21:22:04] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM user WHERE username='caze' AND password=MD5('test'", callback: "OnPasswordResponse", format: "i"[21:22:04] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution[21:22:04] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.231 milliseconds[21:22:04] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[21:22:04] [DEBUG] Calling callback "OnPasswordResponse"..[21:22:04] [DEBUG] cache_get_data - connection: 1[21:22:04] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[21:22:06] [DEBUG] mysql_format - connection: 1, len: 125, format: "SELECT * FROM user WHERE username='%e' AND password=MD5('%e')"[21:22:06] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM user WHERE username='caze' AND password=MD5('test'", callback: "OnPasswordResponse", format: "i"[21:22:06] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution[21:22:06] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.246 milliseconds[21:22:06] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[21:22:06] [DEBUG] Calling callback "OnPasswordResponse"..[21:22:06] [DEBUG] cache_get_data - connection: 1[21:22:06] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[21:22:07] [DEBUG] mysql_format - connection: 1, len: 125, format: "SELECT * FROM user WHERE username='%e' AND password=MD5('%e')"[21:22:07] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM user WHERE username='caze' AND password=MD5('test'", callback: "OnPasswordResponse", format: "i"[21:22:07] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution[21:22:07] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.259 milliseconds[21:22:07] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[21:22:07] [DEBUG] Calling callback "OnPasswordResponse"..[21:22:07] [DEBUG] cache_get_data - connection: 1[21:22:07] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[21:22:08] [DEBUG] mysql_format - connection: 1, len: 125, format: "SELECT * FROM user WHERE username='%e' AND password=MD5('%e')"[21:22:08] [DEBUG] mysql_pquery - connection: 1, query: "SELECT * FROM user WHERE username='caze' AND password=MD5('test'", callback: "OnPasswordResponse", format: "i"[21:22:08] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution[21:22:08] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.283 milliseconds[21:22:08] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[21:22:08] [DEBUG] Calling callback "OnPasswordResponse"..[21:22:08] [DEBUG] cache_get_data - connection: 1[21:22:08] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called


    Danke im Voraus

    Nabend,
    wenn ich diese Abfrage in ein public packe unt darunter etwas abfragen will was in dieser Tabelle steht dürfte es doch so funktionieren oder?

    mysql_format(Handle,query,sizeof(query),"SELECT * FROM banneduser WHERE username='%e'",getPlayerName(playerid));
    mysql_pquery(Handle,query);
    SpielerInfo[playerid][pBanned] = cache_get_field_content_int(0,"IsBanned",Handle);

    Denn er gibt mir immer aus er findet das Feld nicht.

    Crosshair ist wohl weg aber ich habe bisschen spät angefangen zu recorden habe dann am Ende auch restarted weil ich nichts mehr getroffen habe :D
    Und wenn schon, wenn ich geoverwatched werde wird es ja letztenendes zu VAC weitergeleitet welche dann prüfen ob ich ein Hack genutzt habe.

    Hallo liebe CS:GO-Brotfische,
    ich wollte euch mal auf diesen CSGO-Bug aufmerksam machen der mir gestern Abend zugestoßen ist.
    In der Beschreibung des Videos findet ihr die von mir versuchte Erklärung auf Englisch.

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

    Warum ich das hier Poste?
    Weil man es leicht übersieht wenn man überhaupt mal bei der Steam-Community reinschaut und vllt. auch euch erklärt wird warum ihr manchmal gut durch die Smokes kassiert ;)


    //EDIT::
    Info zum Video: Ihr müsst kurz warten das wird noch zu 720p60 verarbeitet von YouTube.

    Hm, wie ich das jetzt gerade sehe, scheint
    SetVehicleParamsCarDoors(vehicleid,door)
    nur da zu sein um Türen zu öffnen und schließen und sie nicht einzelnt abschließbar machen

    Guten Nabend liebe Leute,
    ich habe das Problem, dass wenn ein Spieler "geprisoned" wurde und reloggt nicht mehr ins Prison zurück teleportiert wird.
    Ich habe nur den Error dass das Feld nicht gefunden/gelesen werden konnte. Warum weiß icht nicht.
    Befehl und Timer funktionieren nur nicht, dass es beim Login ausgelesen wird.


    SpielerLaden/OnPasswordResponse


    public OnPasswordResponse(playerid)
    {

    SpielerLaden/OnPasswordResponse
    new num_fields, num_rows;
    new str[256];
    cache_get_data(num_rows, num_fields);
    if(num_rows == 0)
    {
    if(SpielerInfo[playerid][pLoginTry] == 0)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 1 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 1)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 2 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 2)
    {
    SendClientMessage(playerid,Rot, "Error: {FFFFFF}The entered password is wrong. | Try 3 of 3");
    format(str,sizeof(str),"{FFFFFF}Welcome back {FF7800}%s!\n\n{FFFFFF}A account under this name is already registered in the Server Database.\nIf this not your Account, please take a different Name to play on this Server.\nPlease enter your password:",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF7800}TRP - Login",str,"Login","Cancel");
    SpielerInfo[playerid][pLoginTry] ++;
    return 1;
    }
    if(SpielerInfo[playerid][pLoginTry] == 3)
    {
    SendClientMessage(playerid,Rot,"Error: {FFFFFF}The entered password was to often wrong. You have been kicked.");
    SetTimerEx("KickTimer",500,false,"i",playerid);
    SpielerInfo[playerid][pLoginTry] = 0;
    return 1;
    }
    }
    else
    {
    LoadAccount(playerid);
    SpawnPlayerEx(playerid);
    if(IsPlayerAnAdmin(playerid))
    SendClientMessage(playerid,Gelb,"[SInfo] {FFFFFF}You are an Admin.");
    }
    return 1;
    }


    LoadAccount


    stock LoadAccount(playerid)
    {
    SpielerInfo[playerid][pEingeloggt] = true;
    SpielerInfo[playerid][pGeld] = cache_get_field_content_int(0,"Geld",Handle),GivePlayerMoney(playerid,SpielerInfo[playerid][pGeld]);
    SpielerInfo[playerid][pKonto] = cache_get_field_content_int(0,"KontoMoney",Handle);
    SpielerInfo[playerid][pLevel] = cache_get_field_content_int(0,"Level",Handle),SetPlayerScore(playerid,SpielerInfo[playerid][pLevel]);
    SpielerInfo[playerid][pALevel] = cache_get_field_content_int(0,"ALevel",Handle);
    SpielerInfo[playerid][pSkin] = cache_get_field_content_int(0,"Skin",Handle);
    SpielerInfo[playerid][pFrak] = cache_get_field_content_int(0,"Fraktion",Handle);
    SpielerInfo[playerid][pOwnHouse] = cache_get_field_content_int(0,"OwnHouse",Handle);
    SpielerInfo[playerid][pHouseID] = cache_get_field_content_int(0,"HouseID",Handle);
    SpielerInfo[playerid][pEingemietet] = cache_get_field_content_int(0,"Eingemietet",Handle);
    SpielerInfo[playerid][pPrisoned] = cache_get_field_content_int(0,"IsPrisoned",Handle);
    if(SpielerInfo[playerid][pEingemietet] == 1)
    {
    SpielerInfo[playerid][pHouseID] = cache_get_field_content_int(0,"houseID",Handle);
    SpielerInfo[playerid][pRenterID] = cache_get_field_content_int(0,"renterID",Handle);
    }
    if(SpielerInfo[playerid][pPrisoned] == 1)
    {
    SpielerInfo[playerid][pPrisonedBis] = cache_get_field_content_int(0,"PrisonedBis",Handle);
    ClearChatForPlayer(playerid);
    PrisonSpawn(playerid);
    }
    ClearChatForPlayer(playerid);
    SetTimerEx("PlayerUpdate",60000,true,"i",playerid);
    SetPlayerColor(playerid,Weiß);
    return 1;
    }


    Bild der Datenbank:


    Befehl sowie Timer(Falls benötigt)


    public PrisonTimer(playerid)
    {
    if(SpielerInfo[playerid][pPrisonedBis] <= gettime())
    {
    SpielerInfo[playerid][pPrisoned] = 0;
    SpielerInfo[playerid][pPrisonedBis] = 0;
    format(SpielerInfo[playerid][pPrisonReason],64,"");
    KillTimer(SpielerInfo[playerid][pTimerID]);
    new query[256];
    format(query,sizeof(query),"DELETE FROM prisoneduser WHERE username='%s'",getPlayerName(playerid));
    mysql_pquery(Handle,query);
    SpawnPlayerEx(playerid);
    SendClientMessage(playerid,Rot,"Unbanned");
    }
    return 1;
    }


    ocmd:prison(playerid,params[])
    {
    if(!IsPlayerOnline(playerid))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not logged in.");
    if(!IsPlayerAnAdmin(playerid))return SendClientMessage(playerid,Rot,"Error: {FFFFFF]You are not allowed to use this Command.");
    new query[256];
    new pID,reason[64],str[144];
    new Minute;
    if(sscanf(params,"uis",pID,Minute,reason))return SendClientMessage(playerid,Rot,"Error: {FFFFFF}Use /prison [Playerid] [Minutes] [Reason]");
    if(pID == INVALID_PLAYER_ID)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}This Player isn't Online.");
    if(SpielerInfo[pID][pEingeloggt] != 1)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}This Player isn't Online");
    format(str,sizeof(str),"[Info] {FFFFFF}%s has been teleported to the prison for %i Minutes by %s. Reason: %s",getPlayerName(pID),Minute,getPlayerName(playerid),reason);
    SendClientMessageToAll(Rot,str);
    format(query,sizeof(query),"INSERT INTO prisoneduser (username,IsPrisoned,PrisonedBis,PrisonReason,PrisonAdmin) VALUES ('%s','1','%i','%s','%s')",
    getPlayerName(pID),gettime()+Minute*60,reason,getPlayerName(playerid));
    mysql_pquery(Handle,query);
    SetPlayerPos(pID,726.7279,1440.4874,1102.7031);
    SetPlayerInterior(pID,6);
    SpielerInfo[playerid][pTimerID] = SetTimerEx("PrisonTimer",60000,true,"i",pID);
    SpielerInfo[pID][pPrisoned] = 1;
    SpielerInfo[pID][pPrisonedBis] = gettime()+Minute*60;
    printf("%i",SpielerInfo[pID][pPrisonedBis]);
    format(SpielerInfo[pID][pPrisonReason],64,"%s",reason);
    return 1;
    }


    Schonmal danke im Voraus.


    //EDIT:
    Fehler im MySQL-Log:

    SQL
    [01:02:44] [DEBUG] cache_get_field_content_int - row: 0, field_name: "IsPrisoned", connection: 1
    [01:02:44] [WARNING] CMySQLResult::GetRowDataByName - field not found ("IsPrisoned")


    ocmd:reparieren(playerid,params[])
    {
    if(!isAdmin(playerid,8)) return SendClientMessage(playerid,helblau,"Du hast nicht die passende Rechte dafür!");
    new vID = GetPlayerVehicleID(playerid);
    SetVehicleHealth(vID,100)
    SendClientMessage(playerid,blau,"Du hast das Fahrzeug repariert!");
    return 1;
    }


    Dürfte wohl das sein was du möchtest.

    Das Family-Sharing funktioniert mit GTA V nicht.
    Habe es bereits mit einem Kollegen ausprobiert der dann bei Social Club nicht durch kam und es über mein Acc spielen musste.


    //EDIT::

    Zitat von Nimo


    (Oder sich bei mir, alles über TeamViewer, geht nur darum das wir uns einmal getroffen haben, danach muss ja nurnoch eine EMAIL bestätigt werden)


    Btw. wie meinst du das denn :huh: Ich verstehe das jetzt so dass du glaubst beide müssten sich jeweils auf beiden Accounts min. 1x eingeloggt haben. Falls dies so ist stimmt dies nicht. Man kann einfach eine Family-Sharing Anfrage schicken und fertig ist.
    Falls du das nicht so meinst tut es mir leid dass ich es falsch verstanden habe.

    /lock


    ocmd:lock(playerid,params[])
    {
    if(SpielerInfo[playerid][pEingeloggt] == 0)return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not logged in.");
    for(new i=0;i<MAX_PRIVATE_VEHICLES;i++)
    {
    new Float:pos[3];
    new vID;
    vID = PrivateVehicle[i][p_vID];
    GetVehiclePos(vID,pos[0],pos[1],pos[2]);
    if(IsPlayerInRangeOfPoint(playerid,5,pos[0],pos[1],pos[2]))
    {
    if(!strlen(PrivateVehicle[i][p_owner]))continue;
    if(!strcmp(PrivateVehicle[i][p_owner], getPlayerName(playerid)))
    {
    CarLock(vID);
    return 1;
    }
    }
    }
    return SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not near by your Vehicle.");
    }


    stock CarLock


    stock CarLock(vehicleid)
    {
    new engine,lights,alarm,doors,bonnet,boot,objective;
    {
    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(doors == 0)
    {
    SetVehicleParamsEx(vehicleid,engine,lights,alarm,1,bonnet,boot,objective);
    SendClientMessage(PrivateVehicle[vehicleid][p_owner],Gelb,"[SInfo] {FFFFFF}You have locked your Vehicle.");
    return 1;
    }
    else
    {
    SendClientMessage(PrivateVehicle[vehicleid][p_owner],Gelb,"[SInfo] {FFFFFF}You have unlocked your Vehicle.");
    SetVehicleParamsEx(vehicleid,engine,lights,alarm,0,bonnet,boot,objective);
    return 2;
    }
    }
    }

    LoadVehicles


    stock LoadVehicles()
    {
    mysql_pquery(Handle, "SELECT * FROM fraccars ORDER BY ID ASC","LoadFracVehicles_Data");
    mysql_pquery(Handle, "SELECT * FROM privatecars ORDER BY ID ASC","LoadPrivateVehicles_Data");
    return 1;
    }

    LoadVehicles
    public LoadPrivateVehicles_Data()
    {
    new rows;
    rows = cache_num_rows();
    for(new i=0;i<rows;i++)
    {
    PrivateVehicle[i][p_modelID] = cache_get_field_content_int(i, "Modelid");
    PrivateVehicle[i][p_x] = cache_get_field_content_float(i, "PosX");
    PrivateVehicle[i][p_y] = cache_get_field_content_float(i, "PosY");
    PrivateVehicle[i][p_z] = cache_get_field_content_float(i, "PosZ");
    PrivateVehicle[i][p_a] = cache_get_field_content_float(i, "PosA");
    PrivateVehicle[i][p_color1] = cache_get_field_content_int(i, "Color1");
    PrivateVehicle[i][p_color2] = cache_get_field_content_int(i,"Color2");
    cache_get_field_content(i,"Owner",PrivateVehicle[i][p_owner],Handle,24);
    if(PrivateVehicle[i][p_modelID] >= 400 && PrivateVehicle[i][p_modelID] <= 611)
    {
    PrivateVehicle[i][p_vID] = CreateVehicle(PrivateVehicle[i][p_modelID],PrivateVehicle[i][p_x],PrivateVehicle[i][p_y],PrivateVehicle[i][p_z],PrivateVehicle[i][p_a],PrivateVehicle[i][p_color1],PrivateVehicle[i][p_color2],-1);
    }
    else
    {
    printf("[Error] PrivateVehicle Model-ID %d doesn't exist (ID: %d).",PrivateVehicle[i][p_modelID],i);
    }
    if(GetVehicleModel(MAX_VEHICLES-1) != 0)return print("The Limit of Max Vehicles is reached.");
    if(i == MAX_PRIVATE_VEHICLES-1)return print("The Limit of Max Private Vehicles is reached.");
    }
    return 1;
    }


    OnPlayerEnterVehicle


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    //new str[546];
    for(new i=0;i<MAX_VEHICLES;i++)
    {
    if(FracVehicle[i][f_vID] == vehicleid)
    {
    if(SpielerInfo[playerid][pFrak] != FracVehicle[i][f_fracID])
    {
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    SendClientMessage(playerid,Rot,"Error: {FFFFFF}You are not allowed to enter this Vehicle because you are not in the right Fraction.");

    OnPlayerEnterVehicle
    }
    break;
    }
    }
    return 1;
    }