Beiträge von xSnake

    habe 2 kleine frage/probleme


    1 wieso wird der skin nicht auf die skinid 26 gesetzt ? der skin bleibt 0


    public OnPlayerRequestClass(playerid, classid)
    {
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SetPlayerInterior(playerid, 0);
    SpawnPlayer(playerid);
    return 1;
    }


    if(sInfo[playerid][tutpart] == 4)
    {
    SetPlayerVirtualWorld(playerid,0);
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    TogglePlayerSpectating(playerid, 0);
    savePlayer(playerid);
    return 1;
    }


    2 ich will das OnPlayerRegister erst bei tutpart 4 ausgeführt wird


    if(sInfo[playerid][tutpart] == 4)
    {
    SetPlayerVirtualWorld(playerid,0);
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    TogglePlayerSpectating(playerid, 0);
    savePlayer(playerid);
    return 1;
    }



    public OnPlayerRegister(playerid)
    {
    sInfo[playerid][db_id] = mysql_insert_id();
    SendClientMessage(playerid, ROT, "=====> Willkommen auf PlayPoint Reallife <=====!");
    SendClientMessage(playerid, GELB, "=====>Es folgt nun das Tutorial<=====");
    SetPlayerMoney(playerid, 2500);
    SetPlayerScore(playerid, 1);
    SetTimerEx("SkinTimer", 200, 0, "dd", playerid, 26);
    SetPlayerColor(playerid, 0xFF00FFFF);
    savePlayer(playerid);
    printf("%s hat sich Registriert!)",getPlayerName(playerid));
    }


    if(dialogid==DIALOG_LOGIN)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>0)
    {
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"SELECT * FROM user WHERE username='%s' AND password='%s'",name,passwort);
    mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Gib bitte dein Passwort ein.");
    new string[128];
    format(string,sizeof(string),"{FFFF00}Hallo %s\n{FFFFFF}Dein Account wurde gefunden!\nBitte gib nun dein Passwort ein\ndamit du dich einloggen kannst!",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbrechen");
    }
    }
    return 1;
    }

    FUnktioniert nicht hier der Code und der MYSQL LOG


    #define DIALOG_REGISTER 1
    #define DIALOG_REGISTER2 31


    enum playerInfo{
    eingeloggt,
    level,
    db_id,
    alevel,
    slevel,
    Skin,
    fraktion,
    rang,
    leader,
    coleader,
    spawnchange,
    tutpart,
    regstep,
    geschlecht
    }


    forward TutTimer(playerid);


    savePlayer(playerid)
    {
    sInfo[playerid][eingeloggt] = 1;
    new query[256];
    format(query,sizeof(query),"UPDATE user SET level='%i',skin='%i',geschlecht='%i',money='%i',alevel='%i',slevel='%i',fraktion='%i',rang='%i',leader='%i',coleader='%i',spawnchange='%i' WHERE id='%i'",
    GetPlayerScore(playerid),GetPlayerSkin(playerid),GetPlayerMoney(playerid),sInfo[playerid][geschlecht],sInfo[playerid][alevel],sInfo[playerid][slevel],sInfo[playerid][fraktion],sInfo[playerid][rang],sInfo[playerid][leader],sInfo[playerid][coleader],sInfo,sInfo[playerid][spawnchange],sInfo[playerid][db_id]);
    return 1;
    }


    stock SaveAllPlayers()
    {
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    if(!IsPlayerConnected(playerid)) continue;
    new query[256];
    format(query,sizeof(query),"UPDATE user SET level='%i',skin='%i',geschlecht='%i',money='%i',alevel='%i',slevel='%i',fraktion='%i',rang='%i',leader='%i',coleader='%i',spawnchange='%i' WHERE id='%i'",
    GetPlayerScore(playerid),GetPlayerSkin(playerid),GetPlayerMoney(playerid),sInfo[playerid][geschlecht],sInfo[playerid][alevel],sInfo[playerid][slevel],sInfo[playerid][fraktion],sInfo[playerid][rang],sInfo[playerid][leader],sInfo[playerid][coleader],sInfo,sInfo[playerid][spawnchange],sInfo[playerid][db_id]);
    mysql_function_query(dbhandle,query,false,"","");
    }
    return 1;
    }


    resetPlayer(playerid)
    {
    sInfo[playerid][level]=0;
    sInfo[playerid][eingeloggt]=0;
    sInfo[playerid][db_id]=0;
    sInfo[playerid][geschlecht]=0;
    sInfo[playerid][alevel]=0;
    sInfo[playerid][slevel]=0;
    sInfo[playerid][Skin]=0;
    sInfo[playerid][fraktion]=0;
    sInfo[playerid][rang]=0;
    sInfo[playerid][leader]=0;
    sInfo[playerid][coleader]=0;
    sInfo[playerid][spawnchange]=0;
    return 1;
    }


    new name[MAX_PLAYER_NAME],query[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(query,sizeof(query),"SELECT id FROM user WHERE username='%s'",name);
    mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);


    if(dialogid==DIALOG_REGISTER)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>3)
    {
    //Registrierungsfunktion
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s') ",name,passwort);
    mysql_function_query(dbhandle,query,false,"OnPlayerRegister","d",playerid);
    TogglePlayerControllable(playerid,0);
    sInfo[playerid][regstep] = 1;
    ShowPlayerDialog(playerid,DIALOG_REGISTER2,DIALOG_STYLE_LIST,"Wähle dein Geschlecht","Männlich\nWeiblich","Auswählen","");
    return 1;
    }
    else
    {
    //Kleiner als 4 Zeichen
    SendClientMessage(playerid,ROT,"Dein Passwort muss mindestens 4 Zeichen lang sein.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }


    if(dialogid==DIALOG_REGISTER2)
    {
    if(dialogid==DIALOG_REGISTER2)
    {
    sInfo[playerid][geschlecht] = listitem+1; // 1 = männlich 2 = weiblich
    sInfo[playerid][regstep] = 0;
    sInfo[playerid][tutpart] = 1;
    SetTimerEx("TutTimer",2000,false,"i",playerid);
    return savePlayer(playerid);
    }
    }



    public TutTimer(playerid)
    {
    if(sInfo[playerid][tutpart] == 1)
    {
    SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
    SetPlayerFacingAngle(playerid,272.6125);
    SetCameraBehindPlayer(playerid);
    SetPlayerVirtualWorld(playerid,25);
    InterpolateCameraPos(playerid, 1115.584228, -1728.955566, 35.356784, 1190.537475, -1698.813476, 38.931377, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1120.251953, -1730.533691, 34.507175, 1191.590576, -1703.500488, 37.544792, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 2;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 2)
    {
    SetPlayerPos(playerid,1176.4874,-1649.7354,14.0049);
    SetPlayerFacingAngle(playerid,196.8897);
    SetCameraBehindPlayer(playerid);
    InterpolateCameraPos(playerid, -1991.850219, -67.903274, 55.942722, -2080.126220, -53.976066, 55.603290, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, -1994.148071, -72.153877, 54.657318, -2077.844238, -58.186519, 54.166343, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 3;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 3)
    {
    SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
    SetPlayerFacingAngle(playerid,272.6125);
    SetCameraBehindPlayer(playerid);
    InterpolateCameraPos(playerid, 1419.323608, -1036.734741, 34.718708, 1490.344116, -1047.630981, 35.451251, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1423.311035, -1034.124511, 33.206516, 1487.870605, -1043.521362, 34.039466, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 4;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 4)
    {
    SetPlayerVirtualWorld(playerid,0);
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    TogglePlayerSpectating(playerid, 0);
    savePlayer(playerid);
    return 1;
    }
    return 1;
    }


    public OnPlayerRegister(playerid)
    {
    sInfo[playerid][db_id] = mysql_insert_id();
    SendClientMessage(playerid, ROT, "=====> Willkommen auf PlayPoint Reallife <=====!");
    SendClientMessage(playerid, GELB, "=====>Es folgt nun das Tutorial<=====");
    SetPlayerMoney(playerid, 2500);
    SetPlayerScore(playerid, 1);
    SetTimerEx("SkinTimer", 200, 0, "dd", playerid, 26);
    SetPlayerColor(playerid, 0xFF00FFFF);
    savePlayer(playerid);
    printf("%s hat sich Registriert!)",getPlayerName(playerid));
    }



    [18:28:45] [DEBUG] mysql_connect - host: "127.0.0.1", user: "xSnake", database: "samp", password: "****", port: 3306, autoreconnect: true
    [18:28:45] [DEBUG] CMySQLHandle::Create - creating new connection..
    [18:28:45] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [18:28:45] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
    [18:28:45] [DEBUG] CMySQLConnection::Connect - connection was successful
    [18:28:45] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [18:28:45] [DEBUG] CMySQLConnection::Connect - connection was successful
    [18:28:45] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [18:29:13] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM user WHERE username='GTest'", callback: "OnUserCheck", format: "i"
    [18:29:13] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [18:29:13] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='GTest'"..
    [18:29:13] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
    [18:29:13] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - query was successful
    [18:29:13] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [18:29:13] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
    [18:29:13] [DEBUG] Calling callback "OnUserCheck"..
    [18:29:13] [DEBUG] cache_get_data - connection: 1
    [18:29:13] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [18:29:13] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
    [18:29:21] [DEBUG] mysql_escape_string - source: "sdfh", connection: 1, max_len: 35
    [18:29:21] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO user (username,password) VALUES ('GTest','sdfh') ", callback: "OnPlayerRegister", format: "d"
    [18:29:21] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [18:29:21] [DEBUG] mysql_tquery - scheduling query "INSERT INTO user (username,password) VALUES ('GTest','sdfh') "..
    [18:29:21] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - starting query execution
    [18:29:21] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - query was successful
    [18:29:21] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [18:29:21] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - data being passed to ProcessCallbacks()
    [18:29:21] [DEBUG] Calling callback "OnPlayerRegister"..
    [18:29:21] [DEBUG] cache_insert_id - connection: 1
    [18:29:21] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [18:29:21] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called


    achso :DD
    Jeffry
    [17:43:50] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM user WHERE username='Test'", callback: "OnUserCheck", format: "i"
    [17:43:50] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [17:43:50] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='Test'"..
    [17:43:50] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
    [17:43:50] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - query was successful
    [17:43:50] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [17:43:50] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
    [17:43:50] [DEBUG] Calling callback "OnUserCheck"..
    [17:43:50] [DEBUG] cache_get_data - connection: 1
    [17:43:51] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [17:43:51] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
    [17:44:15] [DEBUG] mysql_escape_string - source: "aegsrg", connection: 1, max_len: 35
    [17:44:15] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO user (username,password) VALUES ('Test','aegsrg') ", callback: "OnPlayerRegister", format: "d"
    [17:44:15] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [17:44:15] [DEBUG] mysql_tquery - scheduling query "INSERT INTO user (username,password) VALUES ('Test','aegsrg') "..
    [17:44:15] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - starting query execution
    [17:44:15] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - query was successful
    [17:44:15] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [17:44:15] [DEBUG] CMySQLQuery::Execute[OnPlayerRegister(d)] - data being passed to ProcessCallbacks()
    [17:44:15] [DEBUG] Calling callback "OnPlayerRegister"..
    [17:44:15] [DEBUG] cache_insert_id - connection: 1
    [17:44:15] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [17:44:15] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called



    //e info
    //e2 habe den Code erneuert hatte OnPlayerRegister bissn wo anders hingesetzt

    Jeffry:
    habe den befehler behoben,das ist noch von gestern abend bevor ich den fehler behoben habe
    savePlayer(playerid)
    {
    sInfo[playerid][eingeloggt] = 1;
    new query[256];
    format(query,sizeof(query),"UPDATE user SET level='%i',skin='%i',geschlecht='%i',money='%i',alevel='%i',slevel='%i',fraktion='%i',rang='%i',leader='%i',coleader='%i',spawnchange='%i' WHERE id='%i'",
    GetPlayerScore(playerid),GetPlayerSkin(playerid),GetPlayerMoney(playerid),sInfo[playerid][geschlecht],sInfo[playerid][alevel],sInfo[playerid][slevel],sInfo[playerid][fraktion],sInfo[playerid][rang],sInfo[playerid][leader],sInfo[playerid][coleader],sInfo,sInfo[playerid][spawnchange],sInfo[playerid][db_id]);
    return 1;
    }


    das oder was meinst du ?

    Jeffry:
    Kaliber:
    [19:30:15] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:32:31] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:32:31] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:37:48] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:38:46] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'i' in 'where clause'
    [19:47:59] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:47:59] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'geschelcht' in 'field list'
    [19:49:05] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0' at line 1
    [19:49:05] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0' at line 1
    [19:55:54] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'W' at line 1
    [19:55:54] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'W' at line 1
    [19:58:45] [ERROR] CMySQLQuery::Execute[()] - (error #1054) Unknown column 'i' in 'where clause'

    denke ehr das es liegt daran oder ? das er dort Geschlecht keine varriable gib oder ?
    Jeffry:
    if(dialogid==DIALOG_REGISTER2)
    {
    sInfo[playerid][geschlecht] = listitem+1; // 1 = männlich 2 = weiblich
    sInfo[playerid][regstep] = 0;
    sInfo[playerid][tutpart] = 1;
    SetTimerEx("TutTimer",2000,false,"i",playerid);
    return 1;
    }

    ich habe mir einen Neuen Account gemacht und dann mich registriert aber die spalte geschlecht
    und der skin 26 wird nicht gesetzt
    meine datebank


    wo liegt der Fehler ? 8|



    #define DIALOG_REGISTER 2
    #define DIALOG_REGISTER2 31


    enum playerInfo{
    eingeloggt,
    level,
    db_id,
    alevel,
    slevel,
    Skin,
    fraktion,
    rang,
    leader,
    coleader,
    spawnchange,
    tutpart,
    regstep,
    geschlecht
    }


    savePlayer(playerid)
    {
    sInfo[playerid][eingeloggt] = 1;
    new query[156];
    format(query,sizeof(query),"UPDATE user SET level='%i',skin='%i',money='%i',geschelcht='%i',alevel='%i',slevel='%i',fraktion='%i',rang='%i',leader='%i',coleader='%i',spawnchange='%i' WHERE id='%i'",
    GetPlayerScore(playerid),GetPlayerSkin(playerid),GetPlayerMoney(playerid),sInfo[playerid][geschlecht],sInfo[playerid][alevel],sInfo[playerid][slevel],sInfo[playerid][fraktion],sInfo[playerid][rang],sInfo[playerid][leader],sInfo[playerid][coleader],sInfo[playerid][spawnchange],sInfo[playerid][db_id]);
    mysql_function_query(dbhandle,query,false,"","");
    return 1;
    }


    resetPlayer(playerid)
    {
    sInfo[playerid][level]=0;
    sInfo[playerid][eingeloggt]=0;
    sInfo[playerid][db_id]=0;
    sInfo[playerid][geschlecht]=0;
    sInfo[playerid][alevel]=0;
    sInfo[playerid][slevel]=0;
    sInfo[playerid][Skin]=0;
    sInfo[playerid][fraktion]=0;
    sInfo[playerid][rang]=0;
    sInfo[playerid][leader]=0;
    sInfo[playerid][coleader]=0;
    sInfo[playerid][spawnchange]=0;
    return 1;
    }


    public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    //Spieler laden
    TogglePlayerSpectating(playerid, 0);
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][Skin] = cache_get_field_content_int(0,"skin",dbhandle);
    SetPlayerSkin(playerid,sInfo[playerid][Skin]);
    sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
    SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
    sInfo[playerid][geschlecht] = cache_get_field_content_int(0,"geschlecht",dbhandle);
    sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
    sInfo[playerid][slevel] = cache_get_field_content_int(0,"slevel",dbhandle);
    sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
    sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
    sInfo[playerid][leader] = cache_get_field_content_int(0,"leader",dbhandle);
    sInfo[playerid][coleader] = cache_get_field_content_int(0,"coleader",dbhandle);
    sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
    SendClientMessage(playerid,ROT,"*Erfolgreich eingeloggt.");
    SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
    SendClientMessage(playerid,Orange,"!!! Playpoint-Reallife - we are the Gamer!!!");
    SendClientMessage(playerid,Orange,"!!! Das Orginale...alles andere ist eine Kopie !!!");
    SendClientMessage(playerid,weiß,"===============|WILLKOMMEN|===============");
    loadPlayerCars(playerid);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Das eigegeben Passwort ist fasch");
    new string[128];
    format(string,sizeof(string),"{FFFF00}Hallo %s\n{FFFFFF}Dein Account wurde gefunden!\nBitte gib nun dein Passwort ein\ndamit du dich einloggen kannst!",getPlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbrechen");
    }
    return 1;
    }


    if(dialogid==DIALOG_REGISTER)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>3)
    {
    //Registrierungsfunktion
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s') ",name,passwort);
    mysql_function_query(dbhandle,query,false,"OnPlayerRegister","d",playerid);//kann ich das auch beim DIALOG_REGISTER2 ausführen ?
    TogglePlayerControllable(playerid,0);
    sInfo[playerid][regstep] = 1;
    ShowPlayerDialog(playerid,DIALOG_REGISTER2,DIALOG_STYLE_LIST,"Wähle dein Geschlecht","Männlich\nWeiblich","Auswählen","");
    return 1;
    }
    else
    {
    //Kleiner als 4 Zeichen
    SendClientMessage(playerid,ROT,"Dein Passwort muss mindestens 4 Zeichen lang sein.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }


    if(dialogid==DIALOG_REGISTER2)
    {
    sInfo[playerid][geschlecht] = listitem+1; // 1 = männlich 2 = weiblich
    sInfo[playerid][regstep] = 0;
    sInfo[playerid][tutpart] = 1;
    SetTimerEx("TutTimer",2000,false,"i",playerid);
    return 1;
    }
    return 1;
    }


    public TutTimer(playerid)
    {
    if(sInfo[playerid][tutpart] == 1)
    {
    SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
    SetPlayerFacingAngle(playerid,272.6125);
    SetCameraBehindPlayer(playerid);
    SetPlayerVirtualWorld(playerid,25);
    InterpolateCameraPos(playerid, 1115.584228, -1728.955566, 35.356784, 1190.537475, -1698.813476, 38.931377, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1120.251953, -1730.533691, 34.507175, 1191.590576, -1703.500488, 37.544792, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 2;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 2)
    {
    SetPlayerPos(playerid,1176.4874,-1649.7354,14.0049);
    SetPlayerFacingAngle(playerid,196.8897);
    SetCameraBehindPlayer(playerid);
    InterpolateCameraPos(playerid, -1991.850219, -67.903274, 55.942722, -2080.126220, -53.976066, 55.603290, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, -1994.148071, -72.153877, 54.657318, -2077.844238, -58.186519, 54.166343, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 3;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 3)
    {
    SetPlayerPos(playerid,1494.8136,-1666.0505,14.0469);
    SetPlayerFacingAngle(playerid,272.6125);
    SetCameraBehindPlayer(playerid);
    InterpolateCameraPos(playerid, 1419.323608, -1036.734741, 34.718708, 1490.344116, -1047.630981, 35.451251, 10000,CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1423.311035, -1034.124511, 33.206516, 1487.870605, -1043.521362, 34.039466, 10000,CAMERA_MOVE);
    sInfo[playerid][tutpart] = 4;
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    return 1;
    }
    if(sInfo[playerid][tutpart] == 4)
    {
    SetPlayerVirtualWorld(playerid,0);
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    TogglePlayerControllable(playerid,1);
    TogglePlayerSpectating(playerid, 0);
    savePlayer(playerid);
    return 1;
    }
    return 1;
    }

    /wetter LS 8



    /gotosf siehe pic gleiches wetter


    /wetter SF 2


    /gotols jetze das wetter 2 auch in LS



    [19:17:02] wo=LS | W0=8 | W1=2 | W2=1
    [19:17:02] Setze Wetter für 0 zu 8 in LS
    [19:17:13] Der Admin [RGR]xSnake hat sich nach SF teleportiert)
    [19:17:38] wo=SF | W0=8 | W1=2 | W2=1
    [19:17:38] Setze Wetter für 0 zu 2 in SF
    [19:17:45] Der Admin [RGR]xSnake hat sich nach LS teleportiert)

    Oben eine Variable erstellen, die das Geschlecht des Spielers angibt, am besten im enum...


    in einem Dialog die Antwort abfragen und mit den Zahlen 1 und 2 in der Datenbank speichern!
    1 -> Männlich
    2 -> Weiblich


    zum Beispiel halt..


    ja das habe ich habe nur vergessen das hier zu zeigen in meinen player enum habe ich geschlecht aber wenn ich jetze in der liste männlich anklicke wie set ich dann den wert in der dabelle auf 1 ? bzw wenn ich weiblich anklicke das der wert dann auch 2 gesetzt wird ?


    muss ich das dann so machen ?
    new query[128];
    format(query,sizeof(query),"INSERT INTO user (geschlecht) VALUES ('%i') ",geschlecht);

    Jeffry:
    habe eingegeben
    /wetter LS 1
    /wetter SF 2
    /wetter LV 3


    [18:54:07] wo=LS | W0=1 | W1=0 | W2=0
    [18:54:07] Setze Wetter für 0 zu 0 in LV
    [18:54:12] wo=SF | W0=1 | W1=2 | W2=0
    [18:54:12] Setze Wetter für 0 zu 0 in LV
    [18:54:21] wo=LV | W0=1 | W1=2 | W2=3
    [18:54:21] Setze Wetter für 0 zu 3 in LV

    Hallo ich will gerade das so machen das das Gelschecht gespeichert wird aber wie ?
    Jeffry:
    hast du da ne Lösung ?


    #define DIALOG_REGISTER
    #define DIALOG_REGISTER2


    if(dialogid==DIALOG_REGISTER)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>3)
    {
    //Registrierungsfunktion
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s') ",name,passwort);
    mysql_function_query(dbhandle,query,false,"OnPlayerRegister","d",playerid);//kann ich das auch beim DIALOG_REGISTER2 ausführen ?
    TogglePlayerControllable(playerid,0);
    sInfo[playerid][regstep] = 1;
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER2,DIALOG_SYTLE_LIST,"Wähle dein Geschlecht","Männlich\nWeiblich","Wählen","Abbruch");
    }
    return 1;
    }
    else
    {
    //Kleiner als 4 Zeichen
    SendClientMessage(playerid,ROT,"Dein Passwort muss mindestens 4 Zeichen lang sein.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }

    if(dialogid==DIALOG_REGISTER2)
    {
    if(response==0)
    {
    return 1;
    }
    if(listitem==0)
    {
    //hier dann die varriable 1 in geschlecht
    sInfo[playerid][regstep] = 0;
    sInfo[playerid][tutpart] = 1;
    SetTimerEx("TutTimer",2000,false,"i",playerid);

    }
    if(listitem==1)
    {
    //hier dann die varriable 2 in geschlecht
    sInfo[playerid][regstep] = 0;
    sInfo[playerid][tutpart] = 1;
    SetTimerEx("TutTimer",2000,false,"i",playerid);
    }
    return 1;
    }

    Jeffry:
    Danke jetze funktioniert es aber es verändert sich überall
    und in den Server Logs kommt das hier
    [17:34:42] sscanf warning: Strings without a length are deprecated, please add a destination size.

    Hallo com Mein wetter system buggt i-wie ein bissn rum ? aber why 8|
    also gestern abend war es dunkel wie es sein soll und jetze ist es hell wie es sein soll aber wenn ich /wetter LS 8 oder so eingebe kommt zwar die nachricht es passiert aber nichts



    //oben im script
    new WetterRandomLS[] = { 1,2,3,15 };
    new WetterRandomSF[] = { 5,6,16 };
    new WetterRandomLV[] = { 1,2,3,4,5,18 };
    new Weather[4],
    WetterTimer;


    forward SetWetter();


    //OnGameModeInit
    SetTimer("MinutenTimer",1000*60,true);
    WetterTimer = 45;


    ocmd:wetter(playerid,params[]){
    if(!isAdmin(playerid,3)) return SendClientMessage(playerid,ROT,"Info: Du bist dazu nicht befugt!");
    if(adminduty[playerid] == 0) return SendClientMessage(playerid,ROT,"Du bist nicht Aduty!");
    new wid,wo[3];
    if(sscanf(params,"si",wo,wid)) return SendClientMessage(playerid,-1,"Benutze: /wetter [LS/SF/LV] [WetterID]");
    if(strcmp(wo,"LS",true) == 0) Weather[0] = wid;
    if(strcmp(wo,"SF",true) == 0) Weather[1] = wid;
    if(strcmp(wo,"LV",true) == 0) Weather[2] = wid;
    SendClientMessage(playerid,-1,"Wetter erfolgreich geändert.");
    return 1;
    }


    public SetWetter(){
    new Float:xx, Float:yy, Float:zz;
    for(new i=0; i< GetMaxPlayers(); i++){
    if(IsPlayerConnected(i)){
    GetPlayerPos(i, xx, yy, zz);
    if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000)) SetPlayerWeather(i, Weather[0]);//LS
    if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000)) SetPlayerWeather(i, Weather[1]);//SF
    if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000)) SetPlayerWeather(i, Weather[2]);//LV
    }
    }
    return 1;
    }


    public MinutenTimer(){
    new x[4],var = 0;
    gettime(x[1],x[2],x[3]);
    switch(x[1]){
    case 9..19:{
    var = 1;
    SetWorldTime(x[1]);
    }
    }
    if(var == 0) SetWorldTime(24);


    WetterTimer -= 1;
    if(WetterTimer == 0){
    Weather[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
    Weather[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
    Weather[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
    WetterTimer = 45;
    }
    }