Bully-Board
Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: luizd90 on January 14, 2014, 10:55:32 AM
-
I tried
MissionCleanup = function()
if PedIsDead(Bully01) then
TextPrint("M_PASS", 3, 0) Wait(10000) MissionSucceed()
if PedIsDead(gPlayer) then
TextPrint("M_FAIL", 3, 0) Wait(10000) MissionFail()
end
end
end
then
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
Bully01 = PedCreateXYZ(99, l_1_0 + 1, l_1_1 + 1, l_1_2 + 1)
if PedIsDead(Bully01) then
TextPrint("M_PASS", 3, 0) Wait(10000) MissionSucceed()
end
if PedIsDead(gPlayer) then
TextPrint("M_FAIL", 3, 0) Wait(10000) MissionFail()
end
end
and did not complete the mission
not back to normal game
sorry for bad english
-
IMA USE THIS!
-
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
l_2_0 = 1
l_2_1 = 1
MissionRunning = 1
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
Bully01 = PedCreateXYZ(99, l_1_0 + 1, l_1_1 + 1, l_1_2 + 1)
if PedIsDead(Bully01) then
TextPrint("M_PASS", 3, 0) Wait(10000) MissionSucceed()
end
if PedIsDead(gPlayer) then
TextPrint("M_FAIL", 3, 0) Wait(10000) MissionFail()
end
end
Fix :
MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
Bully01 = PedCreateXYZ(99, l_1_0 + 1, l_1_1 + 1, l_1_2 + 1)
end
Condition = function()
if PedGetHealth(Bully01) <= 0 then
l_2_0 = 2
elseif PedGetHealth(gPlayer) <= 0 then
l_2_1 = 2
end
end
MissionEnd = function()
if l_2_0 ~= 1 then
TextPrint("M_PASS", 3, 0)
Wait(10000)
MissionSucceed()
MissionRunning = 2
elseif l_2_1 ~= 1 then
TextPrint("M_FAIL", 3, 0)
Wait(10000)
MissionFail()
MissionRunning = 2
end
end
main = function()
repeat
condition()
MissionEnd()
Wait(0)
until MissionRunning == 2
end
end
-
IMA USE THIS TOO!
-
Made a small fix at the main = function() at the post above.
Now I believe it works.
-
I was a day without internet, sorry
thank you :D :D
-
mmhmmm