Jump to content

تصليح كود


Recommended Posts

السلام عليكم

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

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

الاكواد

client

local obb = createObject ( 980, 1544.5999755859, -1628.4000244141, 15.1999998092, 0, 0, 90 ) 
 local omm = createMarker ( 1543.6999511719, -1628.0999755859, 11.899999618, "cylinder", 9, 255, 255, 0, 0 ) 
  
  
 addEventHandler ("onClientMarkerHit", omm, 
  
    function ( element )     
          if getElementType ( element ) == "Player" then  
                guiSetVisible ( GUIEditor.window[1] ,true ) 
                   showCursor ( true ) 
     end 
            end 
                ) 
  
 addEventHandler ("onClientGUIClick", getRootElement(), 
  
 function () 
        if source == GUIEditor.button[2] then  
            guiSetVisible ( GUIEditor.window[1] ,false ) 
                   showCursor ( false ) 
                    
            elseif source == GUIEditor.button[1] then  
  
            if guiGetText ( GUIEditor.edit[1] ) == "123000" then 
                guiSetVisible ( GUIEditor.window[1] ,false ) 
                   showCursor ( false ) 
                    
                        moveObject ( obb, 2000, 1544.5, -1628.5999755859, 21.89999961853 ) 
     
                else 
                outputChatBox ("الرقم الذي ادخلته غير صحيح", 0, 0, 255, true ) 
                 
    end 
        end 
                end 
                ) 

:|

Link to comment

جرب

local obb = createObject ( 980, 1544.599, -1628.4, 15.199, 0, 0, 90 ) 
local omm = createMarker ( 1543.6999, -1628.1, 11.899999618, "cylinder", 9, 255, 255, 0, 0 ) 
  
addEventHandler ("onClientMarkerHit", omm, 
 function ( element )    
   if getElementType ( element ) == "player" then 
         guiSetVisible ( GUIEditor.window[1] ,true ) 
          showCursor ( true ) 
         end 
     end 
   ) 
      
addEventHandler ("onClientGUIClick", getRootElement(), 
 function () 
   if source == GUIEditor.button[2] then 
        guiSetVisible ( GUIEditor.window[1] ,false ) 
           showCursor ( false ) 
             elseif source == GUIEditor.button[1] then 
                if guiGetText ( GUIEditor.edit[1] ) == "123000" then 
                     guiSetVisible ( GUIEditor.window[1] ,false ) 
                       showCursor ( false ) 
                       moveObject ( obb, 2000, 1544.5, -1628.5999, 21.8999 ) 
                      else 
                     outputChatBox ("الرقم الذي ادخلته غير صحيح", 0, 0, 255, true ) 
                  end 
             end 
       end 
    ) 
Link to comment
جرب

local obb = createObject ( 980, 1544.599, -1628.4, 15.199, 0, 0, 90 ) 
local omm = createMarker ( 1543.6999, -1628.1, 11.899999618, "cylinder", 9, 255, 255, 0, 0 ) 
  
addEventHandler ("onClientMarkerHit", omm, 
 function ( element )    
   if getElementType ( element ) == "player" then 
         guiSetVisible ( GUIEditor.window[1] ,true ) 
          showCursor ( true ) 
         end 
     end 
   ) 
      
addEventHandler ("onClientGUIClick", getRootElement(), 
 function () 
   if source == GUIEditor.button[2] then 
        guiSetVisible ( GUIEditor.window[1] ,false ) 
           showCursor ( false ) 
             elseif source == GUIEditor.button[1] then 
                if guiGetText ( GUIEditor.edit[1] ) == "123000" then 
                     guiSetVisible ( GUIEditor.window[1] ,false ) 
                       showCursor ( false ) 
                       moveObject ( obb, 2000, 1544.5, -1628.5999, 21.8999 ) 
                      else 
                     outputChatBox ("الرقم الذي ادخلته غير صحيح", 0, 0, 255, true ) 
                  end 
             end 
       end 
    ) 

getElementType الكلينت ما يحتاج,

اشتغلل بس وش كاان الغلط ؟؟

كابيتل وهذا خطأ P حرف Player الغلط كان انك حاط

: بـ getElementType استبدل الشرط حق

if element == localPlayer then 

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