Beiträge von reaL.


    public zugwarten()
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInCheckpoint(i))
    {
    SetPlayerCheckpoint(i,zinfo[i][z_x],zinfo[i][z_y],zinfo[i][z_z],3);
    SendClientMessage(i,grün,"Du musst 10sekunden warten bis du weiter fahren darfst!");
    TogglePlayerControllable(playerid,0);
    SetTimerEx("Unfreeze",10000,false,"i",i);
    }
    else
    {
    DestroyVehicle(538);
    SendClientMessage(i,rot,"Da du keine 10Sekunden gewartet hast wurde die Arbeit abgebrochen und dein Zug neugesetzt!");

    }
    }
    return 1;
    }
    Forward Unfreeze(playerid;
    Public:Unfreeze(playerid)
    {
    SendClientMessage(playerid,rot,"Du kannst weiter fahren!
    TogglePlayerControllable(playerid,1);
    Return 1;
    }


    @Handy

    wenn ich das Ausklammere dann geht es bis Wird aufgerufen 2
    Jeffry:
    Kaliber:


    savePlayercar(carid)
    {
    printf("Wird aufgerufen");
    new query[1024];
    /*cInfo[carid][Spoiler] = GetVehicleComponentInSlot(carid, CARMODTYPE_SPOILER);
    cInfo[carid][Hood] = GetVehicleComponentInSlot(carid, CARMODTYPE_HOOD);
    cInfo[carid][Roof] = GetVehicleComponentInSlot(carid, CARMODTYPE_ROOF);
    cInfo[carid][Sideskirt] = GetVehicleComponentInSlot(carid, CARMODTYPE_SIDESKIRT);
    cInfo[carid][Lamps] = GetVehicleComponentInSlot(carid, CARMODTYPE_LAMPS);
    cInfo[carid][Nitro] = GetVehicleComponentInSlot(carid, CARMODTYPE_NITRO);
    cInfo[carid][Exhaust] = GetVehicleComponentInSlot(carid, CARMODTYPE_EXHAUST);
    cInfo[carid][Wheels] = GetVehicleComponentInSlot(carid, CARMODTYPE_WHEELS);
    cInfo[carid][Stereo] = GetVehicleComponentInSlot(carid, CARMODTYPE_STEREO);
    cInfo[carid][Hydraulics] = GetVehicleComponentInSlot(carid, CARMODTYPE_HYDRAULICS);
    cInfo[carid][Front] = GetVehicleComponentInSlot(carid, CARMODTYPE_FRONT_BUMPER);
    cInfo[carid][Rear] = GetVehicleComponentInSlot(carid, CARMODTYPE_REAR_BUMPER);
    cInfo[carid][Ventr] = GetVehicleComponentInSlot(carid, CARMODTYPE_VENT_RIGHT);
    cInfo[carid][Ventl] = GetVehicleComponentInSlot(carid, CARMODTYPE_VENT_LEFT);*/
    printf("Wird aufgerufen2");
    format(query,sizeof query,"UPDATE autos SET model='%d',x='%f',y='%f',z='%f',r='%f',tank='%d',Kennzeichen='%d',Spoiler='%d',Hood='%d',Roof='%d',Sideskirt='%d',Lamps='%d',Nitro='%d',Exhaust='%d',Wheels='%d',Stereo='%d',",
    cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r],cInfo[carid][pctank],cInfo[carid][ckz],cInfo[carid][Spoiler],cInfo[carid][Hood],cInfo[carid][Roof],cInfo[carid][Sideskirt],cInfo[carid][Lamps],cInfo[carid][Nitro],cInfo[carid][Exhaust],cInfo[carid][Wheels],cInfo[carid][Stereo]);
    printf("Aufrufen 3");
    format(query,sizeof query,"%sHydraulics='%d',Front='%d',Rear='%d',Ventr='%d',Ventl='%d' WHERE id='%d'",query,
    cInfo[carid][Hydraulics],cInfo[carid][Front],cInfo[carid][Rear],cInfo[carid][Ventr],cInfo[carid][Ventl],cInfo[carid][db_id]);
    printf("Aufrufen 4");
    printf(query);
    mysql_function_query(dbhandle,query,false,"","");
    return 1;
    }

    Einfach das löschen
    und dann mit deine Varriablen ersetzen
    new string[144];
    format(string, sizeof(string), "Du hast soeben dein Fahrzeug (%s) geparkt!", GetVehicleFriendlyName(cInfo[i][id_x]));
    SendClientMessage(playerid,LEUCHTENDBLAU, string);
    printf("%s hat sein Fahrzeug %s Umgeparkt)",getPlayerName(playerid),GetVehicleFriendlyName(cInfo[i][id_x]));

    for(new i=0; i<sizeof(cInfo); i++)
    {
    if(cInfo[i][id_x]==0)continue;
    if(cInfo[i][besitzer]!=sInfo[playerid][db_id])continue;
    if(cInfo[i][id_x] != GetPlayerVehicleID(playerid)) continue;
    GetVehiclePos(cInfo[i][id_x],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z]);
    GetVehicleZAngle(cInfo[i][id_x],cInfo[i][c_r]);
    new query[256];
    format(query,sizeof(query),"UPDATE autos SET x='%f',y='%f',z='%f',r='%f' WHERE id='%i'",cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][db_id]);
    mysql_function_query(dbhandle,query,false,"","");
    new string[144];
    format(string, sizeof(string), "Du hast soeben dein Fahrzeug (%s) geparkt!", GetVehicleFriendlyName(cInfo[i][id_x]));
    SendClientMessage(playerid,LEUCHTENDBLAU, string);
    printf("%s hat sein Fahrzeug %s Umgeparkt)",getPlayerName(playerid),GetVehicleFriendlyName(cInfo[i][id_x]));
    }

    [18:27:36] [ERROR] CMySQLQuery::Execute[carSavedToDB] - (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 ''5.31750' at line 1


    saveCarToDB(playerid,carid)
    {
    new query[256];
    cInfo[carid][Spoiler] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SPOILER);
    cInfo[carid][Hood] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HOOD);
    cInfo[carid][Roof] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_ROOF);
    cInfo[carid][Sideskirt] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SIDESKIRT);
    cInfo[carid][Lamps] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_LAMPS);
    cInfo[carid][Nitro] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO);
    cInfo[carid][Exhaust] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_EXHAUST);
    cInfo[carid][Wheels] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_WHEELS);
    cInfo[carid][Stereo] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_STEREO);
    cInfo[carid][Hydraulics] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HYDRAULICS);
    cInfo[carid][Front] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_FRONT_BUMPER);
    cInfo[carid][Rear] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_REAR_BUMPER);
    cInfo[carid][Ventr] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_VENT_RIGHT);
    cInfo[carid][Ventl] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_VENT_LEFT);
    format(query, sizeof(query), "INSERT INTO `autos` (`besitzer`,`model`,`x`,`y`,`z`,`r`,`tank`,`Kennzeichen`,`Spoiler`,`Hood`,`Roof`,`Sideskirt`,`Lamps`,`Nitro`,`Exhaust`,`Wheels`,`Stereo`,`Hydraulics`,`Front`,`Rear`,`Ventr`,`Ventl`) ");
    format(query, sizeof(query), "%sVALUES ('%i','%i','%f','%f','%f','%f','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d')", query,
    sInfo[playerid][db_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r],cInfo[carid][pctank],cInfo[carid][ckz],
    cInfo[carid][Spoiler],cInfo[carid][Hood],cInfo[carid][Roof],cInfo[carid][Sideskirt],cInfo[carid][Lamps],cInfo[carid][Nitro],cInfo[carid][Exhaust],cInfo[carid][Wheels],cInfo[carid][Stereo],cInfo[carid][Hydraulics],cInfo[carid][Front],cInfo[carid][Rear],cInfo[carid][Ventr],cInfo[carid][Ventl]);
    mysql_function_query(dbhandle,query,true,"carSavedToDB","i",carid);
    return 1;
    }

    Hey ich wollte gerade mein Car system erweitern und jetze wird das Car nicht erstellt ?
    [18:05:20] [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 'INSERT INTO `autos` (`besitzer`,`model`,`x`,`y`,`z`,`r`,`tank`,`Kennzeichen`) VA' at line 1
    [18:05:20] [DEBUG] mysql_tquery - connection: 1, query: "( INSERT INTO `autos` (`besitzer`,`model`,`x`,`y`,`z`,`r`,`tank`", callback: "(null)", format: "(null)"
    saveCarToDB(playerid,carid)
    {
    new query[256];
    cInfo[carid][Spoiler] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SPOILER);
    cInfo[carid][Hood] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HOOD);
    cInfo[carid][Roof] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_ROOF);
    cInfo[carid][Sideskirt] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_SIDESKIRT);
    cInfo[carid][Lamps] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_LAMPS);
    cInfo[carid][Nitro] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO);
    cInfo[carid][Exhaust] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_EXHAUST);
    cInfo[carid][Wheels] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_WHEELS);
    cInfo[carid][Stereo] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_STEREO);
    cInfo[carid][Hydraulics] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_HYDRAULICS);
    cInfo[carid][Front] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_FRONT_BUMPER);
    cInfo[carid][Rear] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_REAR_BUMPER);
    cInfo[carid][Ventr] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_VENT_RIGHT);
    cInfo[carid][Ventl] = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_VENT_LEFT);
    format(query,sizeof(query),"INSERT INTO `autos` (`besitzer`,`model`,`x`,`y`,`z`,`r`,`tank`,`Kennzeichen`) VALUES ('%i','%i','%f','%f','%f','%f','%d')",
    sInfo[playerid][db_id],cInfo[carid][model],cInfo[carid][c_x],cInfo[carid][c_y],cInfo[carid][c_z],cInfo[carid][c_r],cInfo[carid][pctank],cInfo[carid][ckz]);
    format(query,sizeof(query),"( %s,`Spoiler`,`Hood`,`Roof`,`Sideskirt`,`Lamps`,`Nitro`,`Exhaust`,`Wheels`,`Stereo`,`Hydraulics`,`Front`,`Rear`,`Ventr`,`Ventl`) VALUES (,'%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d')",
    query,cInfo[carid][Spoiler],cInfo[carid][Hood],cInfo[carid][Roof],cInfo[carid][Sideskirt],cInfo[carid][Lamps],cInfo[carid][Nitro],cInfo[carid][Exhaust],cInfo[carid][Wheels],cInfo[carid][Stereo],cInfo[carid][Hydraulics],cInfo[carid][Front],cInfo[carid][Rear],cInfo[carid][Ventr],cInfo[carid][Ventl]);
    mysql_function_query(dbhandle,query,true,"carSavedToDB","i",carid);
    return 1;
    }

    Das ist dafür wenn jemand z.b /spawn macht und der Spieler Tot das der Spieler wieder aufm Friedhof und ist wenn er stirbt es dann auch dort ist


    public OnPlayerRequestClass(playerid, classid)
    {
    if(sInfo[playerid][PTot] == 1)
    {
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"");
    SendClientMessage(playerid,weiß,"Du bist soeben gestorben!");
    SendClientMessage(playerid,weiß,"Gleich wird ein Wunder passieren!");
    SetTimer("sekunde",sInfo[playerid][tott],0);
    SetPlayerVirtualWorld(playerid,89);
    SetPlayerPos(playerid,816.6987,-1103.0229,25.7914);
    }
    if(sInfo[playerid][jailtime] > 0)
    {
    SendClientMessage(playerid,IGELB,"Du musst deine Zeit im Knast noch absitzen!");
    SetTimer("sekunde",sInfo[playerid][jailtime],0);
    SetPlayerInterior(playerid,10);
    SetPlayerVirtualWorld(playerid,24);
    SetPlayerPos(playerid,sInfo[playerid][kx],sInfo[playerid][ky],sInfo[playerid][kz]);
    }
    else
    {
    SetSpawnInfo(playerid,0,26,370.3382,-2059.1753,8.6107,359.5793,0,0,0,0,0,0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SpawnPlayer(playerid);
    }
    return 1;
    }

    Ja habe ich


    [14:28:34] {FFFFFF}SA-MP {B9C9BF}0.3.7 {FFFFFF}Started
    [14:28:37] Connecting to 127.0.0.1:7777...
    [14:28:38] Connected. Joining the game...
    //Die Zeit Hier Zwischen es Dauert immer sehr Lange aber wieso ?
    [14:28:44] Connected to {B9C9BF}Red-Game0v3r-Reallife

    Es ist so das ich Auf dem Server Komme dann kommt das


    [14:02:11] {FFFFFF}SA-MP {B9C9BF}0.3.7 {FFFFFF}Started
    [14:02:11] Connecting to 127.0.0.1...


    und dann dauert das sehr Lange bis meine Textdraw's angezeigt werden und dann wenn sie angezeigt werden dann dauert es nochmal 2-3 Sec bis das kommt
    [14:02:16] Connected. Joining the game...


    und dann ich die dann Anklicken kann

    ich habe erst versucht zu erstellen das ging und dann mit ein 2 befehl das Object zu Moven aber das ging nicht dann habe ich auch versucht das object direkt beim erstellen zu Moven
    new Object;
    ocmd:test(playerid)
    {
    Object = CreateObject(1430,0,0,-1000,0,0,0,100);
    AttachObjectToVehicle(Object, GetPlayerVehicleID(playerid), 0.000000,-4.350000,-1.125000,0.000000,0.000000,0.000000);
    MoveObject(Object,0.000000,-4.125001,0.674999,10.0,-121.499946,0.000000,0.000000);
    return 1;
    }


    ocmd:test2(playerid)
    {
    MoveObject(Object,0.000000,-4.125001,0.674999,10.0,-121.499946,0.000000,0.000000);
    return 1;
    }

    Oke ich mache gleich ein Neues Thread auf aber habe das problem das es mit dem ü und so nicht geht


    format(string,sizeof(string),"Tüv: Ja");
    convert_encoding(string);
    GameTextForAll(string,5000,4);
    Textdraw7[playerid] = CreatePlayerTextDraw(playerid, 227.600082, 202.595504, string);



    und eine frage wie kann ich ein Object was ich am Fahrzeug Attachted habe bewegen ?