Er spawnt nicht da wo er spawnen soll.

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • OnPlayerConnect und OnPlayerSpawn public OnPlayerConnect(playerid)
    {
    new query[200];
    format(query,sizeof(query),"SELECT id FROM user WHERE username='%s'",PlayerName(playerid));
    mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);
    SetTimerEx("CheckLogin",60000,0,"d",playerid);
    sInfo[playerid][eingeloggt]=0;
    //OnPlayerSpawn(playerid);
    return 1;
    }


    savePlayer(playerid)
    {
    if(sInfo[playerid][eingeloggt]==0)return 1;
    new query[600];
    format(query,sizeof(query),"UPDATE user SET level='%i',money='%i',alevel='%i',Fraktion='%i',SkinID='%i',Rang='%i' WHERE id='%i'",sInfo[playerid][level],GetPlayerMoney(playerid),sInfo[playerid][alevel],sInfo[playerid][Fraktion],sInfo[playerid][SkinID],sInfo[playerid][Rang],sInfo[playerid][id]);
    mysql_function_query(dbhandle,query,false,"","");

    return 1;
    }



    er macht keine mysql_log obwohl es so im script steht: mysql_log(1);

  • [15:05:47] [DEBUG] mysql_connect - -
    [15:05:47] [DEBUG] CMySQLHandle::Create - creating new connection..
    [15:05:47] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [15:05:47] [DEBUG] CMySQLHandle::Create - connection created with ID = 1
    [15:05:48] [DEBUG] CMySQLHandle::Connect - connection was successful
    [15:05:48] [DEBUG] CMySQLHandle::Connect - auto-reconnect has been enabled
    [15:06:08] [DEBUG] mysql_tquery - connection handle: 1
    [15:06:08] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM user WHERE username='Mauricde'"..
    [15:06:08] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - starting query execution
    [15:06:08] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - query was successful
    [15:06:08] [DEBUG] CMySQLQuery::Execute[OnUserCheck(i)] - data being passed to ProcessCallbacks()
    [15:06:08] [DEBUG] Calling callback "OnUserCheck"..
    [15:06:08] [DEBUG] cache_get_data - connection handle: 1
    [15:06:08] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [15:06:10] [DEBUG] mysql_escape_string - connection handle: 1
    [15:06:10] [DEBUG] mysql_tquery - connection handle: 1
    [15:06:10] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM user WHERE username='Mauricde' AND password='elta123'"..
    [15:06:10] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - starting query execution
    [15:06:10] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - query was successful
    [15:06:10] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse(i)] - data being passed to ProcessCallbacks()
    [15:06:10] [DEBUG] Calling callback "OnPasswordResponse"..
    [15:06:10] [DEBUG] cache_get_data - connection handle: 1
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "0"
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "id", data: "22"
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "0"
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "alevel", data: "5"
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Fraktion", data: "1"
    [15:06:10] [DEBUG] cache_get_field_content_int - connection handle: 1
    [15:06:10] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Rang", data: "5"
    [15:06:10] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [15:06:14] [DEBUG] mysql_tquery - connection handle: 1
    [15:06:14] [DEBUG] mysql_tquery - scheduling query "UPDATE user SET level='0',money='0',alevel='5',Fraktion='1',SkinID='0',Rang='5' WHERE id='22'"..
    [15:06:14] [DEBUG] CMySQLQuery::Execute[()] - starting query execution
    [15:06:14] [DEBUG] CMySQLQuery::Execute[()] - query was successful
    [15:06:14] [DEBUG] CMySQLQuery::Execute[()] - no callback specified, skipping result saving
    [15:06:18] [DEBUG] mysql_close - connection handle: 1
    [15:06:18] [DEBUG] CMySQLHandle::Disconnect - connection was closed
    [15:06:18] [DEBUG] CMySQLHandle::~CMySQLHandle - deconstructor called

  • public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    //Passwort richtig
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][id] = cache_get_field_content_int(0,"id",dbhandle);
    SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
    sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
    sInfo[playerid][Fraktion] = cache_get_field_content_int(0,"Fraktion",dbhandle);
    sInfo[playerid][Rang] = cache_get_field_content_int(0,"Rang",dbhandle);
    }
    else
    {
    //Passwort falsch
    SendClientMessage(playerid,COLOR_RED,"Das eingegebene Passwort ist falsch.");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }

  • nur hier
    ocmd:makeleader(playerid,params[])
    {
    if(!isAdmin(playerid,4))return SendClientMessage(playerid,COLOR_RED,"Dein Adminrang ist zu niedrig.");
    new pID,f_Fraktion,gemacht[250],juhu[230],ftext[60];
    if(sscanf(params,"ui",pID,f_Fraktion))return SendClientMessage(playerid,COLOR_RED,"INFO: /makeFraktion [playerid] [Fraktion 0-2]");


    if(sInfo[playerid][Fraktion] == 0) { ftext = "Zivilist"; }
    else if(sInfo[playerid][Fraktion] == 1) { ftext = "Polizei"; }


    sInfo[pID][Fraktion]=f_Fraktion;
    sInfo[pID][Rang]=6;
    savePlayer(pID);
    format(juhu,sizeof(juhu),"Admin %s hat dich als Fraktion in der Fraktion %s gemacht.",PlayerName(playerid),ftext);
    SendClientMessage(pID,Orange,juhu);
    format(gemacht,sizeof(gemacht),"Du wurdest als Fraktion in der Fraktion: %s gemacht.",ftext);
    SendClientMessage(playerid,Orange,gemacht);
    return 1;
    }


    ich teste das mal mit printf


    //EDIT


    Es kommt der wert 0 raus

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen