Jump to content

فنكشن


Recommended Posts

Posted (edited)

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

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

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

وسلاامتكم

Edited by Guest
Posted (edited)
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
Posted

لا يالغالي

مثلا

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

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

Type Your Name

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

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

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

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

Type Your Name

Posted

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

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

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

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

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

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

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

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

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

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

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

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

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

Posted

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

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 
) 
Posted

كيف يعني انت تكتب كلام؟ يعني انت من يوم سويت الاديت وهي فيها كلام؟

ويوم يضغط الزر يروح الكلام واذا رجع فتح النافذه يرجع نفس الكلام؟

Posted (edited)

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
Posted
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 ) 

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

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