Jump to content

ممكن مساعده باصلاح الكود ذا


Recommended Posts

السلام عليكم ورحمة الله وبركاته

يا اخوان محتاج مساعده

بجعل الكاميرا تتحرك

محتاجها تتحرك

عند اختيار الشخصيه

تصير تلف حوالان الشخصيه

محاولتي الفاشله

local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) 
smoothMoveCamera(2884.3356933594,1793.1822509766,28.638404846191,2901.93359375,1789.3258056641,28.260992050171,2884.3356933594,1793.1822509766,28.638404846191,2901.93359375,1789.3258056641,28.260992050171,2000) 
setTimer(function() 
            if getElementModel(selectPed) == 283 then  
                idSkin = 4 
            elseif getElementModel(selectPed) == 285 then  
                idSkin = 3 
            elseif getElementModel(selectPed) == 282 then  
                idSkin = 2 
            elseif getElementModel(selectPed) == 287 then  
                idSkin = 1 
            end 
end,100,1) 
  
  
  

Link to comment

Try this

local facing = 0 
local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) 
  
function rotateCameraAroundPed( ) 
    if selectPed then  
        local x, y, z = getElementPosition(selectPed) 
        local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 
        local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 
        setCameraMatrix(cameraX,cameraY, z, x, y, z ) 
        facing = facing + 0.00009 
    end  
end 
addEventHandler( "onClientRender",root,rotateCameraAroundPed) 

Edited by Guest
Link to comment
Try this
local facing = 0 
local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) 
  
function rotateCameraAroundPed( ) 
    if selectedPed then  
        local x, y, z = getElementPosition(selectPed) 
        local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 
        local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 
        setCameraMatrix(cameraX,cameraY, z, x, y, z ) 
        facing = facing + 0.00009 
    end  
end 
addEventHandler( "onClientRender",root,rotateCameraAroundPlayer) 

الكود صحيح لكن التعاريف غير صحيحة

selectedPed = ?

rotateCameraAroundPlayer = ?

Link to comment
Try this
local facing = 0 
local selectPed = createPed(287, 2892.9643554688, 1790.7238769531, 30.284019470215,90) 
  
function rotateCameraAroundPed( ) 
    if selectedPed then  
        local x, y, z = getElementPosition(selectPed) 
        local cameraX = x + math.cos( facing / math.pi * 180 ) * 5 
        local cameraY = y + math.sin( facing / math.pi * 180 ) * 5 
        setCameraMatrix(cameraX,cameraY, z, x, y, z ) 
        facing = facing + 0.00009 
    end  
end 
addEventHandler( "onClientRender",root,rotateCameraAroundPlayer) 

الكود صحيح لكن التعاريف غير صحيحة

selectedPed = ?

rotateCameraAroundPlayer = ?

هذا مش صحيح الصحيح بالكود الثاني

Link to comment

الكود صحيح لكن التعاريف غير صحيحة

selectedPed = ?

rotateCameraAroundPlayer = ?

هذا مش صحيح الصحيح بالكود الثاني

تم تجربة الكود, انت وش تبي توصل له ؟

Link to comment

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...