KaduRo Posted April 17, 2014 Posted April 17, 2014 السلام عليكم يا شباب محتاج كود يتأكد إذا كان اللاعب واقف بمكانه او لا يعني مثلآ لو كان واقف مايتحرك . يطلع له كلام أنه ثابت , وإذا يتحرك , يطلع له كلام أنه يتحرك!
#DRAGON!FIRE Posted April 17, 2014 Posted April 17, 2014 Event: "onClientRender" isElementMoving dxDrawText اللي بالكومنتي واكثر من واحد موجود ذذ AFK يمكنكـ استخدم سكربت
</Mr.Tn6eL> Posted April 17, 2014 Posted April 17, 2014 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) مو كودي
#DRAGON!FIRE Posted April 17, 2014 Posted April 17, 2014 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) مو كودي اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ
</Mr.Tn6eL> Posted April 17, 2014 Posted April 17, 2014 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
KaduRo Posted April 17, 2014 Author Posted April 17, 2014 مشكورين يا شباب ! انا ما ابيه لسكربت AFK بس حبيت اجرب فيه فكرة ! بالمناسبة الفنكشن فيه خطأ function idleCheck addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير
</Mr.Tn6eL> Posted April 17, 2014 Posted April 17, 2014 مشكورين يا شباب !انا ما ابيه لسكربت AFK بس حبيت اجرب فيه فكرة ! بالمناسبة الفنكشن فيه خطأ function idleCheck addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير طيب عدلة
Mr.AL#PLaYeR Posted April 17, 2014 Posted April 17, 2014 + addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering )
abu5lf Posted April 17, 2014 Posted April 17, 2014 اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ local element = getPedOccupiedVehicle ( localPlayer ) or localPlayer
KaduRo Posted April 17, 2014 Author Posted April 17, 2014 مشكورين يا شباب !انا ما ابيه لسكربت AFK بس حبيت اجرب فيه فكرة ! بالمناسبة الفنكشن فيه خطأ function idleCheck addEventHandler ( "onClientRender", root, idleC) -- الفنكشن هنا غير طيب عدلة بس حبيت اوضح أنه خطأ
</Mr.Tn6eL> Posted April 17, 2014 Posted April 17, 2014 اولأ ذا يتحقق من السيارة واقفة او لأ .. ثانيا مو ضروري تحطه هنا مدام موجود بـ الفنكشن اللي عطيته هو ذذ 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now