Mr-M3AND Posted December 1, 2013 Posted December 1, 2013 السلام عليكم ورحمة الله لاهنتم ابي كود التسجيل هذا يرفض تسجيل اللاعب اذا كان الباسورد اقل من خمسة ارقام وبرضو نفس الطريقة مع اليوزر مع مخرج الشات وشكرا addEvent('onRegister',true) addEventHandler('onRegister',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end )
AboShanab Posted December 1, 2013 Posted December 1, 2013 اخي الاضافات على الكود خلها كلنت افضل .. اطرح كلنت عشان اسويه لك ..
Mr-M3AND Posted December 1, 2013 Author Posted December 1, 2013 اخي الاضافات على الكود خلها كلنت افضل .. اطرح كلنت عشان اسويه لك .. addEventHandler ("onClientGUIClick", root, function() if ( source == Button[1] ) then triggerServerEvent("onlogin",localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) elseif ( source == Button[2] ) then triggerServerEvent("onregister",localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) end end )
فاّرس Posted December 1, 2013 Posted December 1, 2013 عندك التريقر بالكلنت مو نفس السيرفر لازم يكون نفسه,
Mr-M3AND Posted December 1, 2013 Author Posted December 1, 2013 عندك التريقر بالكلنت مو نفس السيرفر لازم يكون نفسه, addEventHandler ("onClientGUIClick", root, function() if ( source == Button[1] ) then triggerServerEvent('onlogin',localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) elseif ( source == Button[2] ) then triggerServerEvent('onregister',localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) end end )
AboShanab Posted December 1, 2013 Posted December 1, 2013 addEventHandler ("onClientGUIClick", root, function() if ( source == Button[1] ) then if ( guiGetText(Edit[1]) ~= "" or guiGetText(Edit[1]) ~= " " ) then if ( string.len(tostring(guiGetText(Edit[1]))) >= 5 ) then if ( string.len(tostring(guiGetText(Edit[2]))) >= 5 ) then triggerServerEvent('onlogin',localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) else outputChatBox("* Password Need To Be 5 Numbers or up",255,0,0,true) end else outputChatBox("* UserName Need To Be 5 Numbers or up",255,0,0,true) end else outputChatBox("* Please Write a UserName or Password",255,0,0,true) end elseif ( source == Button[2] ) then if ( guiGetText(Edit[1]) ~= "" or guiGetText(Edit[1]) ~= " " ) then if ( string.len(tostring(guiGetText(Edit[1]))) >= 5 ) then if ( string.len(tostring(guiGetText(Edit[2]))) >= 5 ) then triggerServerEvent('onregister',localPlayer, guiGetText(Edit[1]), guiGetText(Edit[2])) else outputChatBox("* Password Need To Be 5 Numbers or up",255,0,0,true) end else outputChatBox("* UserName Need To Be 5 Numbers or up",255,0,0,true) end else outputChatBox("* Please Write a UserName or Password",255,0,0,true) end end end ) جرب ..
Mr-M3AND Posted December 1, 2013 Author Posted December 1, 2013 onregister > onRegister اي صح شكرا على التوضيح
Mr-M3AND Posted December 1, 2013 Author Posted December 1, 2013 ضبط معي ماقصرت,, اما بالنسبة للكود هذا صح لما اللاعب يسجل باسم حساب موجود اصلاً مايسجل. طيب ليش يطلع بالشات انه سجل؟ addEvent('onRegister',true) addEventHandler('onRegister',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end )
AboShanab Posted December 1, 2013 Posted December 1, 2013 addEvent('onRegister',true) addEventHandler('onRegister',root, function (user,pass) if ( getAccount ( user ) ) then return outputChatBox("* This Account is Already Used",source,255,0,0) end addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end ) جرب ..
Mr-M3AND Posted December 1, 2013 Author Posted December 1, 2013 addEvent('onRegister',true) addEventHandler('onRegister',root, function (user,pass) if ( getAccount ( user ) ) then return outputChatBox("* This Account is Already Used",source,255,0,0) end addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end ) جرب .. ضبط معي ميه بالميه لك جزيل الشكر
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now