Beiträge von RickFace

    Hallo liebe Community ich habe folgendes problem,
    ich habe mir einen Befehl erstellt in dem ich ein Auto für ein Autohaus Erstellen kann aber irgendwie taucht das Auto nirgends auf.....


    Hier mal der Code:


    ocmd:cac(playerid,params[])
    {
    if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,rot,"Du bist in einem Fahrzeug!");
    new Float:x,Float:y,Float:z,Float:r,Color1,Color2,ahid,kosten,vID;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,r);
    if(sscanf(params,"iiii",Color1,Color2,ahid,kosten,vID))return SendClientMessage(playerid,rot,"/cac [Farbe 1][Farbe 2][Autohaus ID][Kosten][Auto ID]");
    new mycar;
    mycar= CreateVehicle(vID,x,y,z,r,Color1,Color2,0,0);
    PutPlayerInVehicle(playerid,mycar,0);
    new query[164];
    format(query,sizeof query,"INSERT INTO autohaus SET(vehicleid,Color1,Color2,x,y,z,r,autohausid,kosten) VALUES('%i','%i','%i','%f','%f','%f','%f','%i','%i')",vID,Color1,Color2,x,y,z,r,ahid,kosten);
    mysql_function_query(dbhandle,query,false,"","");
    return 1;
    }

    Hallo liebe Community,
    ich habe folgendes Problem und zwar ist mir direkt aufgefallen als ich auf meinen Server gehen wollte das keine Login/Register Abfrage gestartet wurde und habe dann in der mysql_log dies gesehen:



    [19:44:35] [ERROR] CMySQLQuery::Execute[OnUserCheckBan(i)] - (error #2006) MySQL server has gone away
    [19:44:35] [WARNING] CMySQLQuery::Execute[OnUserCheckBan(i)] - lost connection, reconnecting..
    [19:44:35] [ERROR] CMySQLConnection::Connect - (error #2002) Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    [19:44:53] [ERROR] CMySQLQuery::Execute[()] - (error #2006) MySQL server has gone away
    [19:44:53] [WARNING] CMySQLQuery::Execute[()] - lost connection, reconnecting..
    [19:44:53] [ERROR] CMySQLConnection::Connect - (error #2002) Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


    was dass jetzt genau heißen soll weiß ich nicht aber wenn ich mal so grob drüber gucke sehe ich das er aufeinmal die Verbindung zum MySQL Server Verliert.


    Vielen Dank schonmal im vorraus

    Hallo liebe community,
    ich habe folgendes Problem und zwar wir mir in der Console folgendes angezeigt(Ich weiß nicht was ich damit anfangen soll):


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


    [19:06:52] filterscripts = "" (string)
    [19:06:52]
    [19:06:52] Server Plugins
    [19:06:52] --------------
    [19:06:52] Loading plugin: mysql.so
    [19:06:52] Failed (plugins/mysql.so: symbol __cxa_pure_virtual, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference)
    [19:06:52] Loaded 0 plugins.


    [19:06:52]
    [19:06:52] Filterscripts
    [19:06:52] ---------------
    [19:06:52] Loaded 0 filterscripts.


    [19:06:52] Script[gamemodes/LLR.amx]: Run time error 19: "File or function is not found"
    [19:06:52] Number of vehicle models: 0


    Vielen Dank schonmal im Vorraus


    :):)


    stock getFreeCarID()
    {
    for(new i=0; i<sizeof(vInfo); i++)
    {
    if(vInfo[i][v_id_x]==0)return i;
    }
    return 1;
    }



    enum VehicleDaten{
    v_db_id,
    v_paintjob,
    v_id_x[MAX_VEHICLES],
    v_vehicle_id,
    Float:v_x,
    Float:v_y,
    Float:v_z,
    Float:v_r,
    v_Color1,
    v_Color2,
    v_fraktion,
    v_nummer,
    v_spoiler,
    v_hood,
    v_roof,
    v_sideskirt,
    v_lamps,
    v_nitro,
    v_exhaust,
    v_wheels,
    v_stereo,
    v_hydraulics,
    v_front_bumper,
    v_rear_bumper,
    v_vent_left,
    v_vent_right
    }



    new vInfo[MAX_VEHICLES][VehicleDaten];


    public OnCarsLoad()
    {
    new num_rows, num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(!cache_get_row_count(dbhandle))return print("keine Autos");
    for(new i=0; i<cache_get_row_count(dbhandle); i++)
    {
    new vID = getFreeCarID();
    vInfo[vID][v_db_id]= cache_get_field_content_int(i,"id",dbhandle);
    vInfo[vID][v_nummer]=cache_get_field_content_int(i,"nummer",dbhandle);
    vInfo[vID][v_vehicle_id]= cache_get_field_content_int(i,"vehicleid",dbhandle);
    vInfo[vID][v_x]= cache_get_field_content_float(i,"x",dbhandle);
    vInfo[vID][v_y]= cache_get_field_content_float(i,"y",dbhandle);
    vInfo[vID][v_z]= cache_get_field_content_float(i,"z",dbhandle);
    vInfo[vID][v_r]= cache_get_field_content_float(i,"r",dbhandle);
    vInfo[vID][v_paintjob]=cache_get_field_content_int(i,"paintjob",dbhandle);
    vInfo[vID][v_Color1]= cache_get_field_content_int(i,"Color1",dbhandle);
    vInfo[vID][v_Color2]= cache_get_field_content_int(i,"Color2",dbhandle);
    vInfo[vID][v_fraktion]= cache_get_field_content_int(i,"fraktion",dbhandle);
    vInfo[vID][v_id_x]= CreateVehicle(vInfo[vID][v_vehicle_id],vInfo[vID][v_x],vInfo[vID][v_y],vInfo[vID][v_z],vInfo[vID][v_r],vInfo[vID][v_Color1],vInfo[vID][v_Color2],0);
    ChangeVehiclePaintjob(vInfo[vID][v_id_x],vInfo[vID][v_paintjob]);
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Spoiler",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Hood",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Roof",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Sideskirt",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Lamps",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Nitro",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Exhaust",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Wheels",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Stereo",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Hydraulics",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Front_Bumper",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Rear_Bumper",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Vent_Left",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Vent_Right",dbhandle));
    printf("Auto Type: %i, ID: %i geladen...",vInfo[vID][v_vehicle_id],vID);
    }
    print("Alle autos geladen!");
    return 1;
    }

    Hallo liebe community,


    ich habe folgendes problem und zwar wird beim laden des wagen andauernd der Paintjob überschrieben
    hier mal der PAWN-Code:



    public OnCarsLoad()
    {
    new num_rows, num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(!num_rows)return print("keine Autos");
    for(new i=0; i<num_rows; i++)
    {
    new vID = getFreeCarID();
    vInfo[vID][v_db_id]= cache_get_field_content_int(i,"id",dbhandle);
    vInfo[vID][v_nummer]=cache_get_field_content_int(i,"nummer",dbhandle);
    vInfo[vID][v_vehicle_id]= cache_get_field_content_int(i,"vehicleid",dbhandle);
    vInfo[vID][v_x]= cache_get_field_content_float(i,"x",dbhandle);
    vInfo[vID][v_y]= cache_get_field_content_float(i,"y",dbhandle);
    vInfo[vID][v_z]= cache_get_field_content_float(i,"z",dbhandle);
    vInfo[vID][v_r]= cache_get_field_content_float(i,"r",dbhandle);
    vInfo[vID][v_paintjob]=cache_get_field_content_int(i,"paintjob",dbhandle);
    vInfo[vID][v_Color1]= cache_get_field_content_int(i,"Color1",dbhandle);
    vInfo[vID][v_Color2]= cache_get_field_content_int(i,"Color2",dbhandle);
    vInfo[vID][v_fraktion]= cache_get_field_content_int(i,"fraktion",dbhandle);
    if(vInfo[vID][v_paintjob]==10)
    {
    vInfo[vID][v_id_x]= CreateVehicle(vInfo[vID][v_vehicle_id],vInfo[vID][v_x],vInfo[vID][v_y],vInfo[vID][v_z],vInfo[vID][v_r],vInfo[vID][v_Color1],vInfo[vID][v_Color2],0);
    }
    else
    {
    vInfo[vID][v_id_x]= CreateVehicle(vInfo[vID][v_vehicle_id],vInfo[vID][v_x],vInfo[vID][v_y],vInfo[vID][v_z],vInfo[vID][v_r],vInfo[vID][v_Color1],vInfo[vID][v_Color2],0);
    ChangeVehiclePaintjob(vInfo[vID][v_id_x],vInfo[vID][v_paintjob]);
    }
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Spoiler",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Hood",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Roof",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Sideskirt",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Lamps",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Nitro",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Exhaust",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Wheels",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Stereo",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Hydraulics",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Front_Bumper",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Rear_Bumper",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Vent_Left",dbhandle));
    AddVehicleComponent(vInfo[vID][v_id_x],cache_get_field_content_int(i,"Vent_Right",dbhandle));
    printf("Auto Type: %i, ID: %i geladen...",vInfo[vID][v_vehicle_id],vID);
    }
    print("Alle autos geladen!");
    return 1;
    }