This can be done via LUA as well and it is far easier to work with and you don't have to mess around with messy hex editing which can break other scripts in the game.
The following script source is a basic single bodyguard test script which can be used as a means to test this out without fear of breaking anything in the game.
My Release version of the Multi-Bodyguard Mod uses this code but I have created this script to simplify things for you so you can focus on just this rather then hundreds of lines of other code that can be confusing.
-- Bully: Scholarship Edition CLONES Mod v0.23 Beta
-- File name: CLONES.lua (make sure to compile this as ArcRace1.lur
-- To compile this test script just simply open command, go to where your luac.exe is located and type: luac -o ArcRace1.lur CLONES.lua
-- and the compiled script will be saved as ArcRace1.lur which you can then use to replace the original script of the same name
-- and this will allow you to start the mod by running the arcade machine located in the boys dorm.
-- To change the number of times that a ped can spawn in the same location at once, just simply edit
-- the second number on the PedSetUniqueModelStatus for which ped you want to edit and change that number to whatever you want.
-- A word of caution though: Setting this number too high can have very unpredictable results and most likely end up either locking up
-- or crashing your game. I personally would set this number no higher then 10 for each ped just to be on the safe side. This can also
-- give your system a bit of a performance hit too.
-- for example: if I wanted to have 10 Zoe models in the same area at the same time...I would simply edit
-- PedSetUniqueModelStatus(2, 1) and change it to: PedSetUniqueModelStatus(2, 10)
ImportScript("Library/LibTable.lua")
ImportScript("Library/LibTrigger.lua")
ImportScript("Library/LibSchool.lua")
ImportScript("SGlFunc.lua")
ImportScript("SZone.lua")
local l_0_0 = false
MissionSetup = function()
TextPrintString("Bully: Scholarship Edition CLONES Mod v0.23 BETA.", 4, 1)
Wait(5000)
TextPrintString("This is just for testing purposes and not an actual mod release.", 4, 1)
Wait(5000)
TextPrintString("By: |XF|-MadmaN [AR] ", 4, 1)
Wait(5000)
-- Freeroam Peds Code Start
PedSetUniqueModelStatus(2, 1) -- Zoe
PedSetUniqueModelStatus(3, 1) -- Beatrice
PedSetUniqueModelStatus(4, 1) -- Algernon
PedSetUniqueModelStatus(5, 1) -- Fatty
PedSetUniqueModelStatus(6, 1) -- Melvin
PedSetUniqueModelStatus(7, 1) -- Thad
PedSetUniqueModelStatus(8, 1) -- Bucky
PedSetUniqueModelStatus(9, 1) -- Cornelius
PedSetUniqueModelStatus(10, 1) -- Earnest
PedSetUniqueModelStatus(11, 1) -- Donald
PedSetUniqueModelStatus(12, 1) -- Damon
PedSetUniqueModelStatus(13, 1) -- Kirby
PedSetUniqueModelStatus(14, 1) -- Mandy
PedSetUniqueModelStatus(15, 1) -- Dan
PedSetUniqueModelStatus(16, 1) -- Luis
PedSetUniqueModelStatus(17, 1) -- Casey
PedSetUniqueModelStatus(18, 1) -- Bo
PedSetUniqueModelStatus(19, 1) -- Ted
PedSetUniqueModelStatus(20, 1) -- Juri
PedSetUniqueModelStatus(21, 1) -- Peanut (greasers)
PedSetUniqueModelStatus(22, 1) -- Hal (greasers)
PedSetUniqueModelStatus(23, 1) -- Johnny (greasers)
PedSetUniqueModelStatus(24, 1) -- Lefty (greasers)
PedSetUniqueModelStatus(25, 1) -- Lola (greasers)
PedSetUniqueModelStatus(26, 1) -- Lucky (greasers)
PedSetUniqueModelStatus(27, 1) -- Vance (greasers)
PedSetUniqueModelStatus(28, 1) -- Ricky (greasers)
PedSetUniqueModelStatus(29, 1) -- Norton (greasers)
PedSetUniqueModelStatus(30, 1) -- Gord
PedSetUniqueModelStatus(31, 1) -- Tad
PedSetUniqueModelStatus(32, 1) -- Chad
PedSetUniqueModelStatus(33, 1) -- Bif
PedSetUniqueModelStatus(34, 1) -- Justin
PedSetUniqueModelStatus(35, 1) -- Bryce
PedSetUniqueModelStatus(36, 1) -- Bryce (boxing)
PedSetUniqueModelStatus(37, 1) -- Darby
PedSetUniqueModelStatus(38, 1) -- Pinky
PedSetUniqueModelStatus(39, 1) -- Angie
PedSetUniqueModelStatus(40, 1) -- Parker
PedSetUniqueModelStatus(41, 1) -- Jerry
PedSetUniqueModelStatus(42, 1) -- Otto
PedSetUniqueModelStatus(43, 1) -- Leon
PedSetUniqueModelStatus(44, 1) -- Duncan
PedSetUniqueModelStatus(45, 1) -- Henry
PedSetUniqueModelStatus(46, 1) -- Gurney
PedSetUniqueModelStatus(47, 1) -- Omar
PedSetUniqueModelStatus(48, 1) -- Zoe (alternate outfit?)
PedSetUniqueModelStatus(49, 1) -- Max (prefect)
PedSetUniqueModelStatus(50, 1) -- Seth (prefect)
PedSetUniqueModelStatus(51, 1) -- Edward (prefect)
PedSetUniqueModelStatus(52, 1) -- Karl (prefect leader)
PedSetUniqueModelStatus(53, 1) -- Theo (Orderly)
PedSetUniqueModelStatus(54, 1) -- Miss Peabody (HallMonitor)
PedSetUniqueModelStatus(55, 1) -- Mr Burton (Gym Teacher)
PedSetUniqueModelStatus(56, 1) -- Mr Luntz (Janitor)
PedSetUniqueModelStatus(57, 1) -- Mr Galloway (English Teacher)
PedSetUniqueModelStatus(58, 1) -- Edna (Cafeteria Cook)
PedSetUniqueModelStatus(59, 1) -- Miss Winston (Secretary)
PedSetUniqueModelStatus(60, 1) -- Mrs McRae (Nurse)
PedSetUniqueModelStatus(61, 1) -- Mr Hattrick (Math Teacher)
PedSetUniqueModelStatus(62, 1) -- Mrs Carvin (Librarian)
PedSetUniqueModelStatus(63, 1) -- Ms Phillips (Art Teacher)
PedSetUniqueModelStatus(64, 1) -- Mr Slawter (Biology Teacher)
PedSetUniqueModelStatus(65, 1) -- Dr Crabblesnitch (Principal)
PedSetUniqueModelStatus(66, 1) -- Sheldon (student) (Little kid)
PedSetUniqueModelStatus(67, 1) -- Christy (student)
PedSetUniqueModelStatus(68, 1) -- Gloria (student) (Little kid)
PedSetUniqueModelStatus(69, 1) -- Pedro (student) (Little kid)
PedSetUniqueModelStatus(70, 1) -- Constantinos (student)
PedSetUniqueModelStatus(71, 1) -- Ray (Student) (fat kid)
PedSetUniqueModelStatus(72, 1) -- Ivan (student)
PedSetUniqueModelStatus(73, 1) -- Trevor (student)
PedSetUniqueModelStatus(74, 1) -- Eunice (student) (fat girl)
PedSetUniqueModelStatus(75, 1) -- Russell (Bully) (freeroam model)
PedSetUniqueModelStatus(76, 1) -- Dr Bambillo (shop owner) (TownsPerson)
PedSetUniqueModelStatus(77, 1) -- Mr Sullivan (shop owner) (TownsPerson)
PedSetUniqueModelStatus(78, 1) -- Ms Kopke (shop owner) (TownsPerson)
PedSetUniqueModelStatus(79, 1) -- Ms Rushinski (shop owner) (TownsPerson)
PedSetUniqueModelStatus(80, 1) -- Ms Isaacs (TownsPerson)
PedSetUniqueModelStatus(81, 1) -- Bethany Jones (TownsPerson)
PedSetUniqueModelStatus(82, 1) -- ORourke (fireman) (TownsPerson)
PedSetUniqueModelStatus(83, 1) -- Officer Monson (Cop) (TownsPerson)
PedSetUniqueModelStatus(84, 1) -- Zack Owens (Comic Store Owner) (TownsPerson)
PedSetUniqueModelStatus(85, 1) -- Trent (Bully)
PedSetUniqueModelStatus(86, 1) -- Tobias Mason (Bike Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(87, 1) -- Mr Grant (Hobo)
PedSetUniqueModelStatus(88, 1) -- Mascot (Jocks)
PedSetUniqueModelStatus(89, 1) -- Mr Oh (Grocery Store Owner) (TownsPerson)
PedSetUniqueModelStatus(90, 1) -- Christy (winter) (student)
PedSetUniqueModelStatus(91, 1) -- Edgar (Dropouts Leader)
PedSetUniqueModelStatus(92, 1) -- Luis (Wrestling) (Jocks)
PedSetUniqueModelStatus(93, 1) -- Mandy (winter) (Jocks)
PedSetUniqueModelStatus(94, 1) -- Pinky (winter) (Preppy)
PedSetUniqueModelStatus(95, 1) -- Beatrice (winter) (Nerds)
PedSetUniqueModelStatus(96, 1) -- Lola (winter) (Greasers)
PedSetUniqueModelStatus(97, 1) -- Officer Williams (Cop) (TownsPerson)
PedSetUniqueModelStatus(98, 1) -- Jimmy (Wrestling) (Player)
PedSetUniqueModelStatus(99, 1) -- Davis (Bully)
PedSetUniqueModelStatus(100, 1) -- Mr Breckindale (TownsPerson)
PedSetUniqueModelStatus(101, 1) -- Mr Doolin (TownsPerson)
PedSetUniqueModelStatus(102, 1) -- Troy (Bully)
PedSetUniqueModelStatus(103, 1) -- Nate (Fire Owner) (TownsPerson)
PedSetUniqueModelStatus(104, 1) -- Mr Carmichael (Shop Owner)
PedSetUniqueModelStatus(105, 1) -- Nicky Charles (Shop Owner)
PedSetUniqueModelStatus(106, 1) -- Mr Watts (Chemistry Teacher)
PedSetUniqueModelStatus(107, 1) -- Miss Abby (Shop Owner)
PedSetUniqueModelStatus(108, 1) -- Mihailovich (Shop Owner)
PedSetUniqueModelStatus(109, 1) -- Kirby (Football Uniform)
PedSetUniqueModelStatus(110, 1) -- Ted (Football Uniform)
PedSetUniqueModelStatus(111, 1) -- Dan (Football Uniform)
PedSetUniqueModelStatus(112, 1) -- Damon (Football Uniform)
PedSetUniqueModelStatus(113, 1) -- Freeley (Carnival)
PedSetUniqueModelStatus(114, 1) -- Dorsey (Carnival)
PedSetUniqueModelStatus(115, 1) -- Hector (Carnival Midget) (DunkTank?)
PedSetUniqueModelStatus(116, 1) -- Osbourne (Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(117, 1) -- Chad (Boxing) (Preppy)
PedSetUniqueModelStatus(118, 1) -- Justin (Boxing) (Preppy)
PedSetUniqueModelStatus(119, 1) -- Parker (Boxing) (Preppy)
PedSetUniqueModelStatus(120, 1) -- Maria Theresa (Barber) (Rich Area)
PedSetUniqueModelStatus(121, 1) -- Bob (Generic Wrestler) (Bully)
PedSetUniqueModelStatus(122, 1) -- Fatty (Wrestling) (Nerds)
PedSetUniqueModelStatus(123, 1) -- Chuck (Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(124, 1) -- Ian (Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(125, 1) -- Fenwick (Asylum Patient) (TownsPerson)
PedSetUniqueModelStatus(126, 1) -- Neil (Autoshop Teacher)
PedSetUniqueModelStatus(127, 1) -- Mr Svenson (Mailman)
PedSetUniqueModelStatus(128, 1) -- Denny (Tattooist)
PedSetUniqueModelStatus(129, 1) -- Mr Galloway (Asylum Model) (English Teacher)
PedSetUniqueModelStatus(130, 1) -- Gary (Final BOSS) (Student)
PedSetUniqueModelStatus(131, 1) -- Krakauer (Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(132, 1) -- Mr Moratti (Barber) (Poor Area)
PedSetUniqueModelStatus(133, 1) -- Bif (Boxing) (Preppy)
PedSetUniqueModelStatus(134, 1) -- Petey (student)
PedSetUniqueModelStatus(135, 1) -- Mr Smith (TownsPerson)
PedSetUniqueModelStatus(136, 1) -- Rat
PedSetUniqueModelStatus(137, 1) -- Melody (Little Kid)
PedSetUniqueModelStatus(138, 1) -- Karen (Little Kid)
PedSetUniqueModelStatus(139, 1) -- Gordon (Student)
PedSetUniqueModelStatus(140, 1) -- Brandy (Midget)
PedSetUniqueModelStatus(141, 1) -- Pitbull 1
PedSetUniqueModelStatus(142, 1) -- Lance (Student)
PedSetUniqueModelStatus(143, 1) -- Crystal (Carnival Worker)
PedSetUniqueModelStatus(144, 1) -- Mr Martin (TownsPerson)
PedSetUniqueModelStatus(145, 1) -- Ethan (Bully)
PedSetUniqueModelStatus(146, 1) -- Wade (Bully)
PedSetUniqueModelStatus(147, 1) -- Tom (Bully)
PedSetUniqueModelStatus(148, 1) -- Mr Ramirez (TownsPerson)
PedSetUniqueModelStatus(149, 1) -- Mr Huntingdon (TownsPerson)
PedSetUniqueModelStatus(150, 1) -- Otto (Asylum) (Dropouts)
PedSetUniqueModelStatus(151, 1) -- Mr Wiggins (History Teacher)
PedSetUniqueModelStatus(152, 1) -- Floyd (TownsPerson)
PedSetUniqueModelStatus(153, 1) -- Leon (Asylum) (Dropouts)
PedSetUniqueModelStatus(154, 1) -- Henry (Asylum) (Dropouts)
PedSetUniqueModelStatus(155, 1) -- Fatty (Chocolate) (Nerds)
PedSetUniqueModelStatus(156, 1) -- Stan (Grocery Store Clerk) (TownsPerson)
PedSetUniqueModelStatus(157, 1) -- Handy (Shop Owner) (TownsPerson)
PedSetUniqueModelStatus(158, 1) -- Gregory (Orderly)
PedSetUniqueModelStatus(159, 1) -- Pedro (Halloween) (Little Kid)
PedSetUniqueModelStatus(160, 1) -- Gary (Halloween)
PedSetUniqueModelStatus(161, 1) -- Lucky (Halloween) (Greasers)
PedSetUniqueModelStatus(162, 1) -- Donald (Halloween) (Nerds)
PedSetUniqueModelStatus(163, 1) -- Parker (Halloween) (Preppy)
PedSetUniqueModelStatus(164, 1) -- Casey (Halloween) (Jocks)
PedSetUniqueModelStatus(165, 1) -- Petey (Halloween) (Student)
PedSetUniqueModelStatus(166, 1) -- Angie (Halloween) (Student)
PedSetUniqueModelStatus(167, 1) -- Pinky (Halloween) (Preppy)
PedSetUniqueModelStatus(168, 1) -- Damon (Halloween) (Jocks)
PedSetUniqueModelStatus(169, 1) -- Gordon (Halloween) (Student)
PedSetUniqueModelStatus(170, 1) -- Ivan (Halloween) (Bully)
PedSetUniqueModelStatus(171, 1) -- Trevor (Halloween) (Student)
PedSetUniqueModelStatus(172, 1) -- Bif (Boxing) (Beat up?) (Preppy)
PedSetUniqueModelStatus(173, 1) -- Vance (Halloween) (Greasers)
PedSetUniqueModelStatus(174, 1) -- Thad (Halloween) (Nerds)
PedSetUniqueModelStatus(175, 1) -- Pinky (Winter) (Preppy)
PedSetUniqueModelStatus(176, 1) -- Russell (Beat up) (Bully)
PedSetUniqueModelStatus(177, 1) -- Tad (Winter) (Preppy)
PedSetUniqueModelStatus(178, 1) -- Bryce (Winter) (Preppy)
PedSetUniqueModelStatus(179, 1) -- Justin (Winter) (Preppy)
PedSetUniqueModelStatus(480, 1) -- Angie (Cheerleader) (Student)
PedSetUniqueModelStatus(181, 1) -- Christy (Cheerleader) (Student)
PedSetUniqueModelStatus(182, 1) -- Pinky (Cheerleader) (Preppy)
PedSetUniqueModelStatus(183, 1) -- Mr Buba (TownsPerson)
PedSetUniqueModelStatus(184, 1) -- Mr Gordon (TownsPerson)
PedSetUniqueModelStatus(185, 1) -- Mrs Lisburn (TownsPerson)
PedSetUniqueModelStatus(186, 1) -- Fatty (Dungeon Master?) (Nerds)
PedSetUniqueModelStatus(187, 1) -- Betty (Punk Barber) (TownsPerson)
PedSetUniqueModelStatus(188, 1) -- Lightning (Fighting Midget) (Freakshow)
PedSetUniqueModelStatus(189, 1) -- Zeke (Fighting Midget) (Freakshow)
PedSetUniqueModelStatus(190, 1) -- Alfred (Skeleton Man) (Freakshow)
PedSetUniqueModelStatus(191, 1) -- Paris (Bearded Fat Lady) (Freakshow)
PedSetUniqueModelStatus(192, 1) -- Courtney (Mermaid) (Freakshow)
PedSetUniqueModelStatus(193, 1) -- Delilah (Siamese Twin #2) (Freakshow)
PedSetUniqueModelStatus(194, 1) -- Drew (Painted Man) (Freakshow)
PedSetUniqueModelStatus(195, 1) -- Castillo (Worker) (TownsPerson)
PedSetUniqueModelStatus(196, 1) -- Edgar (Gym) (Dropouts)
PedSetUniqueModelStatus(197, 1) -- Gurney (Gym) (Dropouts)
PedSetUniqueModelStatus(198, 1) -- Jerry (Gym) (Dropouts)
PedSetUniqueModelStatus(199, 1) -- Leon (Gym) (Dropouts)
PedSetUniqueModelStatus(200, 1) -- Hal (Gym) (Greasers)
PedSetUniqueModelStatus(201, 1) -- Norton (Gym) (Greasers)
PedSetUniqueModelStatus(202, 1) -- Peanut (Gym) (Greasers)
PedSetUniqueModelStatus(203, 1) -- Vance (Gym) (Greasers)
PedSetUniqueModelStatus(204, 1) -- Bo (Gym) (Jocks)
PedSetUniqueModelStatus(205, 1) -- Damon (Gym) (Jocks)
PedSetUniqueModelStatus(206, 1) -- Juri (Gym) (Jocks)
PedSetUniqueModelStatus(207, 1) -- Kirby (Gym) (Jocks)
PedSetUniqueModelStatus(208, 1) -- Algernon (Gym) (Nerds)
PedSetUniqueModelStatus(209, 1) -- Bucky (Gym) (Nerds)
PedSetUniqueModelStatus(210, 1) -- Thad (Gym) (Nerds)
PedSetUniqueModelStatus(211, 1) -- Parker (Gym) (Preppy)
PedSetUniqueModelStatus(212, 1) -- Justin (Gym) (Preppy)
PedSetUniqueModelStatus(213, 1) -- Tad (Gym) (Preppy)
PedSetUniqueModelStatus(214, 1) -- Gord (Gym) (Preppy)
PedSetUniqueModelStatus(215, 1) -- Earnest (Not sure) (Nerds)
PedSetUniqueModelStatus(216, 1) -- Ted (Not sure) (Jocks)
PedSetUniqueModelStatus(217, 1) -- Johnny (Not sure) (Greasers)
PedSetUniqueModelStatus(218, 1) -- Darby (Not sure) (Preppy)
PedSetUniqueModelStatus(219, 1) -- Pitbull 2
PedSetUniqueModelStatus(220, 1) -- Pitbull 3
PedSetUniqueModelStatus(221, 1) -- Edna (Makeup) (Cafeteria Cook)
PedSetUniqueModelStatus(222, 1) -- McInnis (Mill Worker)
PedSetUniqueModelStatus(223, 1) -- Johnson (Dock Worker)
PedSetUniqueModelStatus(224, 1) -- Thad (Pajamas) (Nerds)
PedSetUniqueModelStatus(225, 1) -- Sheldon (Pajamas) (Student)
PedSetUniqueModelStatus(226, 1) -- Pedro (Pajamas) (Student)
PedSetUniqueModelStatus(227, 1) -- Ivan (Pajamas) (Student)
PedSetUniqueModelStatus(228, 1) -- Trevor (Pajamas) (Student)
PedSetUniqueModelStatus(229, 1) -- Mr Burton (Disguised) (Gym Teacher)
PedSetUniqueModelStatus(230, 1) -- Mandy (Towel) (Jocks)
PedSetUniqueModelStatus(231, 1) -- Bo (Football) (Jocks)
PedSetUniqueModelStatus(232, 1) -- Casey (Football) (Jocks)
PedSetUniqueModelStatus(233, -1) -- Punching bag
PedSetUniqueModelStatus(234, 1) -- Officer Monson (Cop)
PedSetUniqueModelStatus(235, 1) -- Constantinos (Winter) (Student)
PedSetUniqueModelStatus(236, 1) -- McInnis (Construction Worker)
PedSetUniqueModelStatus(237, 1) -- McInnis (Construction Worker) (Alternate?)
PedSetUniqueModelStatus(238, 1) -- Officer Williams (Cop)
PedSetUniqueModelStatus(239, 1) -- Bryce (Boxing) (Beat up 1) (Preppy)
PedSetUniqueModelStatus(240, 1) -- Bryce (Boxing) (Beat up 2) (Preppy)
PedSetUniqueModelStatus(241, 1) -- Chad (Boxing) (Beat up 1) (Preppy)
PedSetUniqueModelStatus(242, 1) -- Chad (Boxing) (Beat up 2) (Preppy)
PedSetUniqueModelStatus(243, 1) -- Bif (Boxing) (Beat up 2) (Preppy)
PedSetUniqueModelStatus(244, 1) -- Justin (Boxing) (Beat up 1) (Preppy)
PedSetUniqueModelStatus(245, 1) -- Justin (Boxing) (Beat up 2) (Preppy)
PedSetUniqueModelStatus(246, 1) -- Parker (Boxing) (Beat up 1) (Preppy)
PedSetUniqueModelStatus(247, 1) -- Parker (Boxing) (Beat up 2) (Preppy)
PedSetUniqueModelStatus(248, 1) -- UNKNOWN NAME (Geography Teacher)
PedSetUniqueModelStatus(249, 1) -- UNKNOWN NAME (Music Teacher)
PedSetUniqueModelStatus(250, 1) -- UNKNOWN NAME (X-mas Elf 1) (Fake Santa Mission)
PedSetUniqueModelStatus(251, 1) -- UNKNOWN NAME (X-mas Elf 2) (Fake Santa Mission)
PedSetUniqueModelStatus(252, 1) -- Hobo Santa (X-mas) (Rudy)
PedSetUniqueModelStatus(253, 1) -- UNKNOWN NAME (Fake Santa)
PedSetUniqueModelStatus(254, 1) -- UNKNOWN NAME (Fake Santa) (Alternate Model?)
PedSetUniqueModelStatus(255, 1) -- Petey (NutCracker Costume) (Student)
PedSetUniqueModelStatus(256, 1) -- Eunice (Halloween) (Student)
PedSetUniqueModelStatus(257, 1) -- Melody (Flower Costume) (Little Kid)
PedSetUniqueModelStatus(258, 1) -- Pedro (Flower Costume) (Little Kid)
-- Freeroam Peds code end
local l_1_0 = 270
local l_1_1 = -110
local l_1_2 = 6.4000000953674
PlayerSetHealth(200)
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
local l_1_3 = 218
local l_1_4, l_1_5, l_1_6 = PedGetPosXYZ(gPlayer)
-- local l_1_7 = PedCreateXYZ(l_1_3, l_1_4 + 5, l_1_5 + 5, l_1_6)
PedRecruitAlly(gPlayer, l_1_3)
PedMakeAmbient(l_1_7)
end
MissionCleanup = function()
end
main = function()
repeat
Wait(0)
until l_0_0 ~= false
Wait(3000)
MissionSucceed()
end