Jump to content

طلب فنكشنات


Recommended Posts

السلام عليكم انا صممت لوحة تسجيل الدخول

وابي ابرمجها و انا فيطريق التعلم في اليوتوب ممكن تعطوني الفنكشات و ادرب يمكن اضبطها

وشكرا

Link to comment

هذي لوحه سويتها من زمان جدي xD

حاول تسوي الفنكشنات الي عطاك اياها الزاحف اذا حاولت اكثر من مره وماقدرت خذ هذي كـ مثال

#Client Side

Button1 = guiCreateButton ( 135, 181, 117, 42, "Register", false, Window ) 
Button2 = guiCreateButton ( 135, 181, 117, 42, "Login", false, Window ) 
Edit1 = guiCreateEdit ( 183, 51, 194, 39, "", false, Window ) 
Edit2 = guiCreateEdit ( 183, 51, 194, 39, "", false, Window ) 
  
addEventHandler ( "onClientGUIClick", root, function (    ) 
    if ( source == Button1 ) then 
    UserName = guiGetText ( Edit1 ) -- اسم الأيدت الاول 
    PassWord = guiGetText ( Edit2 ) -- اسم الايدت الثاني 
    triggerServerEvent ( "Register", localPlayer, Username, Password ) 
        elseif ( source == Button2 ) then 
    UserName = guiGetText ( Edit1 ) -- اسم الأيدت الاول 
    PassWord = guiGetText ( Edit2 ) -- اسم الأيدت الثاني 
    triggerServerEvent ( "Login", localPlayer, Username, Password ) 
    end 
end ) 

#Server Side

addEvent ( "Register", true ) 
addEventHandler ( "Register", root, function ( Username, Password ) 
    local AccountAdded = addAccount ( Username, Password ) 
    if ( AccountAdded ) then 
    outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true ) 
        else 
    outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 0, true ) 
    end 
end ) 
  
addEvent ( "Login", true ) 
addEventHandler ( "Login", root, function ( Username, Password ) 
    local Account = getAccount ( Username, Password ) 
    local Logined = logIn ( source, Account, Password ) -- هنا جرب كذا اذا ماضبط شيل كلمة باسورد 
    if ( Logined ) then 
    outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true ) 
        else 
    outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 0, true ) 
    end 
end ) 
Link to comment
هذي لوحه سويتها من زمان جدي xD

حاول تسوي الفنكشنات الي عطاك اياها الزاحف اذا حاولت اكثر من مره وماقدرت خذ هذي كـ مثال

#Client Side

Edit1 = guiCreateEdit ( 183, 51, 194, 39, "", false, Window ) 
Edit2 = guiCreateEdit ( 183, 51, 194, 39, "", false, Window ) 
Button1 = guiCreateButton ( 135, 181, 117, 42, "Register", false, Window ) 
Button2 = guiCreateButton ( 135, 181, 117, 42, "Login", false, Window ) 
  
addEventHandler ( "onClientGUIClick", root, function (    ) 
    if ( source == Button1 ) then 
    UserName = guiGetText ( Edit1 ) -- اسم الادت الاول 
    PassWord = guiGetText ( Edit2 ) -- اسم الادت الثاني 
    triggerServerEvent ( "Register", localPlayer, Username, Password ) 
        elseif ( source == Button2 ) then 
    UserName = guiGetText ( Edit1 ) -- اسم الادت الاول 
    PassWord = guiGetText ( Edit2 ) -- اسم الادت الثاني 
    triggerServerEvent ( "Login", localPlayer, Username, Password ) 
    end 
end ) 

#Server Side

addEvent ( "Register", true ) 
addEventHandler ( "Register", root, function ( Username, Password ) 
    local AccountAdded = addAccount ( Username, Password ) 
    if ( AccountAdded ) then 
    outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true ) 
        else 
    outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 0, true ) 
    end 
end ) 
  
addEvent ( "Login", true ) 
addEventHandler ( "Login", root, function ( Username, Password ) 
    local Account = getAccount ( Username, Password ) 
    local Logined = logIn ( source, Account, Password ) -- هنا جرب كذا اذا ماضبط شيل كلمة باسورد 
    if ( Logined ) then 
    outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true ) 
        else 
    outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 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...