示例#1
0
        public ActionResult DeleteConfirmed(string id)
        {
            OutfitID outfitID = db.OutfitIDs.Find(id);

            db.OutfitIDs.Remove(outfitID);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        public static void LoadOutfit(Ped ped, OutfitID Outfit)
        {
            CurrentOutfit = Outfit;
            Outfit outfit = AllOutfits[(int)CurrentOutfit];

            // Beard
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 1, outfit.Beard, outfit.BeardColor, 2);
            // Hair
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 2, outfit.Hair, outfit.HairColor, 2);
            // Upper
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 3, outfit.Upper, outfit.UpperColor, 2);
            // Lower
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 4, outfit.Lower, outfit.LowerColor, 2);
            // Hands
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 5, outfit.Hands, outfit.HandsColor, 2);
            // Shoes
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 6, outfit.Shoes, outfit.ShoesColor, 2);
            // AccOne
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 8, outfit.AccOne, outfit.AccOneColor, 2);
            // AccTwo
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 9, outfit.AccTwo, outfit.AccTwoColor, 2);
            // Shirt
            Function.Call(Hash.SET_PED_COMPONENT_VARIATION,
                          ped, 11, outfit.Shirt, outfit.ShirtColor, 2);
            // Clear props
            Function.Call(Hash.CLEAR_ALL_PED_PROPS,
                          ped);
            Function.Call(Hash.SET_NIGHTVISION, false);
            // Hat
            Function.Call(Hash.SET_PED_PROP_INDEX,
                          ped, 0, outfit.Hat, outfit.HatColor, 2);
            // Glasses
            Function.Call(Hash.SET_PED_PROP_INDEX,
                          ped, 1, outfit.Glasses, outfit.GlassesColor, 2);
            // Ears
            Function.Call(Hash.SET_PED_PROP_INDEX,
                          ped, 2, outfit.Ears, outfit.EarsColor, 2);
            // Watch
            Function.Call(Hash.SET_PED_PROP_INDEX,
                          ped, 3, outfit.Watch, outfit.WatchColor, 2);

            activated = true;
        }
示例#3
0
        // GET: OutfitIDs/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OutfitID outfitID = db.OutfitIDs.Find(id);

            if (outfitID == null)
            {
                return(HttpNotFound());
            }
            return(View(outfitID));
        }
