News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: how to return to normal game?  (Read 2089 times)

0 Members and 1 Guest are viewing this topic.

Offline luizd90

  • Jr. Member
  • **
  • Posts: 3
  • Gender: Male
    • View Profile
    • http://www.xfire.com/profile/luizd90
how to return to normal game?
« on: January 14, 2014, 10:55:32 AM »
I tried
Code: [Select]
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

Code: [Select]
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

Offline BullworthChampion

  • The Champ
  • Sr. Member
  • ***
  • Posts: 732
  • Gender: Male
  • Straight up awesome.
    • View Profile
Re: how to return to normal game?
« Reply #1 on: January 14, 2014, 01:42:13 PM »
IMA USE THIS!

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: how to return to normal game?
« Reply #2 on: January 14, 2014, 05:35:06 PM »
Code: [Select]
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 :

Code: [Select]
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
« Last Edit: January 15, 2014, 11:56:11 PM by c00ld0c26 »

Offline BullworthChampion

  • The Champ
  • Sr. Member
  • ***
  • Posts: 732
  • Gender: Male
  • Straight up awesome.
    • View Profile
Re: how to return to normal game?
« Reply #3 on: January 15, 2014, 09:04:56 PM »
IMA USE THIS TOO!

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: how to return to normal game?
« Reply #4 on: January 15, 2014, 11:56:43 PM »
Made a small fix at the main = function() at the post above.
Now I believe it works.

Offline luizd90

  • Jr. Member
  • **
  • Posts: 3
  • Gender: Male
    • View Profile
    • http://www.xfire.com/profile/luizd90
Re: how to return to normal game?
« Reply #5 on: January 16, 2014, 06:25:39 AM »
I was a day without internet, sorry
thank you :D :D

Offline BullworthChampion

  • The Champ
  • Sr. Member
  • ***
  • Posts: 732
  • Gender: Male
  • Straight up awesome.
    • View Profile
Re: how to return to normal game?
« Reply #6 on: January 16, 2014, 08:46:14 AM »
mmhmmm