Jump to content

فنكشن


Recommended Posts

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

ياخوان بغيت فنكشن اني اكتب كلام محدد بالاديت ويوم يجي الاعب يظغط على الاديت يروح الكلام ويوم يقفل النافذةة

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

وسلاامتكم

Edited by Guest
Link to comment
addEventHandler( "onClientGUIClick", root, 
    function () 
       local Text = guiGetText( edit ) 
         if ( Text ) then 
            guiSetText ( edit,"Please Type Your Name" ) 
            setElementData( localPlayer, "Text", 0 ) 
   else 
        local TextBack = getElementData ( source, "Text" ) 
            guiSetText ( edit,"" ) 
        end 
    end 
) 

??

Edited by Guest
Link to comment

لا يالغالي

مثلا

انا فتحت النافذة

لقيت بالاديت مكتوب من نفسة

Type Your Name

وجيت ظغطت على الايديت ابيها تنحذف

ولما اقفل النافذة

وافتحها مرة ثاني

ابي الكلام يرجع زي ماهو بالاديت

Type Your Name

Link to comment

في طريقة افضل سويتها لكـ .. يوم يجي يغير الكلام الموجود يرجعه زي ما كان ذذ

addEventHandler( "onClientGUIChanged", resourceRoot, function(  ) 
  if ( source == element ) then 
        guiSetText( source, "Type Your Name" ) 
     end 
end ) 
Link to comment
في طريقة افضل سويتها لكـ .. يوم يجي يغير الكلام الموجود يرجعه زي ما كان ذذ

addEventHandler( "onClientGUIChanged", resourceRoot, function(  ) 
  if ( source == element ) then 
        guiSetText( source, "Type Your Name" ) 
     end 
end ) 

الله لايهينك حبيبي بس محتااج الي سويتةة =(

Link to comment
في طريقة افضل سويتها لكـ .. يوم يجي يغير الكلام الموجود يرجعه زي ما كان ذذ

addEventHandler( "onClientGUIChanged", resourceRoot, function(  ) 
  if ( source == element ) then 
        guiSetText( source, "Type Your Name" ) 
     end 
end ) 

الله لايهينك حبيبي بس محتااج الي سويتةة =(

تقصد تبي زي طلبكـ ؟

Link to comment
في طريقة افضل سويتها لكـ .. يوم يجي يغير الكلام الموجود يرجعه زي ما كان ذذ

addEventHandler( "onClientGUIChanged", resourceRoot, function(  ) 
  if ( source == element ) then 
        guiSetText( source, "Type Your Name" ) 
     end 
end ) 

الله لايهينك حبيبي بس محتااج الي سويتةة =(

تقصد تبي زي طلبكـ ؟

اي يالغلا لو ماعليك امر

Link to comment

طبعا هذا الكود تضيفه مع كود فتح النافذة حقكـ .

bindKey( "F2", "down", function( ) 
   local g_Text = guiGetText( element ) 
     if ( g_Text ~= "" ) then 
        if not ( g_Text == "Type Your Name" ) then  
           guiSetText( element, "Type Your Name" ) 
         end 
     end 
 end 
) 
Link to comment

bindKey ( "F2", "down", 
  function (   ) 
   if ( guiGetVisible ( GUIEditor.window[1] ) == true ) then 
            guiSetVisible ( GUIEditor.window[1], false ) 
            showCursor ( false ) 
            outputChatBox ( "Closed" ,255,0, 0 ,true )           
    else 
            guiSetVisible ( GUIEditor.window[1], true ) 
            local g_Text = guiGetText( edit ) 
            if ( g_Text ~= "" ) then 
               if not ( g_Text == "Type Your Name" ) then 
                  guiSetText( edit, "Type Your Name" ) 
               end 
            end 
            showCursor ( true ) 
            outputChatBox ( "Opened", 0, 255, 0, true ) 
        end 
end ) 
Edited by Guest
Link to comment
bindKey ( "F2", "down", 
  function (   ) 
   if ( guiGetVisible ( GUIEditor.window[1] ) == true ) then 
            guiSetVisible ( GUIEditor.window[1], false ) 
            showCursor ( false ) 
            outputChatBox ( "Closed" ,255,0, 0 ,true )           
    else 
            guiSetVisible ( GUIEditor.window[1], true ) 
            local g_Text = guiGetText( edit ) 
            if ( g_Text ~= "" ) then 
               if not ( g_Text == "Type Your Name" ) then 
                  guiSetText( edit, "Type Your Name" ) 
               end 
            end 
            showCursor ( true ) 
            outputChatBox ( "Opened", 0, 255, 0, true ) 
        end 
end ) 

مشكور زاحف على المساععدة

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