Wie geht ein givekey befehl?

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
  • hey,


    Ich hab jetzt versucht einen Befehl zu schreiben mit dem ich anderen einen Schlüssel geben kann.
    leider hat es nicht funktioniert.


    Ich hoffe mir kann jemand helfen
    ich hab mir das so vorgestellt
    das man /schlüsselgeben [ID] [AUTO] machen muss und dann gibt man den user einen schlüssel für das auto dieser kann dann das auto aufsperren und zusperren



    ich hoffe jemand weiß weiter#




    lg
    IPOD

  • HAB DAS HIER GEFUNDEN
    dtc_AutohausCar[playerid] = 0;
    dtc_AutohausCat[playerid] = 2000;
    dtc_AutohausSCar[playerid] = 0;
    Dtc_PlayerKey[playerid] = 0;
    HasBomb[playerid] = 0;
    for(new i = 0; i < MaxVeh; i++)
    {
    Dtc_PlayerHaveCar[playerid][i] = 0;



    }
    OnPlayerCarLogin(playerid);
    for(new i = 0; i < 700; i++)
    {
    if(Dtc_Carlock[i])
    {
    SetVehicleParamsForPlayer(i,playerid,0,1);
    }
    }
    InCargo[playerid] = 0; InLevi[playerid] = 0; InEnfo[playerid] = 0; KennzeichenErlaubnis[playerid] = 0; KennzeichenErlaubnis1[playerid] = 0;
    KofferInfo[playerid][HatKoffer]=0; KofferInfo[playerid][BombeAktiv]=0; KofferInfo[playerid][BombenTimer]=10; KofferInfo[playerid][KofferAbgelegt]=0;
    SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0; TakeOver[playerid] = 255;
    SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0; Maske[playerid] = 0;
    GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0; gPlayerUsingLoopingAnim[playerid] = 0; gPlayerAnimLibsPreloaded[playerid] = 0;
    KickPlayer[playerid] = 0; CurrentMoney[playerid] = 0; UsedFind[playerid] = 0;
    CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1; BlindFold[playerid] = 0; Noobi[playerid] = 0;
    CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
    RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0; AktuellerCP[playerid] = INVALID_FARMER_CP;
    STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
    RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0; NagelBandErstellt[playerid] = 0;
    TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
    RefillOffer[playerid] = 999; RefillPrice[playerid] = 0; MapIconsShown[playerid] = 0;
    DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
    DrugPrice[playerid] = 0; RegistrationStep[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
    DrugGram[playerid] = 0; Mats[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
    JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
    WantedPoints[playerid] = 0; ReportCall[playerid] = 999; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
    OnDuty[playerid] = 0; WantedLevel[playerid] = 0; TestFishes[playerid] = 0; FonDuty[playerid] = 0;
    BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0; PlayerInfo[playerid][pPtankekey] = 255;
    SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
    BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
    FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
    Mobile[playerid] = 255; Music[playerid] = 0; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
    Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
    Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
    WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
    PaperOffer[playerid] = 999; ConsumingMoney[playerid] = 0; JustReported[playerid] = 0; PlayerNeedsHelp[playerid] = 0;
    gLastCar[playerid] = 0; FirstSpawn[playerid] = 1; AtClothes[playerid] = 0; AdminDuty[playerid] = 0;
    gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gFam[playerid] = 0;
    gSpeedo[playerid] = 0; gGas[playerid] = 0; AllowPerso[playerid] = 0;

  • OnPlayerCarLogin(playerid);
    in der Funktion kannst du sehen wie der player den schlüssel bekommt anhand der informationen kannst du eine deklairung machen und einen Speiler den schlüssel geben
    aber achtung! du musst dann jede abfrage von playercars bearbeiten

    All in all it's just another brick in the wall