Bssol Posted March 22, 2014 Share Posted March 22, 2014 اخوي هذا هو الكود الاساس، الباقي عليك تحطه وين ما تبي Link to comment
iMr.G[7]A Posted March 22, 2014 Share Posted March 22, 2014 طيب كيف اخلي البيد الشخصيات كلهآ Link to comment
Bssol Posted March 22, 2014 Share Posted March 22, 2014 استخدم هذا الكود حق تغيير شخصية البيد setElementModel Link to comment
iMr.G[7]A Posted March 22, 2014 Share Posted March 22, 2014 طيب ردو على موضوعي اللي قبله ذآ Link to comment
G.KinG Posted March 22, 2014 Author Share Posted March 22, 2014 يعني الكود يسير كذآ ؟ function SelectSkin () setElementInterior ( getLocalPlayer(), 0, 0,0,0 ) setCameraMatrix( 3878.8999023438,-1610.0999755859,17.1, 3878.9900488281,-1607.4000244141,16.5) local ped = createPed ( StartSkin, 3878.9900488281,-1608.4000244141,16.3,180 ) local speed = 5 -- زيد الرقم لتقليل سرعة الدوران local r = 2 -- زيد الرقم لزيادة المسافة بين الكاميرا والبيد function makeRotateCamera () local x,y,z = getElementPosition(ped) local g = getTickCount() / speed local cx = math.cos(g) * r + x local cy = math.sin(g) * r + y local cz = z setCameraMatrix ( cx, cy, cz, 3878.8999023438,-1610.0999755859,17.1 ) end addEventHandler ( "onClientRender", root, makeRotateCamera ) setPedAnimation( ped, "DANCING", SkinAnims[math.random(1,4)]) fadeCamera( true, 5) setTime(0,0) SkinSelectMusic = playSound(SkinMusic,true) bindKey("arrow_r","down",NextSkin) bindKey("arrow_l","down",LastSkin) bindKey("lshift","down",SpawnPlayer) addEventHandler("onClientRender",getRootElement(),AnnounceSkinJob) showCursor(true) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() SelectSkin() FreezeBots() end) وبصراحه في اشياء ما فهمتها مثل cx, cy, cz واشكر بسول انه رد على الموضوع وساعدني Link to comment
shwaeki Posted March 23, 2014 Share Posted March 23, 2014 طيب كيف اخلي البيد يدور او اوبجكت Link to comment
xFace[B]ook Posted March 23, 2014 Share Posted March 23, 2014 getElementRotation setElementRotation setTimer ^ Link to comment
</Mr.Tn6eL> Posted March 24, 2014 Share Posted March 24, 2014 تفضل تراه مو كودي local angle = 0 function renderCameraRotation( target, targetX, targetY, targetZ, cameraHeight, radius, speed, roll, fov ) local target = target or nil local cameraHeight = cameraHeight or 5 local radius = radius or 20 local speed = speed or 0.2 local roll = roll or 0 local fov = fov or 70 if isElement( target ) then targetX, targetY, targetZ = getElementPosition( target ) end local camX = targetX + radius * math.cos( math.rad( angle ) ) local camY = targetY + radius * math.sin( math.rad( angle ) ) if ( angle <= 360 ) then angle = angle + speed else angle = 0 end setCameraMatrix( camX, camY, targetZ + cameraHeight, targetX, targetY, targetZ, roll, fov ) end مثال ملاحظة لازم مع الرندر function renderCameraTest() renderCameraRotation( localPlayer ) end addEventHandler( "onClientRender", root, renderCameraTest ) + اذ تبي تبدل localPlayer = حط اسم الي تبي الكميرة تلف حوالة 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