Jump to content

#Al-Ha[J]aRii

Members
  • Posts

    482
  • Joined

  • Last visited

Everything posted by #Al-Ha[J]aRii

  1. تفضل ~~ Server Side ! addEvent ( "login", true ) addEventHandler ( "login", 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 With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", 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 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) 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 - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Client Side ! function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"1.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end)
  2. جرب ذذ function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"images/tarkep.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( GUIEditor_Checkbox[1], true ) guiSetText ( GUIEditor_Button[1], tostring(username)) guiSetText ( GUIEditor_Button[2], tostring(password)) else guiCheckBoxSetSelected ( GUIEditor_Checkbox[1], false ) guiSetText ( GUIEditor_Button[1], tostring(username)) guiSetText ( GUIEditor_Button[2], tostring(password)) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end
  3. -- Client Side !!! < تشوف تابل حاطها
  4. شكرآ على تنبيه اصلحه الحين لاني عملته بسرعة ذذ
  5. Client Side ! function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"images/tarkep.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end) addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent("login", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent("register", localPlayer, localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) ) end end ) addEvent ( "HideTheWindow", true ) addEventHandler ( "HideTheWindow", root, function ( ) guiSetVisible ( wnd, false ) fadeCamera ( true ) showCursor ( false ) end ) Server Side ! addEvent ( "login", true ) addEventHandler ( "login", 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 With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) else outputChatBox ( "Your Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", 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 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) 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 - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end )
  6. ---------------------------------------------------- هذا صعب عليه -- جرب ذا يمكن ينفع local v,y = guiGetPosition(guiElement,true) local v = 400 local y = 100 Label = guiCreateLabel(v,y,500,100,"Test",false) Move = setTimer(function() guiSetPosition(Label,v,y,false) y = y +50 end,1000,0) setTimer(function() if isTimer(Move) then killTimer(Move) end end,3000,1) او local v,y = guiGetPosition(guiElement,true) local v = 400 local y = 100 Label = guiCreateLabel(v,y,500,100,"Test",false) function Move() guiSetPosition(Label,v,y,false) y = y +1 end addEventHandler("onClientRender",getRootElement(),Move) setTimer(function() removeEventHandler("onClientRender",getRootElement(),Move) end,3000,1) هذا من اليسار لليمين وهو ينزل جرب local v,y = guiGetPosition(guiElement,true) local v = 400 local y = 100 Label = guiCreateLabel(v,y,100,100,"Test",false) function Move() guiSetPosition(Label,v,y,false) y = y +1 v = v +1 end addEventHandler("onClientRender",getRootElement(),Move) setTimer(function() removeEventHandler("onClientRender",getRootElement(),Move) end,4000,1) وهذا من اليمين لليسار وهو ينزل بأمكأنك تخليه من اليمين للوسط عدل ألأحداثيات جرب local v,y = guiGetPosition(guiElement,true) local v = 400 local y = 100 Label = guiCreateLabel(v,y,100,100,"Test",false) function Move() guiSetPosition(Label,v,y,false) y = y +1 v = v -1 end addEventHandler("onClientRender",getRootElement(),Move) setTimer(function() removeEventHandler("onClientRender",getRootElement(),Move) end,4000,1) https://forum.multitheftauto.com/viewtopic.php?f=160&t=53312
  7. الويكي العربي موجود مانحدف ! https://wiki.multitheftauto.com/wiki/AR/ ... 8.A8.D8.AA English will be better . | انجليزي أفضل ( ; . يب بس حق الي مايعرف انجليزي
  8. الويكي العربي موجود مانحدف ! https://wiki.multitheftauto.com/wiki/AR/ ... 8.A8.D8.AA
  9. جرب او رد خبر addEvent("kick", true) addEventHandler("kick", root, function () kickPlayer(source, "سبب الكيك") end ) يعطيك العافيه الله يعافيك
  10. جرب او رد خبر addEvent("kick", true) addEventHandler("kick", root, function () kickPlayer(source, "سبب الكيك") end )
  11. يا اسامه , ماركر واحد شغال حق يوم تدخل فيه يجيك GoodBey او لاهنت حط لي الميتا meta side ! تاكد انك سويت اسم ملف السيرفر server
  12. هيا اصلن اون لاين تلقه بعض سيرفراات كتبين رقصه جانجام ستايل مدام اون لاين تقدر تجيب لي رابط التحميل كل الروابط الي حصلتها للعبة العادية يبي ليك تبحث من رقصات الي في الويكي https://wiki.multitheftauto.com/wiki/Animations#ped
  13. كودك في اغلاط كثيرة استخدم هذه البرنامج يساعدك في معرفة الاغلاط viewtopic.php?f=91&t=24834&hilit=MTA+Script+Editor
  14. جرب fadeCamera ( false ) كودك يخليها فيها تايمر يعني بعد ثانية او ثانيتين ماتصير الشاشة سوده ترجع لقبل
  15. addEventHandler("onClientGUIClick",Button, function () stopSound(sound) sound = nil end)
  16. انا نقلته كامل ؟ ثاني شيء انا كنت بحط رابط مكان الانتقال بس انتون اقتبستون بسرعة ذذ
  17. AlooyFTW WTF = What The Fack FTW = For To Win غيرررر عنهم هههه او حساب اخويي اسمه AlooyFTW ادري مو ليي محطوط في موضوع هو لو يبحث في القسم بيحصل
  18. AlooyWTF WTF = What The Fack FTW = For To Win غيرررر عنهم هههه او حساب اخويي اسمه AlooyFTW
  19. AlooyFTW حساب اخوي الاصغر
  20. Server Side ! Animations = { "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A" } setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) من كود اسامة اللي عطاك اياهـ ( = وحاول تخلي الادمي يتعلم شوي ويجرب # اسامة عطاني كود ؟
  21. Server Side ! thePed = createPed ( 1, 0, 0, 500, 90 ) Animations = { "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A" } setPedAnimation( thePed, "DANCING", Animations [ math.random ( #Animations ) ] ) هذه ينشاء بد او يخليه يرقص
×
×
  • Create New...