Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. اظن انك تقصد , setVehiclePlateText setVehiclePlateText
  2. ضايفه لقروب الادمن ؟ لاني جربته وشغال تمام عندي ذذ
  3. جرب كذا ذذ , -- Client Side # GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick",root, function() if source == GUIEditor_Button[2] then triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) elseif source == GUIEditor_Button[1] then triggerServerEvent("Register",localPlayer, guiGetText(GUIEditor_Edit[1]), guiGetText(GUIEditor_Edit[2])) end end ) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( false ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then logIn(client,v,Password) outputChatBox ( "Login with account : [ " .. userName .. " ]", client, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",client) fadeCamera(source,true) else outputChatBox("Error : In login",client,255,255,255,true) end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) addEvent("Register",true) addEventHandler("Register",root, function(userName,Password) Add = addAccount( user, pass ) if Add ~= false then outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login", source ) else outputChatBox ( "Error creating account, contact the server admin", source ) end end ) ضيفه لقروب الادمن ذذ , resource.ResourceName ResourceName = اسم المود ذذ,
  4. ^ كيف ما نفع ذذ ؟ false = يعني ما بيظهر ._. بالنسبه للتسجيل بدل , login(client,v,Password) الى , addAccount ( userName, Password ) وجرب , ضيفه لقروب الادمن ذذ مدري ليه تبيه يسجل , سوي ترايقر ثاني للتسجيل , ولا خلها تسجيل مع تسجيل دخول في كود واحد ذذ
  5. بالنسبه للماوس , انا نبهتك اول انك حاط true ._. خليه كذا , GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( false ) end end ) بالنسبه للسيرفر , اصلا انت قلت تبيه يسجل الدخول ,؟؟ واصلا الكود مافي تسجيل خير شر ذذ
  6. جرب كذا , addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then logIn ( client, v, Password ) outputChatBox ( "Login with account : [ " .. userName .. " ]", client, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",client) fadeCamera(source,true) else outputChatBox("Error : In login",client,255,255,255,true) end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join)
  7. guiGridListGetSelectedItem -- عشان تجيب الشيء الي اختاره من القريد ليست # guiGridListGetItemText -- عشان تجيب الداتا الي هي مثلا الدائري او المطار ...الخ # setElementPosition -- عشان تحط احداثياته # + وضح كيف يعني تبيه اذا ضغط على المطار مثلا ينقله للاحداثيات او اذا اختار المطار وضغط على زر ؟ + وسوي جدول افضل ذذ
  8. Edit # -- Client Side # GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( true ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function(player,userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then if logIn ( player, v, Password ) == true then outputChatBox ( "Login with account : [ " .. userName .. " ]", player, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",player) fadeCamera(player,true) else outputChatBox("Error : In login",player,255,255,255,true) end end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) ملف سيرفر ضفت له اول ما يدخل الشاشه سودآء واذا سجل الدخول ترجع زي ماهي ذذ
  9. الحين قولنا وين الاديت حق الاسم والباس ؟
  10. الحين جيب المتغيرات حق الاديت حق الاسم والباس ذذ لانها مو معرفه مثل ما قالك فهد ذذ
  11. onPlayerJoin وافضل تسوي جدول للسيارة تجنباً للاخطاء ذذ , createVehicle getElementPosition + كيف تبيه تجيه سياره وهو ما سوى سباون ذذ ؟ استخدم افضل - onPlayerSpawn
  12. هذا يخفي النافذه اذا سجل الدخول , هذا تحطه كلنت ذذ
  13. جربته وشغال ويسجل الدخول ذذ, شوف يمكن في كود ثاني بنفس المتغير او كود يخرب ذذ
  14. حذفت ردي لاني ما شفت خطأ ذذ , + كان في خطأ بالفنشكشن , + جرب كذآ , addEvent("Login",true) addEventHandler("Login",root, function(player,userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then if logIn ( player, v, Password ) == true then outputChatBox ( "Login with account : [ " .. userName .. " ]", player, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",player) else outputChatBox("Error : In login",player,255,255,255,true) end end end )
  15. -- Client Side # addEvent ( "onSpecialEvent", true ) -- الخطوه الاولى addEventHandler("onSpecialEvent",root,-- الخطوه الثانيه function () if ( guiGetVisible ( windowLogin ) == true ) then -- الخطوه الثالثه guiSetVisible ( windowLogin ,false ) -- الخطوه الرابعه showCursor ( true ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( username, Password ) if ( v ~= true ) then logIn ( client, v, Password ) triggerClientEvent("onSpecialEvent",client) else outputChatBox ( "Wrong username or password!", client, 255, 255, 0 ) end end )
  16. المفروض يكون في تعويض للي ينتظرون ذذ
  17. احمر : كلنت بس ازرق : كلنت وسيرفر برتقالي : سيرفر بس + تأكد من السيرفر , تأكد ان الترايقر موجود , اوكـ الكود ماشتغل اطرح ملف سيرفر ذذ
  18. احمر : كلنت بس ازرق : كلنت وسيرفر برتقالي : سيرفر بس + تأكد من السيرفر , تأكد ان الترايقر موجود ,
  19. مافي خطأ , + ما يحتاج تحط القيمه true اقصد هنآ , if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then لانه اصلا بيتحقق ان النافذه ظاهره ذذ, if ( guiGetVisible (GUIEditor_Window[1])) then المهم كلها صح , ذذ بس لازم يكون الترايقر من السيرفر نفس اسم , onSpecialEvent + الماوس بيكون ظاهر ذذ, true = ظاهر , false = مخفي ,
  20. يعني ما تعرف تسوي , addEvent addEventHandler guiSetVisible showCursor صراحه اذا ما تعرف تخلينا نشك انك تسوي ااكواد
  21. الترايقر فايدته انك تسوي شيء يكون بالسيرفر بس فـ ترسل ترايقر من الكنلت للسيرفر واذا كان شيء كلنت وانت كودك سيرفر ترسل ترايقر من السيرفر للكنت , انت تسوي له بعد ما يسجل الدخول , triggerClientEvent( "Hide",root) + تجيب الترايقر من الكلنت ,
×
×
  • Create New...