AboShanab
Members-
Posts
1,348 -
Joined
-
Last visited
Everything posted by AboShanab
-
GUIEditor = { checkbox = {}, edit = {}, button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(201, 188, 490, 255, "مود تسجيل الدخول + التسجيل من قبل العم ابو شنب", false) guiSetVisible (GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1],false) guiWindowSetMovable(GUIEditor.window[1],true) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF1B7EE3") GUIEditor.button[1] = guiCreateButton(10, 22, 22, 21, "Ar", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF1B7EE3") GUIEditor.button[2] = guiCreateButton(36, 22, 22, 21, "En", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF1B7EE3") GUIEditor.button[3] = guiCreateButton(456, 21, 24, 27, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.label[1] = guiCreateLabel(185, 43, 127, 25, "اسم الحساب", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 236, 141, 17) GUIEditor.edit[1] = guiCreateEdit(91, 78, 310, 31, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(185, 121, 127, 25, "كلمة المرور", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 236, 141, 17) GUIEditor.edit[2] = guiCreateEdit(90, 156, 310, 31, "", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(421, 230, 59, 16, "حفظ ؟", false, false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(10, 194, 114, 36, "تسجيل", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(178, 194, 114, 36, "تسجيل الدخول", false, GUIEditor.window[1]) GUIEditor.button[6] = guiCreateButton(338, 194, 114, 36, "زائر", false, GUIEditor.window[1]) end ) ---------- -- bindKey ---------- bindKey ( "F7" , "down" , function() if ( guiGetVisible ( GUIEditor.window[1] ) == true ) then guiSetVisible ( GUIEditor.window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor.window[1] ) == false ) then guiSetVisible ( GUIEditor.window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("xAboShanab.mp3") end end ) -------------------- -- Login and register -------------------- function clickLoginRegister() if (source == GUIEditor.button[5]) then triggerServerEvent ( "onLogin", getRootElement(), getLocalPlayer(), guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2]) ) elseif (source == GUIEditor.button[4]) then triggerServerEvent ( "onReg", getRootElement(), getLocalPlayer(), guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2]) ) end end addEventHandler ("onClientGUIClick", getRootElement(), clickLoginRegister) -------------------- -- Languages -------------------- addEventHandler("onClientGUIClick",getRootElement(), function () if ( source == GUIEditor.button[1] ) then guiSetText(GUIEditor.window[1],"مود التسجيل + تسجيل الدخول من قبل ابو شنب") guiSetText(GUIEditor.label[1],"اسم الحساب") guiSetText(GUIEditor.label[2],"كلمة المرور") guiSetText(GUIEditor.checkbox[1],"حفظ ؟") guiSetText(GUIEditor.button[4],"تسجيل") guiSetText(GUIEditor.button[5],"تسجيل الدخول") guiSetText(GUIEditor.button[6],"زائر") elseif ( source == GUIEditor.button[2] ) then guiSetText(GUIEditor.window[1],"Script register / login By AboShanab") guiSetText(GUIEditor.label[1],"Name Account") guiSetText(GUIEditor.label[2],"Password") guiSetText(GUIEditor.checkbox[1],"Save ?") guiSetText(GUIEditor.button[4],"register") guiSetText(GUIEditor.button[5],"login") guiSetText(GUIEditor.button[5],"Guest") end end ) -------------------- -- Exit Window -------------------- addEventHandler("onClientGUIClick",getRootElement(), function () if ( source == GUIEditor.button[3] ) then guiSetVisible ( GUIEditor.window[1] ,false ) showCursor (false) guiSetInputEnabled(false) end end ) -------------------- -- Hide Window Function -------------------- addEvent("HideWindow", true) addEventHandler("HideWindow",root, function() guiSetVisible (GUIEditor.window[1], false) end )
-
من عقلي ذذ .. اخوي بريستيج ي اخي سو لي الكود او عطني مثال يعني ساعدني اكثر الله يعطيك العافية .. من امس وانا افكر في الكود ماني عارف ي اخي .. لا تنسى اني توني جالس اتعلم على SQL .. ساعدني وماراح انسى لك المعروف
-
السسلام عليكم ورحمة الله وبركاته .. اخباركم شباب .. عسساكم بخير .. اليوم انا مسوي لوحة تسجيل + تسجيل الدخول انا سويت لهـا حفظ بـ SQL لاكن الان ابيها اذا جط على checkbox صح اذا دخل المرة الثانية يكون اسم المستخدم + كلمة المرور محفوظة كود تسجيل الدخول + التسجيل addEvent("onLogin", true) addEventHandler("onLogin",root, function (player, user, pass, NameAccount, Password) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) triggerClientEvent (source, "HideWindow", source) else outputChatBox ( "Login Error!", player, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) end end ) addEvent("onReg", true) addEventHandler("onReg",root, function ( player, user, pass, NameAccount, Password ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) triggerClientEvent (source, "HideWindow", source) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) triggerClientEvent (source, "HideWindow", source) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) triggerClientEvent (source, "HideWindow", source) else outputChatBox ( "Register Error !", player, 255, 0, 0 ) end end end ) كود الـ SQL addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SaveSystemByAboShanab (NameAccount,Password)" ) end ) function setSaveSystemByAboShanab ( user, pass, NameAccount, Password ) return executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", tostring(user), tostring(pass) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM SaveSystemByAboShanab" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data end end addEvent ( "RefreshList", true ) addEventHandler ( "RefreshList", root, function ( ) UpDateListInSql ( source ) end ) addEvent ( "Save:To:Data:Base", true ) addEventHandler ( "Save:To:Data:Base", root, function ( user, pass ) setSaveSystemByAboShanab ( user, pass ) end ) هل من ححل وششكرا
-
ي لبيه ي بريستيججج ييييييي لبيهه وربي انككك مملكك تم الحل تم الحل ذذ .. يعطيك الف الف عافية addEvent("onLogin", true) addEventHandler("onLogin",root, function (player, user, pass, NameAccount, Password) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) else outputChatBox ( "Login Error!", player, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) end end ) addEvent("onReg", true) addEventHandler("onReg",root, function ( player, user, pass, NameAccount, Password ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", user, pass ) else outputChatBox ( "Register Error !", player, 255, 0, 0 ) end end end ) الثانين addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SaveSystemByAboShanab (NameAccount,Password)" ) end ) function setSaveSystemByAboShanab ( user, pass, NameAccount, Password ) return executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", tostring(user), tostring(pass) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM SaveSystemByAboShanab" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data end end addEvent ( "RefreshList", true ) addEventHandler ( "RefreshList", root, function ( ) UpDateListInSql ( source ) end ) addEvent ( "Save:To:Data:Base", true ) addEventHandler ( "Save:To:Data:Base", root, function ( user, pass ) setSaveSystemByAboShanab ( user, pass ) end ) يعطيك مليون ترليون عافية
-
function setSaveSystemByAboShanab ( user, pass, NameAccount, Password ) return executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", tostring(user), tostring(pass) ) end يعني يصير هيك ؟؟
-
بعد التعديل عليه addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SaveSystemByAboShanab (NameAccount,Password)" ) end ) function setSaveSystemByAboShanab ( NameAccount, Password ) return executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", tostring(NameAccount), tostring(Password) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM SaveSystemByAboShanab" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data end end addEvent ( "RefreshList", true ) addEventHandler ( "RefreshList", root, function ( ) UpDateListInSql ( source ) end ) addEvent ( "Save:To:Data:Base", true ) addEventHandler ( "Save:To:Data:Base", root, function ( user, pass ) setSaveSystemByAboShanab ( user, pass ) end ) كود تسجيل الدخول + التسجيل addEvent("onLogin", true) addEventHandler("onLogin",root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true ) executeSQLInsert ( "NameAccount", ""..user .."Password", ""..pass .."" ) else outputChatBox ( "Login Error!", player, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) end end ) addEvent("onReg", true) addEventHandler("onReg",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLInsert ( "NameAccount", ""..user .."Password", ""..pass .."" ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) executeSQLInsert ( "NameAccount", ""..user .."Password", ""..pass .."" ) else outputChatBox ( "Register Error !", player, 255, 0, 0 ) end end end ) ماضبطط وش الحل ؟؟
-
طيب لو ناخذ هذي الاشياء من مود بريستيج == addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SaveSystemByAboShanab (NameAccount,Password)" ) end ) function setSaveSystemByAboShanab ( NameAccount, Password ) return executeSQLQuery ( "INSERT INTO SaveSystemByAboShanab ( NameAccount, Password ) VALUES ( ?, ? )", tostring(NameAccount), tostring(Password) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM SaveSystemByAboShanab" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data end end addEvent ( "RefreshList", true ) addEventHandler ( "RefreshList", root, function ( ) UpDateListInSql ( source ) end ) addEvent ( "Save:To:Data:Base", true ) addEventHandler ( "Save:To:Data:Base", root, function ( user, pass ) setSQL_Data ( user, pass ) end ) كذا يضبط ولا لا ؟
-
اخوي طلال .. مرتب كل شي .. يسوي الـ tab وكل شي لاكن اذا سجلت ما يحط اسم الحساب داخل القاعدة + الباس .. .. ممكن حل ي شباب ..
-
addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SaveSystemByAboShanab (NameAccount,Password)" ) end ) function setSaveSystemByAboShanab ( NameAccount, Password ) return executeSQLQuery ( "INSERT INTO `SaveSystemByAboShanab` ( `NameAccount`, `Password` ) VALUES ( ?, ? )", tostring(user), tostring(pass) ) end شغال ؟
-
وين احط اسم الـتاب اللي ابيه ؟
-
مثلا كذا مضبوط ؟؟ executeSQLQuery("CREATE TABLE IF NOT EXISTS SaveSystemAccounts (Accounts TEXT,Test NUMBER,Pass")
-
السسلام عليكم ورحمة الله وبرككاته .. اخباركم شباب ؟؟ عساكم بالف خير .. طلبتكم اليوم تشرحون لي كيف اخلي المود يسوي حفظ في قاعدة البيانات .. مثلا ابيه يحفظ الـ حسابات والباسوردات في SQL يسوي له Tab جديد ويحط فيه SaveSystemAccounts واللي يبي حق التسجيل + تسجيل الدخول حقي addEvent("onLogin", true) addEventHandler("onLogin",root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true ) else outputChatBox ( "Login Error!", player, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) end end ) addEvent("onReg", true) addEventHandler("onReg",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) else outputChatBox ( "Register Error !", player, 255, 0, 0 ) end end end ) وششكرا
-
صصح عليك ي بريستيج ي ملكك وربي انكك ذيب .. ضبط ضبط
-
السسلام عليككم ورححمة الله وبرككاته .. اخباركم شباب ..؟ عسساكم بخير .. بعد رفع المابات وعمل شاق يوم شغلت مود الريس يتكرر بالشات : * MapError Travelling To the nextmap in 5 sec's. وشش الحل ي شباب ..
-
ذذيب والله ي حسسون .. يعطيك الف الف مليون ترليون عافية .. وربي انكك ملك
-
السسلام عليككم ورححمة الله وبرككاته .. اخبارككم شباب .. عسساكم بخخير .. معي مششكلة بالكود هذا .. -- Client Side local function getTeam ( team ) return getTeamFromName ( team ) end addEventHandler ( "onClientRender", root, function ( ) local team1 = getTeam ( "NoTeam" ) local team2 = getTeam ( "Police" ) local team3 = getTeam ( "Grove" ) local count1 = countPlayersInTeam ( team1 ) local count2 = countPlayersInTeam ( team2 ) local count3 = countPlayersInTeam ( team3 ) if ( count1 ) then guiSetText ( GUIEditor.label[3], "No Team Players : ".. tonumber ( count1 ) ) else if ( count2 ) then guiSetText ( GUIEditor.label[4], "Police Players : ".. tonumber ( count2 ) ) else if ( count3 ) then guiSetText ( GUIEditor.label[2], "Grove Players : ".. tonumber ( count3 ) ) end end end end ) مششكلته ان بس يكشف عدد الاعبين حق No Team التيمات الثانية ما يكششفها .. ارجو الحل وششكرا ..
-
سسسلام عليككم وشش المششكلة بذذا الكوود ؟؟ Buttons = function() local Edit = guiGetText(mEdit) if source == mClose then guiSetVisible(mWin, false) showCursor(false) guiSetInputEnabled(false) elseif source == mSend then if guiCheckBoxGetSelected(mCheck) == true then triggerServerEvent("tSend", getLocalPlayer(),Edit) end else triggerServerEvent("fSend", getLocalPlayer(),Edit) end else if source == mFake then if guiCheckBoxGetSelected(mCheck) == true then triggerServerEvent("tFake", getLocalPlayer(),Edit) end end else triggerServerEvent("fFake", getLocalPlayer(),Edit) end end addEventHandler("onClientGUIClick", getRootElement(), Buttons)
-
bindKey("F2","Down",function() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiSetInputEnabled(false) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) guiSetInputEnabled(true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0) ) guiSetVisible (GUIEditor.window[1], true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.1) ) end,200,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.2) ) end,300,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.3) ) end,400,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.4) ) end,500,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.5) ) end,600,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.6) ) end,700,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.7) ) end,800,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0. ) end,900,1,true) setTimer(function() guiSetAlpha ( GUIEditor.window[1], tonumber(0.9) ) end,1000,1,true) end,100,1,true) end end) ججربه وككلمني @TheBest فيه تضضارب بـ لغة Lua جرب Code
-
صصح ككلام ضضاوي .. طبعا المود مو من الكومنتري .. اذا معك توب تايم ماشي ححالو هات الرابط حقه يمقنن يضبط .. يسسلمو ع المرور النايسس ششباب ..
-
انت قصصدكك من ذا الكود وش تبي تاخذ منه .. اضهار اسم التيم ولا تغيير التيم ولا شنو ؟
-
ي اخووي المفروض تقول تبيه لكلنت ولا لسيرفر .. لو قايل لسيرفر كان ضبططته لك .. بس انت ما حددت شي
-
outputChatBox ( "#FF0000ss " .. getPlayerCount() .. " ss", 255, 255, 255, true ) لم يتمم التججربةة ذذ
-
يعني حرام الواحد يحط الـ 1_3_0 ??? ي اخي ماني فاككه اقسسم بالله اصلا ما اعرف افكك تشفير ..
-
تمم سسويته لك بنجججاح ذذ ححمله ي بعددي http://www.mediafire.com/download.php?28thn6ehcz2ss9v
