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


Author Topic: a little help with LUA :(  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Offline Enderman

  • What i'm doing right now?
  • Full Member
  • ***
  • Posts: 293
  • Gender: Male
  • I'm no longer do mods for Bully ...
    • View Profile
    • bully-board.com
a little help with LUA :(
« on: July 08, 2014, 08:42:26 PM »
Hey guys can this code work ?
GlobalImportScript("SObjTest.lua")
ImportScript("Library/LibTable.lua")
ImportScript("SZone.lua")

  l_0_0 = 60

MissionSetup = function()
  local l_1_0 = 270 -- X coords
  local l_1_1 = -110 -- Y coords
  local l_1_2 = 6.4000000953674 -- Z coords
  AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)

 
  SoundPlayStream("MS_JockBossBattle.rsm", 0.69999998807907)
 
  TextPrintString("Prep Mix Style")
  PlayerSetHealth(2000)
 
  end

F_MissionSetup = function()

  LoadActionTree("P_Striker_A")
  LoadAnimationGroup("P_Striker_A")
  LoadActionTree("Player")
  LoadAnimationGroup("Strafe_Preppie") 
 
  PlayerSetControl(1)
 
  CameraFollowPed(gPlayer)
 
  ClockSet(8, 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
  if IsButtonPressed(15,0) then
  PedSetActionTree(gPlayer,"/Global/P_Striker_A","Act/Anim/P_Striker_A.act")
  elseif IsButtonPressed(1,0) then
  PedSetActionTree(gPlayer,"Global/Player","Act/Anim/Player.act")
  elseif IsButtonPressed(6,0) then
  PedSetActionNode(gPlayer, "/Global/Ambient/HarassMoves/HarassShort/Shoves", "Act/Conv/Ambient.act")
  elseif IsButtonPressed(3,0) then
  PedSetActionNode(gPlayer, "/Global/Ambient/HarassMoves/HarassShort/Cheer","Act/Conv/Ambient.act")
  elseif IsButtonPressed(9,0)then
  PedSetActionNode(gPlayer, "/Global/Strafe_Preppie/P_Walk/CombatStrafeIdle","Act/Anim/Strafe_Preppie.act")
  end
  UpdateTextQueue()
    Wait(0)
  end
end
If don't work can some one fix it please i'm newbie i'm don't now anything just now some of these
PedSetActionNode
PedSetActionTree
TextPrintString
SoundPlayStream
PlayerSetHealth

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: a little help with LUA :(
« Reply #1 on: July 09, 2014, 12:07:48 AM »
I dont see any problems with it (I read it but might need to create a few times to be sure).
Yet, I suggest loading the animation group "Boxing" aswell.
Btw, compile and run the script to test it.