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


Author Topic: cuz it should be made  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

Offline ultrasbully

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
cuz it should be made
« on: March 03, 2015, 06:32:22 AM »
so anyone could combines these 3 features strafe,block and running for me .kthx

strafe
Code: [Select]
function IsMoving()
  local s = 0.08 -- sensitivity
  return GetStickValue(16,c) > s or GetStickValue(16,c) < -s or GetStickValue(17,c) > s or GetStickValue(17,c) < -s
end

F_StartMission = function()
style = ""

while Alive do
if style ~= "Player" and style ~= "player" then
      if IsButtonPressed(10,0) and IsMoving() and not isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionNode(gPlayer,"/Global/FIGHTINGSTYLE/Default_KEY/ExecuteNodes/LocomotionOverride/Combat/CombatBasic","act/anim/FIGHTINGSTYLE.act")
isStrafing = true
  elseif IsButtonPressed(10,0) and not IsMoving() and isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionTree(gPlayer, "/Global/FIGHTINGSTYLE", "act/anim/FIGHTINGSTYLE.act")
isStrafing = false
  elseif (not IsButtonPressed(10,0) or not IsMoving()) and isStrafing and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
PedSetActionTree(gPlayer, "/Global/FIGHTINGSTYLE", "act/anim/FIGHTINGSTYLE.act")
    isStrafing = false
  elseif isStrafing then
    local x,y,z = PedGetPosXYZ(PedGetTargetPed())
    PedFaceXYZ(gPlayer,x,y,z)
  end
end

wait(0)

end
end


block
Code: [Select]
function Block()
   if IsButtonPressed(10,0) and IsButtonBeingPressed(12,0) and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
      PedSetActionTree(gPlayer,"/Global/Player","Act/Player.act")
   elseif IsButtonBeingReleased (10,0)  and not PedIsValid(PedGetGrappleTargetPed(gPlayer)) then
      PedSetActionTree(gPlayer,"/Global/"..style,"Act/Anim/"..style..".act")
end
   end

running
Code: [Select]
elseif IsButtonBeingPressed(6, 0) and IsMoving() and not IsRunning and not (PedIsValid(PedGetGrappleTargetPed(gPlayer)) or PedIsValid(PedGetTargetPed())) then
     ExecuteActionNode(gPlayer, "/Global/STYLE HERE/Default_KEY/ExecuteNodes/Free/RunBasic", "Act/Anim/STYLE HERE.act")
IsRunning = true
 elseif PedIsPlaying(gPlayer, "/Global/STYLE HERE/Default_KEY/ExecuteNodes/Free/RunBasic", "Act/Anim/STYLE HERE.act") and IsRunning and not IsMoving() then
     PedSetActionTree(gPlayer,"/Global/STYLE HERE", "Act/Anim/STYLE HERE.act")
     IsRunning = false
 elseif IsMoving() and not PedIsPlaying(gPlayer, "/Global/STYLE HERE/Default_KEY/ExecuteNodes/Free/RunBasic", "Act/Anim/STYLE HERE.act") then
     IsRunning = false

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: cuz it should be made
« Reply #1 on: March 03, 2015, 08:20:41 AM »
What style are you using? If you are using Jimmy's style, there is no need for this.