Skip to content

ا #56

Description

@moham0333-stack

local flying = false
local speed = 1.5

RegisterCommand('fly', function()
fly.use') then
Trigger -- التحقق من صلاحية الأدمن
if not IsPlayerAceAllowed(PlayerId(),
'Event('chat:addMessage', {
args = {'SYSTEM', 'ما عندك صلاحية استخدام الطيران.'}
})
return
se, fal end

flying = not flying

local ped = PlayerPedId()

if flying then
    SetEntityCollision(ped, fa

lse)
FreezeEntityPosition(ped, false)

    TriggerEvent('chat:addMessage', {
        args = {'SYSTEM', 'تم تشغيل الطيران.'}

إيقاف الط })
else
SetEntityCollision(ped, true, true)

    TriggerEvent('chat:addMessage', {
        args = {'SYSTEM', 'ت

ميران.'}
})
end
end)

CreateThread(function()
while true do
Wait(0)

    if flying then
        local ped = PlayerPedId()

        -- تثبيت الحركة بدون سقوط
        SetEntityVelocity(ped, 0.0, 0.0, 0.0)

        local coords = GetEntityCoords(ped)
        loc

al forward = GetEntityForwardVector(ped)

        -- W
        if IsControlPressed(0, 32) then
            coords = coords + (forward * speed)
-- Space: ا            end

        -- S
        if IsControlPressed(0, 33) then
            coords = coords - (forward * speed)
        end

رتفاع
if IsControlPressed(0, 22) then
coords = coords + vector3(0.0, 0.0, speed)
end

        -- CTRL: نزول
        if IsControlPressed(0, 36) then
            speed = 1.5
        end

        S                coords = coords - vector3(0.0, 0.0, speed)
        end

        -- Shift: سرعة أعلى
        if IsControlPressed(0, 21) then
            speed = 4.0
        else

etEntityCoordsNoOffset(
ped,
coords.x,
coords.y,
coords.z,
true,
true,
true
)
end
end
end)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions