Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. setWeaponProperty ( weaponID, "pro", "maximum_clip_ammo", Value )
  2. ^^ GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then guiSetVisible (wnd,false) showCursor(false) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then guiSetVisible (wnd,false) showCursor(false) triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) OnClick hide window *
  3. اذا جآ كلنت رآح يصير تقريبآ كذآ : function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.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 ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.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 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, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML)
  4. ^^ آقصد getAccount + logIn = هذي ما تجي الا في السيرفر !
  5. في وظآئف سيرفر وش جآبهآ كلنت !؟
  6. GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then guiSetVisible (wnd, false) showCursor(false) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then guiSetVisible (wnd, false) showCursor(false) triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show)
  7. عندي ذا بس معقد افتحة بـ NotePad
  8. بدل اخطاء وتصليح ,, هذا مود جاهز معه الحفظ : https://community.multitheftauto.com/ind ... ls&id=6367 بالتوفيققُ,,
  9. آسف في آند زآئد,, يصير كذآ : GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent("save",getLocalPlayer()) triggerServerEvent("onlogin",getLocalPlayer(),user,pass) else triggerServerEvent("onlogin",getLocalPlayer(),user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show)
  10. آصلآ مافي مفتاح للنافذه ! المفروض كذآ : GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Checkbox[1] ) then triggerServerEvent("save",getLocalPlayer()) end end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show)
  11. جرب كذآ طيب,, addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 ) addEvent("save",true) addEventHandler("save",root, function register ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local node = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," accs") xmlNodeSetValue (xmlCreateChild ( node, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( node, "password:"), ""..pass.."" ) xmlSaveFile(node) xmlUnloadFile(node) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end end addEvent( "register", true ) addEventHandler( "register", getRootElement(), register )
  12. ما جرتهم... Client Side ! GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Checkbox[1] ) then triggerServerEvent("save",getLocalPlayer()) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ) Server Side ! addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 ) addEvent("save",true) addEventHandler("save",root, function register ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end end addEventHandler( "register", getRootElement(), register )
  13. Try this vatoMarker = createMarker ( 393.60001, -2059.69995, 9.736, "cylinder", 1, 255, 255, 0, 18 ) addEventHandler ( "onMarkerHit", vatoMarker, function ( hitElement ) outputChatBox("Test",source,0,255,0,true) end )
  14. --لم يتم التجربة if fileExists('acc.xml') then local accRoot = xmlLoadFile('acc.xml') if accRoot then for index, child in next, xmlNodeGetChildren(accRoot) do if xmlNodeGetAttribute(child,'Save') == 'true' then guiSetText(EditUser,xmlNodeGetAttribute(child,'Username')) guiSetText(EditPass,xmlNodeGetAttribute(child,'Password')) guiCheckBoxSetSelected(Check,true) end end xmlUnloadFile(accRoot) end else local accRoot = xmlCreateFile('acc.xml','authentication') if accRoot then local settings = xmlCreateChild(accRoot,'Settings') -- settings xmlNodeSetAttribute(settings,'Username','') xmlNodeSetAttribute(settings,'Password','') xmlNodeSetAttribute(settings,'Save','false') xmlSaveFile(accRoot) xmlUnloadFile(accRoot) end end showCursor(true) end addEventHandler('onClientResourceStart', resourceRoot,)
  15. فاّرس

    help

    Where is the key of window?
  16. يعطيكمَ آلف عآفيهه,, ما قصرتمم,,
  17. طيب و الاند مافي احد يشرح لي متى تجي مرتين ولا ثلاث...
  18. متى تجي player و متى تجي source
  19. والى متى يعتمد على البرنامج؟ +1 + احنا نبي نتعلم المفاهيم الاسآسية عشآن نتعلم نبرمج... يعني لو عندك بيت ما تعرف تبنى الاركان -الزوايا- ما راح تكمل... لان البيت بيطيح على رآسك عشان كذآ ابي المفاهيم الاسآسية مثل player بعض المرات اشوفها بدل root او source...
  20. ^ لآ في اكواد تنهي العملية ومافيها end) تلقى فيها end ) + في يجي اكثر من اند !؟ end end end ) كيف اعرف ان الكود يحتاج اند وحده ولا ثنتين.!؟
  21. فاّرس

    end)

    السلام عليكم ورحمة الله وبركاته,, ابي اعرف متى تجي end مرتين او ثلاث ومتى يجي معها false ومتى يجي معها قوس end)
×
×
  • Create New...