mohammed21999 Posted November 22, 2014 Share Posted November 22, 2014 شباب انا سويت كود يدبل السبرنت تكون سرعة الاعب بالركض دبلها space يعني لما الشخص يضغط يعني السرعة الطبيعية للاعب لما يركض 21 انا خليتها 42 اي الدبل بس مدري ليه ما اشتغل السكربت function setElementSpeed(element, unit, speed) if (unit == nil) then unit = 0 end if (speed == nil) then speed = 0 end speed = tonumber(speed) local acSpeed = getElementSpeed(element, unit) if (acSpeed~=false) then local diff = speed/acSpeed local x,y,z = getElementVelocity(element) setElementVelocity(element,x*diff,y*diff,z*diff) return true end return false end function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==0 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end addEventHandler("onClientRender",root,function() local speed = getElementSpeed(localPlayer,"mph") if ( speed and speed < 21 and getControlState("sprint") == true ) then setElementSpeed(localPlayer,"mph",42) end end ) بالله حد يساعدني و جزاكم الله خير Link to comment
TAPL Posted November 22, 2014 Share Posted November 22, 2014 تقصد ذا؟ setGlitchEnabled("fastsprint", true) Link to comment
mohammed21999 Posted November 22, 2014 Author Share Posted November 22, 2014 تقصد ذا؟ setGlitchEnabled("fastsprint", true) هممم, اظن انت جبتها ض2 بس لو تشوف الكود حقي انا مسوي تبديل السرعة Link to comment
mohammed21999 Posted November 22, 2014 Author Share Posted November 22, 2014 هيه نفع حقك بس بعد ما اسوي القلتش كيف ارجع الغيه؟ ذذ Link to comment
mohammed21999 Posted November 22, 2014 Author Share Posted November 22, 2014 خلاص كفوو السكربت صار% 100 Link to comment
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