so anyone could combines these 3 features strafe,block and running for me .kthx
strafe
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
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
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