Jump to content

مساعدة في كود بسيط


Recommended Posts

The Dra

 function ClickAllObject( theButton, theState, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld )
    local playerX, playerY, playerZ = getElementPosition( localPlayer )
    local hit, x, y, z, clickedWorld = processLineOfSight ( playerX, playerY, playerZ, worldX, worldY, worldZ )
    if hit then
        outputChatBox(tostring(clickedWorld).." - "..tostring(getElementType(clickedWorld)).." - "..tostring(getElementModel(clickedWorld)) )
        if (getElementType(clickedWorld)=="object") and (getElementModel(clickedWorld)==1345) then
            outputChatBox("true")
        else
            outputChatBox("false")
        end
    else
        outputChatBox("false #2")
    end
end
addEventHandler( "onClientClick", root, ClickAllObject ) 

gon

كل ما اضغط علي الاوبجكت  المقصدود يطلعلي false
وما يطلعلي true
والله اتمني احد يسداعدني

 

Link to comment
  • Scripting Moderators

بالغالب لأن فنكشن
processLineOfSight
element مايشتغل مع اوبجيكتات الماب الافتراضي لأن اوبجيكتات الماب الأصلي ماتعتبر 

البديل؟ زي ماقال لك الأخ فارس

Edited by xLive
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...