示例#4
0
 public ActionResult Edit([Bind(Include = "OutfitID1,OutfitName,TopID,SecondLayerTopID,OuterwearID,BottomID,ShoesID,AccessoryID,Accessory2ID,Accessory3ID,Accessory4ID,Accessory5ID")] OutfitID outfitID)
 {
     if (ModelState.IsValid)
     {
         db.Entry(outfitID).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AccessoryID      = new SelectList(db.Accessories, "AccessoryID", "AccessoryName", outfitID.AccessoryID);
     ViewBag.Accessory2ID     = new SelectList(db.Accessories2, "Accessory2ID", "Accessory2Name", outfitID.Accessory2ID);
     ViewBag.Accessory3ID     = new SelectList(db.Accessories3, "Accessory3ID", "Accessory3Name", outfitID.Accessory3ID);
     ViewBag.Accessory4ID     = new SelectList(db.Accessories4, "Accessory4ID", "Accessory4Name", outfitID.Accessory4ID);
     ViewBag.Accessory5ID     = new SelectList(db.Accessories5, "Accessory5ID", "Accessory5Name", outfitID.Accessory5ID);
     ViewBag.BottomID         = new SelectList(db.Bottoms, "BottomID", "BottomName", outfitID.BottomID);
     ViewBag.OuterwearID      = new SelectList(db.Outerwears, "OuterwearID", "OuterwearName", outfitID.OuterwearID);
     ViewBag.SecondLayerTopID = new SelectList(db.SecondLayerTops, "SecondLayerTopID", "SecondLayerTopName", outfitID.SecondLayerTopID);
     ViewBag.ShoesID          = new SelectList(db.Shoes, "ShoesID", "ShoeName", outfitID.ShoesID);
     ViewBag.TopID            = new SelectList(db.Tops, "TopID", "TopName", outfitID.TopID);
     return(View(outfitID));
 }
示例#5
0
        // GET: OutfitIDs/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OutfitID outfitID = db.OutfitIDs.Find(id);

            if (outfitID == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AccessoryID      = new SelectList(db.Accessories, "AccessoryID", "AccessoryName", outfitID.AccessoryID);
            ViewBag.Accessory2ID     = new SelectList(db.Accessories2, "Accessory2ID", "Accessory2Name", outfitID.Accessory2ID);
            ViewBag.Accessory3ID     = new SelectList(db.Accessories3, "Accessory3ID", "Accessory3Name", outfitID.Accessory3ID);
            ViewBag.Accessory4ID     = new SelectList(db.Accessories4, "Accessory4ID", "Accessory4Name", outfitID.Accessory4ID);
            ViewBag.Accessory5ID     = new SelectList(db.Accessories5, "Accessory5ID", "Accessory5Name", outfitID.Accessory5ID);
            ViewBag.BottomID         = new SelectList(db.Bottoms, "BottomID", "BottomName", outfitID.BottomID);
            ViewBag.OuterwearID      = new SelectList(db.Outerwears, "OuterwearID", "OuterwearName", outfitID.OuterwearID);
            ViewBag.SecondLayerTopID = new SelectList(db.SecondLayerTops, "SecondLayerTopID", "SecondLayerTopName", outfitID.SecondLayerTopID);
            ViewBag.ShoesID          = new SelectList(db.Shoes, "ShoesID", "ShoeName", outfitID.ShoesID);
            ViewBag.TopID            = new SelectList(db.Tops, "TopID", "TopName", outfitID.TopID);
            return(View(outfitID));
        }
示例#6
0
        public static void setOutfits()
        {
            currentHat      = -1;
            currentHatColor = 0;
            AllOutfits      = new Outfit[10];

            Outfit casual = blankOutfit();

            casual.Hair       = 19;
            casual.HairColor  = 1;
            casual.Lower      = 10;
            casual.Shoes      = 1;
            casual.AccOne     = 15;
            casual.Shirt      = 16;
            casual.ShirtColor = 1;
            casual.Ears       = 2;
            casual.Watch      = 1;
            AllOutfits[(int)OutfitID.Casual] = casual;

            Outfit formal = blankOutfit();

            formal.Hair        = 19;
            formal.HairColor   = 1;
            formal.Upper       = 1;
            formal.Lower       = 28;
            formal.LowerColor  = 8;
            formal.Shoes       = 20;
            formal.Shoes       = 3;
            formal.AccOne      = 73;
            formal.AccOneColor = 1;
            formal.Shirt       = 11;
            formal.ShirtColor  = 1;
            formal.Ears        = 2;
            AllOutfits[(int)OutfitID.Formal] = formal;

            Outfit combat = blankOutfit();

            combat.Beard       = 35;
            combat.Upper       = 17;
            combat.Lower       = 33;
            combat.Shoes       = 24;
            combat.AccOne      = 15;
            combat.AccTwo      = 11;
            combat.AccTwoColor = 1;
            combat.Shirt       = 49;
            combat.Hat         = 117;
            AllOutfits[(int)OutfitID.Combat] = combat;

            Outfit bike = blankOutfit();

            bike.Hair       = 19;
            bike.HairColor  = 1;
            bike.Beard      = 0;
            bike.Upper      = 31;
            bike.Lower      = 4;
            bike.LowerColor = 4;
            bike.Shoes      = 4;
            bike.ShoesColor = 2;
            bike.AccOne     = 142;
            bike.Shirt      = 64;
            bike.Hat        = 70;
            AllOutfits[(int)OutfitID.Bike] = bike;


            Outfit scuba = blankOutfit();

            scuba.Beard   = 122;
            scuba.Upper   = 96;
            scuba.Lower   = 94;
            scuba.Shoes   = 67;
            scuba.AccOne  = 123;
            scuba.Shirt   = 49;
            scuba.Glasses = 26;
            AllOutfits[(int)OutfitID.Scuba] = scuba;

            Outfit beach = blankOutfit();

            beach.Hair       = 19;
            beach.HairColor  = 1;
            beach.Upper      = 15;
            beach.Lower      = 6;
            beach.LowerColor = 1;
            beach.Shoes      = 34;
            beach.AccOne     = 15;
            beach.Shirt      = 252;
            AllOutfits[(int)OutfitID.Beach] = beach;

            Outfit navyAtEase = blankOutfit();

            navyAtEase.Hair      = 19;
            navyAtEase.HairColor = 1;
            navyAtEase.Upper     = 11;
            navyAtEase.Lower     = 87;
            navyAtEase.Shoes     = 35;
            navyAtEase.AccOne    = 15;
            navyAtEase.Shirt     = 222;
            navyAtEase.Hat       = 107;
            AllOutfits[(int)OutfitID.NavyAtEase] = navyAtEase;

            Outfit navyCombat = new Outfit(navyAtEase);

            navyCombat.Upper       = 152;
            navyCombat.AccTwo      = 26;
            navyCombat.AccTwoColor = 5;
            navyCombat.Shirt       = 221;
            navyCombat.Hat         = 117;
            navyCombat.HatColor    = 18;
            AllOutfits[(int)OutfitID.NavyCombat] = navyCombat;

            Outfit pilotInformal = new Outfit(navyAtEase);

            pilotInformal.Lower      = 10;
            pilotInformal.Shoes      = 10;
            pilotInformal.Teeth      = 38;
            pilotInformal.Shirt      = 318;
            pilotInformal.ShirtColor = 5;
            pilotInformal.Watch      = 10;
            AllOutfits[(int)OutfitID.PilotInformal] = pilotInformal;

            CurrentOutfit = OutfitID.Casual;
            activated     = false;
        }
示例#7
0
        public static void LoadOutfit(OutfitID Outfit)
        {
            Ped player = Game.Player.Character;

            LoadOutfit(player, Outfit);
        }