In my fights, they stand 20 metres away from each other. But yeah you have to add the PedAttack code to make them attack each other.
This my my code:
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
l_0_0 = 60
MissionSetup = function()
local l_1_0 = 515
local l_1_1 = 504
local l_1_2 = 19.60971009
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
TextPrintString("Bully Scholarship Edition Bullies vs Townies ", 4, 1)
Wait(5000)
TextPrintString("Enjoy ", 4, 1)
Wait(5000)
local Ped1 = nil
local Ped2 = nil
local Ped3 = nil
local Ped4 = nil
local Ped5 = nil
local Ped6 = nil
local Ped7 = nil
local Ped8 = nil
local Ped9 = nil
local Ped10 = nil
local Ped11 = nil
local Ped12 = nil
local Ped13 = nil
local Ped14 = nil
local Ped15 = nil
local Ped1 = PedCreateXYZ(91, 510, 500, 19.60971009)
local Ped2 = PedCreateXYZ(47, 510, 501, 19.60971009)
local Ped3 = PedCreateXYZ(46, 510, 502, 19.60971009)
local Ped4 = PedCreateXYZ(45, 510, 503, 19.60971009)
local Ped5 = PedCreateXYZ(43, 510, 504, 19.60971009)
local Ped6 = PedCreateXYZ(41, 510, 505, 19.60971009)
local Ped7 = PedCreateXYZ(44, 510, 506, 19.60971009)
local Ped8 = PedCreateXYZ(42, 510, 507, 19.60971009)
local Ped9 = PedCreateXYZ(75, 530, 500, 19.60971009)
local Ped10 = PedCreateXYZ(99, 530, 501, 19.60971009)
local Ped11 = PedCreateXYZ(85, 530, 502, 19.60971009)
local Ped12 = PedCreateXYZ(145, 530, 503, 19.60971009)
local Ped13 = PedCreateXYZ(146, 530, 504, 19.60971009)
local Ped14 = PedCreateXYZ(147, 530, 505, 19.60971009)
local Ped15 = PedCreateXYZ(102, 530, 506, 19.60971009)
PedAttack(Ped1, Ped9, 1) - Ped1 attacks Ped9
PedAttack(Ped2, Ped10, 1) - Ped2 attacks Ped10 and etc.
PedAttack(Ped3, Ped11, 1)
PedAttack(Ped4, Ped12, 1)
PedAttack(Ped5, Ped13, 1)
PedAttack(Ped6, Ped14, 1)
PedAttack(Ped7, Ped15, 1)
PedAttack(Ped8, Ped9, 1)
PedAttack(Ped9, Ped1, 1)
PedAttack(Ped10, Ped2, 1)
PedAttack(Ped11, Ped3, 1)
PedAttack(Ped12, Ped4, 1)
PedAttack(Ped13, Ped5, 1)
PedAttack(Ped14, Ped6, 1)
PedAttack(Ped15, Ped7, 1)
PedWander(Ped1, true) - Makes them walk around after a fight, but this is not required.
PedWander(Ped2, true)
PedWander(Ped3, true)
PedWander(Ped4, true)
PedWander(Ped5, true)
PedWander(Ped6, true)
PedWander(Ped7, true)
PedWander(Ped8, true)
PedWander(Ped9, true)
PedWander(Ped10, true)
PedWander(Ped11, true)
PedWander(Ped12, true)
PedWander(Ped13, true)
PedWander(Ped14, true)
PedWander(Ped15, true)
end
F_MissionSetup = function()
PlayerSetControl(1)
CameraFollowPed(gPlayer)
ClockSet(9, 30)
ClockSetTickRate(0.0060000000521541)
LaunchScript("SObjTest.lua")
end
MissionCleanup = function()
ClearTextQueue()
EnablePOI()
gMissionRunning = false
shared.gMissionEventFunction = nil
WeatherRelease()
PlayerSetControl(1)
PlayerSetPunishmentPoints(0)
end
main = function()
F_MissionSetup()
gMissionRunning = true
while gMissionRunning do
UpdateTextQueue()
Wait(0)
end
end