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


Author Topic: Help me out  (Read 1563 times)

0 Members and 1 Guest are viewing this topic.

Offline Ryuzaki L Reachley

  • Jr. Member
  • **
  • Posts: 7
  • Gender: Male
  • Nothing here to see man
    • View Profile
Help me out
« on: April 10, 2014, 12:54:04 PM »
Hey fellas,any of u can help me out?
my problem is : what's wrong with this code? any of u can correct it for me?

GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
ImportScript("2_B.lua")

  l_0_0 = "Yes"

MissionSetup = function()
  local l_1_0 = -737.6
  local l_1_1 = -624.5
  local l_1_2 = 3.2
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)

F_MissionSetup = function()
  LoadAnimationGroup("G_Johnny")
  LoadActionTree("G_Striker_A")
  LoadActionTree("G_Johnny")
  PlayerSetControl(1)
  CameraFollowPed(gPlayer)
  ClockSet(9, 30)
  ClockSetTickRate(0.0060000000521541)
  LaunchScript("SObjTest.lua")
  PedSetTypeToTypeAttitude(1, 13, 2)
  PedSetTypeToTypeAttitude(2, 13, 2)
  PedSetTypeToTypeAttitude(3, 13, 1)
  PedSetTypeToTypeAttitude(4, 13, 4)
  PedSetTypeToTypeAttitude(5, 13, 1)
  PedSetTypeToTypeAttitude(6, 13, 2)
  PedSetTypeToTypeAttitude(11, 13, 2)
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
if IsButtonPressed(1,0) then
PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny")
elseif IsButtonPressed(0,0) then
PedSetActionTree(gPlayer, "/Global/G_Johnny", "Act/Anim/G_Johnny.act")
elseif IsButtonPressed(15,0) then
PedSetActionTree(gPlayer, "/Global/G_Striker_A", "Act/Anim/G_Striker_A.act")
end
    UpdateTextQueue()
    Wait(0)
   end
end

*note : i found this code on a topic but i forget where it is

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Help me out
« Reply #1 on: April 12, 2014, 08:29:37 AM »
 :sleep: you stole my code? that's my code dude! it's still got a problem but now with me it's fine ok and i can add more action node.!!  :cheernutz: ;D :cheernutz: ;D

Offline Screenracer

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: Help me out
« Reply #2 on: April 20, 2014, 07:44:21 AM »
Code: [Select]
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")
ImportScript("2_B.lua")

  l_0_0 = "Yes"

MissionSetup = function()
  local l_1_0 = -737.6
  local l_1_1 = -624.5
  local l_1_2 = 3.2
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)

F_MissionSetup = function()
  LoadAnimationGroup("G_Johnny")
  LoadActionTree("G_Striker_A")
  LoadActionTree("G_Johnny")
  PlayerSetControl(1)
  CameraFollowPed(gPlayer)
  ClockSet(9, 30)
  ClockSetTickRate(0.0060000000521541)
  LaunchScript("SObjTest.lua")
  PedSetTypeToTypeAttitude(1, 13, 2)
  PedSetTypeToTypeAttitude(2, 13, 2)
  PedSetTypeToTypeAttitude(3, 13, 1)
  PedSetTypeToTypeAttitude(4, 13, 4)
  PedSetTypeToTypeAttitude(5, 13, 1)
  PedSetTypeToTypeAttitude(6, 13, 2)
  PedSetTypeToTypeAttitude(11, 13, 2)
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
if IsButtonPressed(1,0) then
PedSetActionNode(gPlayer, "/Global/G_Johnny/Cinematic/ThroatGrab", "Act/Anim/G_Johnny")
elseif IsButtonPressed(0,0) then
PedSetActionTree(gPlayer, "/Global/G_Johnny", "Act/Anim/G_Johnny.act")
elseif IsButtonPressed(15,0) then
PedSetActionTree(gPlayer, "/Global/G_Striker_A", "Act/Anim/G_Striker_A.act")
end
    UpdateTextQueue()
    Wait(0)
   end
end

I have a code that does exactly what your trying to do, except with a better throatgrab and axekick node. Ill PM you it.