Jump to content

طلب كود


Recommended Posts

Posted

السلام عليكم

يا شباب محتاج كود يتأكد إذا كان اللاعب واقف بمكانه او لا

يعني مثلآ لو كان واقف مايتحرك . يطلع له كلام أنه ثابت , وإذا يتحرك , يطلع له كلام أنه يتحرك!

Posted
function isElementMoving ( theElement ) 
    if isElement ( theElement ) then                     -- First check if the given argument is an element 
        local x, y, z = getElementVelocity( theElement ) -- Get the velocity of the element given as argument 
        return x ~= 0 or y ~= 0 or z ~= 0                -- When there is a movement on X, Y or Z return true because our element is moving 
    end 
  
    return false 
end 
  
local screenWidth, screenHeight = guiGetScreenSize () -- Get the screen resolution (width and height) 
  
function idleCheck () 
    local state   = "Unknown" 
    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 
  
    -- Check whether the player is moving or not. 
    if isElementMoving ( element ) then 
        state = "moving" 
    else 
        state = "idling" 
    end 
  
    -- Write our state string to the lower left corner of the screen 
    dxDrawText ( "You are " .. state .. "!", 40, screenHeight - 40, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "default" ) 
end 
  
-- Keep the text visible with onClientRender. 
addEventHandler ( "onClientRender", root, idleC) 

مو كودي

Posted
function isElementMoving ( theElement ) 
    if isElement ( theElement ) then                     -- First check if the given argument is an element 
        local x, y, z = getElementVelocity( theElement ) -- Get the velocity of the element given as argument 
        return x ~= 0 or y ~= 0 or z ~= 0                -- When there is a movement on X, Y or Z return true because our element is moving 
    end 
  
    return false 
end 
  
local screenWidth, screenHeight = guiGetScreenSize () -- Get the screen resolution (width and height) 
  
function idleCheck () 
    local state   = "Unknown" 
    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 
  
    -- Check whether the player is moving or not. 
    if isElementMoving ( element ) then 
        state = "moving" 
    else 
        state = "idling" 
    end 
  
    -- Write our state string to the lower left corner of the screen 
    dxDrawText ( "You are " .. state .. "!", 40, screenHeight - 40, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "default" ) 
end 
  
-- Keep the text visible with onClientRender. 
addEventHandler ( "onClientRender", root, idleC) 

مو كودي

اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ

Posted
function isElementMoving ( theElement ) 
    if isElement ( theElement ) then                     -- First check if the given argument is an element 
        local x, y, z = getElementVelocity( theElement ) -- Get the velocity of the element given as argument 
        return x ~= 0 or y ~= 0 or z ~= 0                -- When there is a movement on X, Y or Z return true because our element is moving 
    end 
  
    return false 
end 
  
local screenWidth, screenHeight = guiGetScreenSize () -- Get the screen resolution (width and height) 
  
function idleCheck () 
    local state   = "Unknown" 
    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 
  
    -- Check whether the player is moving or not. 
    if isElementMoving ( element ) then 
        state = "moving" 
    else 
        state = "idling" 
    end 
  
    -- Write our state string to the lower left corner of the screen 
    dxDrawText ( "You are " .. state .. "!", 40, screenHeight - 40, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "default" ) 
end 
  
-- Keep the text visible with onClientRender. 
addEventHandler ( "onClientRender", root, idleC) 

مو كودي

اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ

يحبيبي الفنكشن جربته ينفع بسيارة وبدون

لاحظ هنا

سيارة اللاعب او الاعب

    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 

Posted

مشكورين يا شباب !

انا ما ابيه لسكربت AFK

بس حبيت اجرب فيه فكرة !

بالمناسبة الفنكشن فيه خطأ

function idleCheck 
  
addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير   

Posted
مشكورين يا شباب !

انا ما ابيه لسكربت AFK

بس حبيت اجرب فيه فكرة !

بالمناسبة الفنكشن فيه خطأ

function idleCheck 
  
addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير   

طيب عدلة :shock:

Posted

اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ

local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 

Posted
مشكورين يا شباب !

انا ما ابيه لسكربت AFK

بس حبيت اجرب فيه فكرة !

بالمناسبة الفنكشن فيه خطأ

function idleCheck 
  
addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير   

طيب عدلة :shock:

بس حبيت اوضح أنه خطأ :)

Posted

اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ

local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 

\
function isElementMoving ( theElement ) 
    if isElement ( theElement ) then                     -- First check if the given argument is an element 
        local x, y, z = getElementVelocity( theElement ) -- Get the velocity of the element given as argument 
        return x ~= 0 or y ~= 0 or z ~= 0                -- When there is a movement on X, Y or Z return true because our element is moving 
    end 
  
    return false 
end 
  
local screenWidth, screenHeight = guiGetScreenSize () -- Get the screen resolution (width and height) 
  
function idleCheck () 
    local state   = "Unknown" 
    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 
  
    -- Check whether the player is moving or not. 
    if isElementMoving ( element ) then 
        state = "moving" 
    else 
        state = "idling" 
    end 
  
    -- Write our state string to the lower left corner of the screen 
    dxDrawText ( "You are " .. state .. "!", 40, screenHeight - 40, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "default" ) 
end 
  
-- Keep the text visible with onClientRender. 
addEventHandler ( "onClientRender", root, idleC) 

مو كودي

اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ

يحبيبي الفنكشن جربته ينفع بسيارة وبدون

لاحظ هنا

سيارة اللاعب او الاعب

    local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...