Beiträge von Sam Cooper

    Biz Name aus der MYSQL DatenBank Auslessen:



    enum BizInfomation
    {
    Bizname[128],
    BizOwner[128],
    BizCoOwner[128],
    BizPreis,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    BizOwned,
    }
    new BizInfo[MAX_BIZ][BizInfomation];



    OnGameModInit
    for(new i = 0;i<MAX_BIZ;i++)
    {
    if(BizInfo[i][BizOwned] == 0)
    {
    new bizkaufen[350];
    AddStaticPickup(1273, 1, BizInfo[i][PosX], BizInfo[i][PosY], BizInfo[i][PosZ]);
    format(bizkaufen,sizeof(bizkaufen),"Name: %s\nBesitzer: Die Staat\nPreis:%d",BizInfo[i][Bizname],BizInfo[i][BizPreis]);
    Create3DTextLabel(bizkaufen,ROT,BizInfo[i][PosX],BizInfo[i][PosY],BizInfo[i][PosZ],40.0,0);
    }
    if(BizInfo[i][BizOwned] == 1)
    {
    new bizgekauft[350];
    AddStaticPickup(1239, 1, BizInfo[i][PosX], BizInfo[i][PosY], BizInfo[i][PosZ]);
    format(bizgekauft,sizeof(bizgekauft),"Name: %s\nBesitzer: %s\nMitbesitzer: %s",BizInfo[i][Bizname],BizInfo[i][BizOwner],BizInfo[i][BizCoOwner]);
    Create3DTextLabel(bizgekauft,ROT,BizInfo[i][PosX],BizInfo[i][PosY],BizInfo[i][PosZ],40.0,0);
    }
    }



    stock LoadBizData()
    {
    for(new i=0;i<MAX_BIZ;i++)
    {
    new query[128],data[128],bedienung[40];
    format(bedienung,sizeof(bedienung),"id='%i'",i);
    format(query,sizeof(query),"SELECT * FROM bizdata WHERE %s", bedienung);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())
    {
    mysql_fetch_field("BizName",data); BizInfo[i][Bizname] = strval(data); format(data,sizeof(data),"%s",BizInfo[i][Bizname]);
    mysql_fetch_field("BizOwner",data); BizInfo[i][BizOwner] = strval(data); format(data,sizeof(data),"%s",BizInfo[i][BizOwner]);
    mysql_fetch_field("BizCoOwner",data); BizInfo[i][BizCoOwner] = strval(data); format(data,sizeof(data),"%s",BizInfo[i][BizCoOwner]);
    mysql_fetch_field("BizPreis",data); BizInfo[i][BizPreis] =strval(data); strdel(data,0,100);
    mysql_fetch_field("BizX",data); BizInfo[i][PosX] =strval(data); strdel(data,0,100);
    mysql_fetch_field("BizY",data); BizInfo[i][PosY] =strval(data); strdel(data,0,100);
    mysql_fetch_field("BizZ",data); BizInfo[i][PosZ] =strval(data); strdel(data,0,100);
    mysql_fetch_field("BizOwned",data); BizInfo[i][BizOwned] =strval(data); strdel(data,0,100);
    }
    mysql_free_result();
    }
    return 1;
    }



    Was ist falsch ???


    MFG


    Ingo


    //edit: hab ich da was vergessen oder nicht blick da nicht so durch -.- ?

    Lifestyler übertreibt da schon mit seine -10/10 Punkten .
    Sein Erster Versuch war auch nicht besser!
    ---------------------------------------------------------------


    Also ich finde es gut nur wie gesagt die ecken und etwas mehr Efecte ^^


    MFG


    Ingo

    Jetzt wird mir bei jeden Auto wo ich einsteige (Debug: Falsch) und werde rausgeworfen ??


    ENUM:

    enum carInfo
    {
    frakid,
    frakname[5],
    carid,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    Farbe1,
    Farbe2,
    }
    new AutoInfo[MAX_VEHICLES][carInfo];


    Strock:

    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(GetPlayerVehicleID(playerid))
    {
    if(!strcmp(AutoInfo[i][frakname],"LCN1",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    RemovePlayerFromVehicle(playerid);
    break;
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"LSPD",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    break;
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"Zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    break;
    }
    }
    }
    }
    }
    return 1;
    }


    OnPlayerStaats:

    stock LoadAutosData()
    {
    for(new i;i<MAX_VEHICLES;i++)
    {
    new query[128],data[128],bedienung[40];
    format(bedienung,sizeof(bedienung),"id='%i'",i);
    format(query,sizeof(query),"SELECT * FROM cardata WHERE %s", bedienung);//Die query
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())// Eine Abfrage zur Sicherheit
    {
    mysql_fetch_field("fn",data);
    AutoInfo[i][frakid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("CarID",data);
    AutoInfo[i][carid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("X",data);
    AutoInfo[i][PosX]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Y",data);
    AutoInfo[i][PosY]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Z",data);
    AutoInfo[i][PosZ]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("A",data);
    AutoInfo[i][PosA]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe1",data);
    AutoInfo[i][Farbe1]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe2",data);
    AutoInfo[i][Farbe2]=strval(data);
    strdel(data,0,100);
    }
    CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);
    if(AutoInfo[i][frakid] == 0)
    {
    AutoInfo[i][frakname] = "Zivi" ;
    }
    if(AutoInfo[i][frakid] == 1)
    {
    AutoInfo[i][frakname] = "LSPD" ;
    }
    if(AutoInfo[i][frakid] == 2)
    {
    AutoInfo[i][frakname] = "AMRY" ;
    }
    if(AutoInfo[i][frakid] == 5)
    {
    AutoInfo[i][frakname] = "LCN1" ;
    }
    mysql_free_result();
    }
    return 1;
    }

    Kann einer mir das so machen das man nur mit einer Bestimmten Fraktion das Autofahren (FraktionsAutos) kann (MYSQL)


    Enum:

    enum carInfo
    {
    frakid,
    carid,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    Farbe1,
    Farbe2,
    }
    new AutoInfo[MAX_VEHICLES][carInfo];

    Laden:

    stock LoadAutosData()
    {
    for(new i;i<MAX_VEHICLES;i++)
    {
    new query[128],data[128],bedienung[40], carname[64];
    format(bedienung,sizeof(bedienung),"id='%i'",i);
    format(query,sizeof(query),"SELECT * FROM cardata WHERE %s", bedienung);//Die query
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())// Eine Abfrage zur Sicherheit
    {
    mysql_fetch_field("fn",data);
    AutoInfo[i][frakid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("CarID",data);
    AutoInfo[i][carid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("X",data);
    AutoInfo[i][PosX]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Y",data);
    AutoInfo[i][PosY]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Z",data);
    AutoInfo[i][PosZ]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("A",data);
    AutoInfo[i][PosA]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe1",data);
    AutoInfo[i][Farbe1]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe2",data);
    AutoInfo[i][Farbe2]=strval(data);
    strdel(data,0,100);
    }
    CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);
    mysql_free_result();
    printf("%d|%d|%d|%d|%d|%d|%d|%d",AutoInfo[i][frakname],AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2]);
    }
    return 1;
    }



    Bitte um Hilfen .


    Mit Freudlichen Grüßen


    Ingo

    So Danke Jetzt kommt der Text


    nur Leide ist da noch ein Fehler.


    Ich bin in Fraktion nummer 5 kann aber auch in die Autos von Fraktion 1 ?


    also lcn = 5


    lspd = 1


    und kann in jedes fahrzeug kann man da mir helfen ???



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(GetPlayerVehicleID(playerid))
    {
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    break;
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    break;
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    break;
    }
    }
    }
    }
    }



    Server-Log:


    ----------
    Loaded log file: "server_log.txt".
    ----------


    SA-MP Dedicated Server
    ----------------------
    v0.3c R2, (C)2005-2011 SA-MP Team


    [20:59:55]
    [20:59:55] Server Plugins
    [20:59:55] --------------
    [20:59:55] Loading plugin: mysql.so
    [20:59:55] SA:MP MySQL Plugin v2.1.1 Loaded.
    [20:59:55] [MySQL] Thread running. Threadsafe: Yes.
    [20:59:55] Loaded.
    [20:59:55] Loading plugin: sscanf.so
    [20:59:55]


    [20:59:55] ===============================


    [20:59:55] sscanf plugin loaded.


    [20:59:55] (c) 2009 Alex "Y_Less" Cole


    [20:59:55] ===============================


    [20:59:55] Loaded.
    [20:59:55] Loading plugin: streamer.so
    [20:59:55]


    *** Streamer Plugin v2.5.2 by Incognito loaded ***


    [20:59:55] Loaded.
    [20:59:55] Loaded 3 plugins.


    [20:59:55]
    [20:59:55] Filter Scripts
    [20:59:55] ---------------
    [20:59:55] Loading filter script 'base.amx'...
    [20:59:55]
    --Base FS loaded.


    [20:59:55] Loading filter script 'gl_actions.amx'...
    [20:59:55] Loading filter script 'gl_property.amx'...
    [20:59:55]
    -----------------------------------
    [20:59:55] Grand Larceny Property Filterscript
    [20:59:55] -----------------------------------


    [20:59:55] Loading filter script 'gl_realtime.amx'...
    [20:59:55] Loaded 4 filter scripts.


    [20:59:55] [MySQL] Connected (0) to 'root'@'127.0.0.1 via TCP/IP'.
    [20:59:55] [MySQL] Server Version 5.0.51a-24+lenny5.
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] lspd
    [20:59:55] 108|596|1153916928|-992632832|1084227584|0|79|1
    [20:59:55] lspd
    [20:59:55] 108|596|1153884160|-992632832|1084227584|0|79|1
    [20:59:55] lcn
    [20:59:55] 108|560|1153818624|-992632832|1084227584|0|79|1
    [20:59:55] zivi
    [20:59:55] 122|560|1153785856|-992624640|1084227584|0|6|6
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] 0|0|0|0|0|0|0|0
    [20:59:55] Could Not Read Interiors file ( properties/interiors.txt )
    [20:59:55] Reading File: blank
    [20:59:55] Reading File: properties/houses.txt
    [20:59:55] Reading File: properties/businesses.txt
    [20:59:55] Reading File: properties/banks.txt
    [20:59:55] Reading File: properties/police.txt
    [20:59:55]
    ----------------------------------
    [20:59:55] Blank Gamemode by your name here
    [20:59:55] ----------------------------------


    [20:59:55] Number of vehicle models: 2
    [21:00:46] Incoming connection: 91.65.130.112:55871
    [21:00:46] [join] [NCR]Ingo has joined the server (0:91.65.130.112)
    [21:00:50] [MySQL] Error (0): Failed to exeute query. 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 '[NCR]Ingo' at line 1.
    [21:00:50] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. 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 '[NCR]Ingo' at line 1.
    [21:00:50] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. 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 '[NCR]Ingo' at line 1.
    [21:00:50] Player [NCR]Ingo logged in
    [21:01:22] [part] [NCR]Ingo has left the server (0:1)


    Weiß Keiner Eine Antwort ???? :(


    //edit: Log Eingefügt
    //edit: Text Eingefügt
    //edit: Push es ist Sehr Wichtig ;( | Weiß Keiner Eine Antwort ?????????????

    Jetzt hab ich noch ein Problem unzwar Spamt er den chat voll



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(GetPlayerVehicleID(playerid))
    {
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    }
    return 1;
    }


    AutoInfo[i][frakname] = CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);


    Zu


    CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);


    oder was meinst du ????

    Gleich in Grün kommt auch kein Text ;(



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(GetPlayerVehicleID(playerid) == i)
    {
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    }
    return 1;
    }



    Wenn ich üneral ein Rturn machen kommt der text ^^




    //Edit
    //edit2: Text Eingefügt

    Immer noch das gleiche ;(



    enum carInfo
    {
    frakid,
    frakname[64],
    carid,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    Farbe1,
    Farbe2,
    }
    new AutoInfo[MAX_VEHICLES][carInfo];



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(GetPlayerVehicleID(playerid) == i)
    {
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {


    }
    else
    {


    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    }
    return 1;
    }



    stock LoadAutosData()
    {
    for(new i;i<MAX_VEHICLES;i++)
    {
    new query[128],data[128],bedienung[40], carname[64];
    format(bedienung,sizeof(bedienung),"id='%i'",i);
    format(query,sizeof(query),"SELECT * FROM cardata WHERE %s", bedienung);//Die query
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())// Eine Abfrage zur Sicherheit
    {
    format(carname,sizeof(carname),"%s",AutoInfo[i][frakname]);
    mysql_fetch_field("FrakName",carname);
    format(AutoInfo[i][frakname],64,carname);
    printf(AutoInfo[i][frakname]);

    mysql_fetch_field("fn",data);
    AutoInfo[i][frakid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("CarID",data);
    AutoInfo[i][carid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("X",data);
    AutoInfo[i][PosX]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Y",data);
    AutoInfo[i][PosY]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Z",data);
    AutoInfo[i][PosZ]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("A",data);
    AutoInfo[i][PosA]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe1",data);
    AutoInfo[i][Farbe1]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe2",data);
    AutoInfo[i][Farbe2]=strval(data);
    strdel(data,0,100);
    }
    AutoInfo[i][frakname] = CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);
    mysql_free_result();
    }
    return printf("Autos wurden Geladen");
    }


    Das ist der Ganze cod für die fraktions Autos .


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    for(new i=0;i <MAX_VEHICLES; i++)
    {
    if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
    {
    if(GetPlayerVehicleID(playerid))
    {
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {


    }
    else
    {


    }
    }
    else if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    else if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
    }
    else
    {
    SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    }
    return 1;
    }


    Da bitte

    Server-Log:



    ----------
    Loaded log file: "server_log.txt".
    ----------


    SA-MP Dedicated Server
    ----------------------
    v0.3c R2, (C)2005-2011 SA-MP Team


    [16:42:13]
    [16:42:13] Server Plugins
    [16:42:13] --------------
    [16:42:13] Loading plugin: mysql.so
    [16:42:13] SA:MP MySQL Plugin v2.1.1 Loaded.
    [16:42:13] [MySQL] Thread running. Threadsafe: Yes.
    [16:42:13] Loaded.
    [16:42:13] Loading plugin: sscanf.so
    [16:42:13]


    [16:42:13] ===============================


    [16:42:13] sscanf plugin loaded.


    [16:42:13] (c) 2009 Alex "Y_Less" Cole


    [16:42:13] ===============================


    [16:42:13] Loaded.
    [16:42:13] Loading plugin: streamer.so
    [16:42:13]


    *** Streamer Plugin v2.5.2 by Incognito loaded ***


    [16:42:13] Loaded.
    [16:42:13] Loaded 3 plugins.


    [16:42:13]
    [16:42:13] Filter Scripts
    [16:42:13] ---------------
    [16:42:13] Loading filter script 'base.amx'...
    [16:42:13]
    --Base FS loaded.


    [16:42:13] Loading filter script 'gl_actions.amx'...
    [16:42:13] Loading filter script 'gl_property.amx'...
    [16:42:13]
    -----------------------------------
    [16:42:13] Grand Larceny Property Filterscript
    [16:42:13] -----------------------------------


    [16:42:13] Loading filter script 'gl_realtime.amx'...
    [16:42:13] Loaded 4 filter scripts.


    [16:42:13] [MySQL] Connected (0) to 'root'@'127.0.0.1 via TCP/IP'.
    [16:42:13] [MySQL] Server Version 5.0.51a-24+lenny5.
    [16:42:13] lspd
    [16:42:13] lspd
    [16:42:13] lcn
    [16:42:13] zivi
    [16:42:13] Autos wurden Geladen
    [16:42:13] Could Not Read Interiors file ( properties/interiors.txt )
    [16:42:13] Reading File: blank
    [16:42:13] Reading File: properties/houses.txt
    [16:42:13] Reading File: properties/businesses.txt
    [16:42:13] Reading File: properties/banks.txt
    [16:42:13] Reading File: properties/police.txt
    [16:42:13]
    ----------------------------------
    [16:42:13] Blank Gamemode by your name here
    [16:42:13] ----------------------------------


    [16:42:13] Number of vehicle models: 2




    [16:42:13] lspd
    [16:42:13] lspd
    [16:42:13] lcn
    [16:42:13] zivi


    Die Namen Werden Geladen .


    MYSQL-Datenbanken Bilder:

    Habs Jetzt geändert aber es ist immer noch das gleiche wie davor ;(



    enum carInfo
    {
    frakid,
    frakname[64],
    carid,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    Farbe1,
    Farbe2,
    }
    new AutoInfo[MAX_VEHICLES][carInfo];


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    for (new i=0; i< MAX_VEHICLES; i++)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    if(!strcmp(AutoInfo[i][frakname],"lspd",true))
    {
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du bist in der Fraktion");
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,0xFF0000FF,"Du bist nicht in der Fraktion");
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"lcn",true))
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du bist in der Fraktion");
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,0xFF0000FF,"Du bist nicht in der Fraktion");
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"oamt",true))
    {
    if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 4)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du bist in der Fraktion");
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,0xFF0000FF,"Du bist nicht in der Fraktion");
    }
    }
    if(!strcmp(AutoInfo[i][frakname],"zivi",true))
    {
    if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
    {

    }
    else
    {


    }
    }
    }
    }
    return 1;
    }



    stock LoadAutosData()
    {
    for(new i;i<MAX_VEHICLES;i++)
    {
    new query[128],data[128],bedienung[40], carname[64];
    format(bedienung,sizeof(bedienung),"id='%i'",i);
    format(query,sizeof(query),"SELECT * FROM cardata WHERE %s", bedienung);//Die query
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())// Eine Abfrage zur Sicherheit
    {
    format(carname,sizeof(carname),"%s",AutoInfo[i][frakname]);
    mysql_fetch_field("FrakName",carname);
    format(AutoInfo[i][frakname],64,carname);

    mysql_fetch_field("fn",data);
    AutoInfo[i][frakid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("CarID",data);
    AutoInfo[i][carid]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("X",data);
    AutoInfo[i][PosX]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Y",data);
    AutoInfo[i][PosY]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Z",data);
    AutoInfo[i][PosZ]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("A",data);
    AutoInfo[i][PosA]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe1",data);
    AutoInfo[i][Farbe1]=strval(data);
    strdel(data,0,100);

    mysql_fetch_field("Farbe2",data);
    AutoInfo[i][Farbe2]=strval(data);
    strdel(data,0,100);
    }
    AutoInfo[i][frakname] = CreateVehicle(AutoInfo[i][carid],AutoInfo[i][PosX],AutoInfo[i][PosY],AutoInfo[i][PosZ],AutoInfo[i][PosA],AutoInfo[i][Farbe1],AutoInfo[i][Farbe2],-1);
    mysql_free_result();
    }
    }



    Weiß Keiner eine Antwort ????


    MFG


    Ingo


    //Edit:1 Stock bearbeitet