1

ギャリー モードのスクリプトを作成しました。lua を使用して、キーをバインドするとジャンプし、360 回転して射撃できるようにするスクリプトをコーディングしましたが、コーディングが終了すると、それができなくなります。テストを実行してください。これはなぜですか。また、コードで何が間違っていたのか教えていただけますか。また、ターンが完全な 360 度にならないことは 90% 確信しています。ありがとう。コード:

function 360JumpShot()
    timer.simple(.01,jump)
    timer.simple(.02,turn)
    timer.simple(.04,turn)
    timer.simple(.06,turn)
    timer.simple(.08,turn)
    timer.simple(.10,turn)
    timer.Simple(.12,Turn)
    timer.Simple(.14,Turn)
    timer.Simple(.16,Turn)
    timer.Simple(.18,Turn)
    timer.Simple(.20,Turn)
    timer.Simple(.22,Turn)
    timer.Simple(.24,Turn)
    timer.Simple(.26,Turn)
    timer.Simple(.28,Turn)
    timer.Simple(.30,Turn)
    timer.Simple(.32,Turn)
    timer.Simple(.34,Turn)
    timer.Simple(.36,Turn)
    timer.Simple(.36,Turn)
    timer.Simple(.40,Turn)
    timer.Simple(.45,Turn)
    timer.Simple(.50,Turn)
    timer.Simple(.55,Turn)
    timer.Simple(.60,Turn)
    timer.Simple(.65,Turn)
    timer.Simple(.70,Turn)
-- Get Noscoped
    timer.simple(.7,function() RunConsoleCommand("+attack") end)
    timer.simple(.72,function() RunConsoleCommand("-attack") end)
end
function Turn()
-- Turn(360)
    LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles()-Angle(0,10,0))
end
function jump()
    LocalPlayer():EyeAngles() LocalPlayer():SetEyeAngles(Angle(a.p-a.p-a.p, a.y-180, a.r))
end
-- Console Command
concommand.ADD("360Jump",360JumpShot)
4

1 に答える 1

0

わかりました、私はそれを働かせました。

まず、数字で関数を開始することはできないので、変更してください

function 360JumpShot()
concommand.ADD("360Jump",360JumpShot)

function JumpShot()
concommand.Add("360Jump",JumpShot)

LUAは大文字と小文字を区別するため、ADDをAddに変更したことに注意してください..変更

timer.simple(.01,jump)
timer.simple(.02,turn)
timer.simple(.04,turn)
timer.simple(.06,turn)
timer.simple(.08,turn)
timer.simple(.10,turn)
timer.simple(.7,function() RunConsoleCommand("+attack") end)
timer.simple(.72,function() RunConsoleCommand("-attack") end)

timer.Simple(.01,jump)
timer.Simple(.02,Turn)
timer.Simple(.04,Turn)
timer.Simple(.06,Turn)
timer.Simple(.08,Turn)
timer.Simple(.10,Turn)
timer.Simple(.7,function() RunConsoleCommand("+attack") end)
timer.Simple(.72,function() RunConsoleCommand("-attack") end)

これらの変更の後、スクリプトは正常に動作しますが、カメラの動きが非常に遅く、おそらく望んでいるものではないため、より速く移動する方法を見つけたいと思うかもしれません.

于 2014-10-19T07:09:42.947 に答える