Jump to content

طلب فنكشات


Recommended Posts

ممكن مثال

#1: تحط الكود بجهة كلنت

local sm = {} 
sm.moov = 0 
sm.object1,sm.object2 = nil,nil 
  
local function removeCamHandler() 
    if(sm.moov == 1)then 
        sm.moov = 0 
    end 
end 
  
local function camRender() 
    if (sm.moov == 1) then 
        local x1,y1,z1 = getElementPosition(sm.object1) 
        local x2,y2,z2 = getElementPosition(sm.object2) 
        setCameraMatrix(x1,y1,z1,x2,y2,z2) 
    end 
end 
addEventHandler("onClientPreRender",root,camRender) 
  
function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) 
    if(sm.moov == 1)then return false end 
    sm.object1 = createObject(1337,x1,y1,z1) 
    sm.object2 = createObject(1337,x1t,y1t,z1t) 
    setElementAlpha(sm.object1,0) 
    setElementAlpha(sm.object2,0) 
    setObjectScale(sm.object1,0.01) 
    setObjectScale(sm.object2,0.01) 
    moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") 
    moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") 
    sm.moov = 1 
    setTimer(removeCamHandler,time,1) 
    setTimer(destroyElement,time,1,sm.object1) 
    setTimer(destroyElement,time,1,sm.object2) 
    return true 
end 

#2: طريقة الاستخدام

smoothMoveCamera ( float x1, float y1, float z1, float x1t, float y1t, float z1t, float x2, float y2, float z2, float x2t, float y2t, float z2t, int time ) 

x1, y1, z1: المكان الي بتبداء منه الكامرا

x1t, y1t, z1t: المكان الي بتطالع فيه الكامرا

x2, y2, z2: المكان الي بتوقف فيه الكامرا

x2t, y2t, z2t: المكان الي بتطالع فيه الكامرا يوم توقف

time: سرعة حركة الكامرا

___

مثال بسيط مني

خذ جربه

smoothMoveCamera (1196.7194824219, -2019.3953857422, 72.632431030273, 1102.7600097656, -2053.583984375, 70.972236633301 
,1529.4622802734, -1691.4803466797, 21.742088317871, 1582.6916503906, -1609.6965332031, -0.12173497676849,30000) 

Link to comment

وش الخطأ هنا

  
    if team == "Grove" then -- 
        smoothMoveCamera (1494.64075 ,-698.19318 ,95.57261,1494.64075 ,-698.19318 ,95.57261,1494.64075 ,-698.19318 ,90.57261,1494.64075 ,-698.19318 ,90.57261,1494.64075 ,-698.19318 ,85.57261,1494.64075 ,-698.19318 ,85.57261,30000) 
        setElementPosition(sPed, 1494.64075, -695.19318 ,94.57261) 
        setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) 

Link to comment
ياعيال عندي مشكلة مدري ميزة مدري وش القصة

كل ماشارك شخص بهذا الموضوع يوصلني تنبيه للايميل

احد عنده حل

User Control Panel > Board preferences > ضبط الاعدادات زي ماتبغا

___

الكماشة وش يجيك بالدي بق؟

Link to comment
ياعيال عندي مشكلة مدري ميزة مدري وش القصة

كل ماشارك شخص بهذا الموضوع يوصلني تنبيه للايميل

احد عنده حل

User Control Panel > Board preferences > ضبط الاعدادات زي ماتبغا

___

الكماشة وش يجيك بالدي بق؟

تعطيني الاعدادات علساس اني ماعرفها :/

=

ابي اعطلها من وين بالضبط

Link to comment
ياعيال عندي مشكلة مدري ميزة مدري وش القصة

كل ماشارك شخص بهذا الموضوع يوصلني تنبيه للايميل

احد عنده حل

User Control Panel > Board preferences > ضبط الاعدادات زي ماتبغا

___

الكماشة وش يجيك بالدي بق؟

تعطيني الاعدادات علساس اني ماعرفها :/

=

ابي اعطلها من وين بالضبط

? Administrators الرسالة الي بتجيك على اي ميلك من اليوزر ولا من

Link to comment
ممكن مثال

#1: تحط الكود بجهة كلنت

local sm = {} 
sm.moov = 0 
sm.object1,sm.object2 = nil,nil 
  
local function removeCamHandler() 
    if(sm.moov == 1)then 
        sm.moov = 0 
    end 
end 
  
local function camRender() 
    if (sm.moov == 1) then 
        local x1,y1,z1 = getElementPosition(sm.object1) 
        local x2,y2,z2 = getElementPosition(sm.object2) 
        setCameraMatrix(x1,y1,z1,x2,y2,z2) 
    end 
end 
addEventHandler("onClientPreRender",root,camRender) 
  
function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) 
    if(sm.moov == 1)then return false end 
    sm.object1 = createObject(1337,x1,y1,z1) 
    sm.object2 = createObject(1337,x1t,y1t,z1t) 
    setElementAlpha(sm.object1,0) 
    setElementAlpha(sm.object2,0) 
    setObjectScale(sm.object1,0.01) 
    setObjectScale(sm.object2,0.01) 
    moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") 
    moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") 
    sm.moov = 1 
    setTimer(removeCamHandler,time,1) 
    setTimer(destroyElement,time,1,sm.object1) 
    setTimer(destroyElement,time,1,sm.object2) 
    return true 
end 

Link to comment
ياعيال عندي مشكلة مدري ميزة مدري وش القصة

كل ماشارك شخص بهذا الموضوع يوصلني تنبيه للايميل

احد عنده حل

User Control Panel -> Board preferences -> Edit posting defaults -> Notify me upon replies by default -> No.

او

ممكن تكون حطيت علامة صح على الخيار ذا الي يجي في الرد

A949NUB.png

سوي تعديل للرد و شيل الصح ان كان موجود

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