News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..
0 Members and 1 Guest are viewing this topic.
MissionSetup = function() AreaTransitionXYZ(0, 270, -110, 7) -- Put it right hereendMissionCleanup = function() endfunction main() repeat Wait(0) until not PedIsValid(gPlayer) or PedIsDead(gPlayer)end
local l_0_0 = {}local l_0_1 = falselocal l_0_2 = truelocal l_0_3 = true MissionSetup = function() DATLoad("SpawnTest.DAT", 2) DATInit() AreaTransitionPoint(22, POINTLIST._ST_PLAYER) AreaOverridePopulation(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) {id = nil, point = POINTLIST._ST_COP, model = 83}.path = PATH._ST_COP {id = nil, point = POINTLIST._ST_COP, model = 83}.path2 = PATH._ST_COP2 {id = nil, point = POINTLIST._ST_COP, model = 83}.path3 = PATH._ST_COP3 l_0_0 = AreaOverridePopulation ItemSetCurrentNum(370, 10)end MissionCleanup = function() DATUnload(2) AreaRevertToDefaultPopulation()end main = function() local l_3_0 = nil local l_3_1 = BlipAddXYZ(-100, 56, 26, 0, 1) RadarSetIndoorRange(20) for l_3_5 = l_0_0, nil, nil do l_3_5.id = PedCreatePoint(l_3_5.model, l_3_5.point) PedSetStealthBehavior(l_3_5.id, 1, F_OnSightCallback, F_OnHearCallback) PedSetStealthVisionHeight(l_3_5.id, 0.5) l_3_0 = l_3_5.id end while 1 do if l_0_1 then TextPrintString("Press ~x~ to make cop stop.", 0.10000000149012, 2) else TextPrintString("Press ~x~ to make cop patrol, ~t~ to reset props, ~o~ to return to start.", 0.10000000149012, 2) end if IsButtonPressed(7, 0) then PedAttack(l_3_0, gPlayer, 3) Wait(500) elseif IsButtonPressed(6, 0) then if l_0_1 then F_StopPeds() else F_MovePeds(0) end Wait(500) elseif IsButtonPressed(8, 0) then Wait(500) elseif IsButtonPressed(9, 0) then Wait(500) end Wait(0) endend F_OnHearCallback = function(l_4_0)end F_OnSightCallback = function(l_5_0)end F_MovePeds = function(l_6_0) for l_6_4 = l_0_0, nil, nil do if l_6_4.id ~= nil then PedFollowPath(l_6_4.id, l_6_4.path, 2, l_6_0, F_T1, 0, F_T2, F_T3) end end l_0_1 = trueend F_T1 = function(l_7_0, l_7_1, l_7_2)end F_T2 = function(l_8_0, l_8_1, l_8_2)end F_T3 = function(l_9_0, l_9_1, l_9_2, l_9_3)end F_StopPeds = function() for l_10_3 = l_0_0, nil, nil do if l_10_3.id ~= nil then PedStop(l_10_3.id) end end l_0_1 = falseend F_ReturnToStart = function() for l_11_3 = l_0_0, nil, nil do if l_11_3.id ~= nil then PedMoveToPoint(l_11_3.id, 0, l_11_3.point) end end l_0_1 = falseend F_RestoreProps = function() if PAnimIsDestroyed(TRIGGER._ST_CRATE_01) then PAnimCreate(TRIGGER._ST_CRATE_01) end if PAnimIsDestroyed(TRIGGER._ST_CRATE_02) then PAnimCreate(TRIGGER._ST_CRATE_02) end if PAnimIsDestroyed(TRIGGER._ST_CRATE_03) then PAnimCreate(TRIGGER._ST_CRATE_03) endend
Hey dude welcome to the board and here's a bit of info on how to mod and make a mission. I haven't been around in a while busy working but I have my f_cking files this time . So i'll give you a post I made on mission modding. One is a test mission script and the other a tutorial. http://bully-board.com/index.php?topic=22996.msg394002#msg394002http://bully-board.com/index.php?topic=22975.msg393727#msg393727To correct this blip tutorial here is a stealth script Code: [Select]local l_0_0 = {}local l_0_1 = falselocal l_0_2 = truelocal l_0_3 = true MissionSetup = function() DATLoad("SpawnTest.DAT", 2) DATInit() AreaTransitionPoint(22, POINTLIST._ST_PLAYER) AreaOverridePopulation(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) {id = nil, point = POINTLIST._ST_COP, model = 83}.path = PATH._ST_COP {id = nil, point = POINTLIST._ST_COP, model = 83}.path2 = PATH._ST_COP2 {id = nil, point = POINTLIST._ST_COP, model = 83}.path3 = PATH._ST_COP3 l_0_0 = AreaOverridePopulation ItemSetCurrentNum(370, 10)end MissionCleanup = function() DATUnload(2) AreaRevertToDefaultPopulation()end main = function() local l_3_0 = nil local l_3_1 = BlipAddXYZ(-100, 56, 26, 0, 1) RadarSetIndoorRange(20) for l_3_5 = l_0_0, nil, nil do l_3_5.id = PedCreatePoint(l_3_5.model, l_3_5.point) PedSetStealthBehavior(l_3_5.id, 1, F_OnSightCallback, F_OnHearCallback) PedSetStealthVisionHeight(l_3_5.id, 0.5) l_3_0 = l_3_5.id end while 1 do if l_0_1 then TextPrintString("Press ~x~ to make cop stop.", 0.10000000149012, 2) else TextPrintString("Press ~x~ to make cop patrol, ~t~ to reset props, ~o~ to return to start.", 0.10000000149012, 2) end if IsButtonPressed(7, 0) then PedAttack(l_3_0, gPlayer, 3) Wait(500) elseif IsButtonPressed(6, 0) then if l_0_1 then F_StopPeds() else F_MovePeds(0) end Wait(500) elseif IsButtonPressed(8, 0) then Wait(500) elseif IsButtonPressed(9, 0) then Wait(500) end Wait(0) endend F_OnHearCallback = function(l_4_0)end F_OnSightCallback = function(l_5_0)end F_MovePeds = function(l_6_0) for l_6_4 = l_0_0, nil, nil do if l_6_4.id ~= nil then PedFollowPath(l_6_4.id, l_6_4.path, 2, l_6_0, F_T1, 0, F_T2, F_T3) end end l_0_1 = trueend F_T1 = function(l_7_0, l_7_1, l_7_2)end F_T2 = function(l_8_0, l_8_1, l_8_2)end F_T3 = function(l_9_0, l_9_1, l_9_2, l_9_3)end F_StopPeds = function() for l_10_3 = l_0_0, nil, nil do if l_10_3.id ~= nil then PedStop(l_10_3.id) end end l_0_1 = falseend F_ReturnToStart = function() for l_11_3 = l_0_0, nil, nil do if l_11_3.id ~= nil then PedMoveToPoint(l_11_3.id, 0, l_11_3.point) end end l_0_1 = falseend F_RestoreProps = function() if PAnimIsDestroyed(TRIGGER._ST_CRATE_01) then PAnimCreate(TRIGGER._ST_CRATE_01) end if PAnimIsDestroyed(TRIGGER._ST_CRATE_02) then PAnimCreate(TRIGGER._ST_CRATE_02) end if PAnimIsDestroyed(TRIGGER._ST_CRATE_03) then PAnimCreate(TRIGGER._ST_CRATE_03) endend