Beiträge von Deadmau5


    ocmd:gethere(playerid,params[])
    {
    new pID;
    new k = GetPlayerInterior(playerid);
    if(sscanf(params,"u",pID)){return SendClientMessage (playerid,ROT,"NUTZE: /gethere [ID/Name]");}
    if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin.");
    if(!IsPlayerConnected(pID))return SendClientMessage (playerid,ROT,"Niemand ist online mit dieser ID!");
    new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
    GetPlayerName(pID,name,sizeof(name));
    GetPlayerName(playerid,aname,sizeof(aname));
    format(string,sizeof(string),"Du wurdest zu %s teleportiert!",SpielerName(playerid));
    format(string2,sizeof(string2),"Du hast %s zu dir geportet!",SpielerName(pID));
    if(IsPlayerInAnyVehicle(pID))
    {
    new vehicleid = GetPlayerVehicleID(pID);
    new state=GetPlayerState(pID);
    if(state==PLAYER_STATE_DRIVER)
    {
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    SetPlayerPos(pID,x,y,z);
    SetPlayerInterior(pID,k);
    SetVehiclePos(vehicleid,x,y,z);
    PutPlayerInVehicle(pID,vehicleid,0);
    }
    }
    else
    {
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    SetPlayerPos(pID,x,y,z);
    SetPlayerInterior(pID,k);
    SendClientMessage(pID,GELB,string);
    SendClientMessage(playerid,GRÜN,string2);
    }
    return 1;
    }

    Ooooh.... Danke :D
    Ne kannte ich bisher nich xD


    //ERLEDIGT
    //EDIT:
    Komischerweise bekomm ich immer so shit Sachen hier -.-



    [15:47:29] 1
    [15:47:29] 2_0
    [15:47:29] 3_0
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] 3_1_0
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] 3_2_0
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] 3_3_0
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] [MySQL] Error (0): Function: mysql_fetch_field failed, no field data.
    [15:47:29] 3_4_0

    Weg damit



    stock fLockCar(vehicleid){//zeile 45701
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,true);
    return true;
    }
    stock fUnlockCar(vehicleid){//zeile 45706
    ForAllPlayers(i)
    SetVehicleParamsForPlayer(vehicleid,i,false,false);
    return true;
    }

    Musst auch ne Variable erstellen, die die Carid ist :D



    if(newstate==PLAYER_STATE_DRIVER)
    {
    if(!IsPlayerNPC(playerid))
    {
    new carid = GetPlayerVehicleID(playerid);
    if(IsAnLKW(carid))
    {
    if(GetPVarInt(playerid,"LKW-Schein")!=1)
    {
    RemovePlayerFromVehicle(playerid);
    GameTextForPlayer(playerid,"Du hast keinen LKW-Schein !",2000,3);
    }
    }
    }
    }


    Grüße, die Mau5 ;)

    Wie gesagt, ich komm jetzt bis zum print 4, ab dann gehts nimma weiter -.-


    Also er speichert das Car ab, aber erstellt es nicht ;(


    //EDIT: So neuer Code...
    Er erstellt das Fahrzeug, er kann es nachm Restart nich laden -.-



    forward LoadFraktionsCarsSQL();
    public LoadFraktionsCarsSQL()
    {
    new fc,fc2,Query[1024],Fuel;
    while(fc<sizeof(fCars))
    {
    format(Query,1024,"SELECT * FROM `fcars` WHERE `id`='%d'",fc);
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() > 0)
    {

    mysql_fetch_field("Model",Query); fCars[fc][fModel] = strval(Query);

    mysql_fetch_field("PosX",Query); fCars[fc][fPosX] = strval(Query);
    mysql_fetch_field("PosY",Query); fCars[fc][fPosY] = strval(Query);
    mysql_fetch_field("PosZ",Query); fCars[fc][fPosZ] = strval(Query);
    mysql_fetch_field("PosA",Query); fCars[fc][fPosA] = strval(Query);

    mysql_fetch_field("Farbe_1",Query); fCars[fc][fCol1] = strval(Query);
    mysql_fetch_field("Farbe_2",Query); fCars[fc][fCol2] = strval(Query);

    mysql_fetch_field("Fraktion",Query); fCars[fc][fFraktion] = strval(Query);
    mysql_fetch_field("Benzin",Query); Fuel = strval(Query);

    fCarId[fc] = CreateVehicle(fCars[fc][fModel],fCars[fc][fPosX],fCars[fc][fPosY],fCars[fc][fPosZ],fCars[fc][fPosA],fCars[fc][fCol1],fCars[fc][fCol2],-1);
    Tank[fCarId[fc]] = Fuel;


    if(fCars[fc][fModel] >= 400 && fCars[fc][fModel] <= 611)
    {
    fc2++;
    }
    }
    fc++;
    }
    printf("%d Fraktionscars geladen!",fc2);
    mysql_free_result();
    return 1;
    }

    Beim laden:



    //EDIT2: Wie lad ich eigentlich beim Strickenkid Float Sachen xD?