Ahmed Ly Posted March 11, 2019 Share Posted March 11, 2019 سلام عليكم يوم اقدام لكم مود عباره انها تقدر تشغل مودات عن طريق برنامج مميزات مو: 1- تقدر توقف لوق و تشغله عن طريق ملف اسمه config.ini لو كتبت true بيشتغل لوق لو false العكس 2-تقدر تشغل و توقف مودات من برنامج 3- تقدر تشوف لوق من ملف log.log function getinfos () local open2 = fileOpen("config.ini") texts = fileRead(open2,100) fileClose(open2) text = string.sub(""..texts.."", 7, 10) return text end function typeinlog (str) tr = getinfos () if tr == "true" then local open = fileOpen("log.log") fileRead(open,1500000) fileWrite(open,"["..os.date("%H:%M:%S").."]:"..str.."\n") fileFlush(open) fileClose(open) else outputServerLog("Note:log.log dont work you must set true in file config.ini") end end function getnames() names = "" local Table = getResources() for k, v in ipairs(Table) do if v then names = names .. " " .. getResourceName(v) .. " " else names = "false" end end return names end function start (res) local name = getResourceFromName(res) if name then startResource(name) outputChatBox("[Resource Manager] Has Been Start Resource "..getResourceName(name).."",root,0,255,0,true) typeinlog("Has Been Start Resource "..getResourceName(name).."") return "Has Been Start Resource "..getResourceName(name).."" else return "there is error" end end function stop (ress) local name = getResourceFromName(ress) if name then stopResource(name) outputChatBox("[Resource Manager] Has Been Stop Resource "..getResourceName(name).."",root,0,255,0,true) return "Has Been Stop Resource "..getResourceName(name).."" else return "there is error" end end C# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using MTA_SDK; namespace Resource { public partial class Form1 : Form { public Form1() { InitializeComponent(); MTA server = new MTA("ip",port, "username", "passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs(); string returned = server.CallFunction("resourcemmf", "getnames", luaArgs); foreach (string ppr in returned.ToString().Split(' ')) { if (ppr != "") listBox1.Items.Add(ppr); } } private void button1_Click(object sender, EventArgs e) { MTA server = new MTA("ip",port, "username", "passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs("" + listBox1.Text + ""); string returned = server.CallFunction("resourcemmf", "start", luaArgs); MessageBox.Show("" + returned + ""); } private void button2_Click(object sender, EventArgs e) { MTA server = new MTA("ip",port, "username", "passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs("" + listBox1.Text + ""); string returned = server.CallFunction("resourcemmf", "stop", luaArgs); MessageBox.Show("" + returned + ""); } } } رابط تحميل : https://up.top4top.net/downloadf-1165vrya31-zip.html صوره ل برنامج ان شاء الله عجبتكم الفكره : ) 1 1 Link to comment
ALBANDER. Posted March 11, 2019 Share Posted March 11, 2019 ي ليت تطرح مودك حق اختراق الجدار هنا بالمنتدى 1 Link to comment
Ahmed Ly Posted March 12, 2019 Author Share Posted March 12, 2019 Just now, ALBANDER. said: ي ليت تطرح مودك حق اختراق الجدار هنا بالمنتدى https://forum.multitheftauto.com/topic/88478-مود-اختراق-الجدران/?tab=comments#comment-806452 Link to comment
!# H E R O ,_ Posted March 12, 2019 Share Posted March 12, 2019 مود جميل واصل .. , استممر 1 Link to comment
Ahmed Ly Posted March 12, 2019 Author Share Posted March 12, 2019 8 minutes ago, #Bad_Boy, said: مود جميل واصل .. , استممر تسلم 1 Link to comment
Ahmed Ly Posted March 12, 2019 Author Share Posted March 12, 2019 لو حد حب اضيف شي في مود ي ريت يقول Link to comment
Guest Posted March 12, 2019 Share Posted March 12, 2019 =") كـ شغلك إبداع . واصصل ولا توقف @Ahmed Ly Link to comment
Master_MTA Posted March 12, 2019 Share Posted March 12, 2019 6 hours ago, Ahmed Ly said: لو حد حب اضيف شي في مود ي ريت يقول ممتاز صراحة وانتظرني قريبا داخل بال c# عشان علي بروجيكت لازم اسلمه بالجامعه c# +_+ 1 Link to comment
KillerX Posted March 12, 2019 Share Posted March 12, 2019 (edited) شغل ممتاز 10 / 10 بس ما تحس ان ممكن يجي اي حد يطرش حقوقة وينسب المود له ؟؟ 17 minutes ago, Master_MTA said: ممتاز صراحة وانتظرني قريبا داخل بال c# عشان علي بروجيكت لازم اسلمه بالجامعه c# +_+ بالتوفيق لك يا صاحبي Edited March 12, 2019 by KillerX 2 Link to comment
Ahmed Ly Posted March 12, 2019 Author Share Posted March 12, 2019 43 minutes ago, Kareem Amer said: بالتوفيق مود جميل مشكور 1 hour ago, KillerX said: بس ما تحس ان ممكن يجي اي حد يطرش حقوقة وينسب المود له ؟؟ عادي مافيه شي في نهايه لعبه يعني 1 hour ago, Master_MTA said: ممتاز صراحة وانتظرني قريبا داخل بال c# عشان علي بروجيكت لازم اسلمه بالجامعه c# +_+ مشكور و موفق ان شاء لله 1 hour ago, DABL said: =") كـ شغلك إبداع . واصصل ولا توقف @Ahmed Ly تسلم و شكرا لك 1 Link to comment
Guest Posted May 26, 2019 Share Posted May 26, 2019 رااائـع جـدااً ... لـكن ي ريت لو نسقت لـوحة حقت اللتشـغيل والإطفـاء ..... ع العـموم شـغل راائـع بـ توفـيق Link to comment
+Source|> Posted May 26, 2019 Share Posted May 26, 2019 مود جميل جدا لكن لو تضيف زر للكلمة حقت اف ٨ refresh و اقدر اتكلم وانا خارج السيرفر اقدر اصك باند وميوت بتصير لوحه جبااره وبالتوفيق 1 Link to comment
N3xT Posted May 26, 2019 Share Posted May 26, 2019 3 hours ago, +Source|> said: مود جميل جدا لكن لو تضيف زر للكلمة حقت اف ٨ refresh و اقدر اتكلم وانا خارج السيرفر اقدر اصك باند وميوت بتصير لوحه جبااره وبالتوفيق https://forum.multitheftauto.com/topic/105237-mini-admin/ Link to comment
+Source|> Posted May 26, 2019 Share Posted May 26, 2019 18 minutes ago, N3xT said: https://forum.multitheftauto.com/topic/105237-mini-admin/ المشكله مو عارف اشغلها Link to comment
N3xT Posted May 26, 2019 Share Posted May 26, 2019 13 minutes ago, +Source|> said: المشكله مو عارف اشغلها كل شيء مشروح بالمقطع, وراجع ردود الموضوع لأن فيه ناس واجهوا مشاكل ممكن تكون مثل مشكلتك 2 Link to comment
Ahmed Ly Posted April 4, 2020 Author Share Posted April 4, 2020 (edited) UPDATE تمت اضافة فكشن restart و ريرفش وتم اصلاح بعض تحقيقات function getinfos () local open2 = fileOpen("config.ini") texts = fileRead(open2,100) fileClose(open2) text = string.sub(""..texts.."", 7, 10) return text end function typeinlog (str) tr = getinfos () if tr == "true" then local open = fileOpen("log.log") fileRead(open,1500000) fileWrite(open,"["..os.date("%H:%M:%S").."]:"..str.."\n") fileFlush(open) fileClose(open) else outputServerLog("Note:log.log dont work you must set true in file config.ini") end end function getnames() names = "" local Table = getResources() for k, v in ipairs(Table) do if v then names = names .. " " .. getResourceName(v) .. " " else names = "false" end end return names end function start (res) local name = getResourceFromName(res) if name then if getResourceState (name) == "stopping" then startResource(name) outputChatBox("[Resource Manager] Has Been Start Resource "..getResourceName(name).."",root,0,255,0,true) typeinlog("Has Been Start Resource "..getResourceName(name).."") return "Has Been Start Resource "..getResourceName(name).."" else return "that is running aready" end end end function stop (ress) local name = getResourceFromName(ress) if name then if getResourceState (name) == "running" then stopResource(name) outputChatBox("[Resource Manager] Has Been Stop Resource "..getResourceName(name).."",root,0,255,0,true) typeinlog("Has Been Start Resource "..getResourceName(name).."") return "Has Been Stop Resource "..getResourceName(name).."" else return "that resource dont running to stoping it" end end end function restart (sss) local nameresource = getResourceFromName(sss) if nameresource then if getResourceState (nameresource) == "running" then restartResource(nameresource) outputChatBox("[Resource Manager] Has Been Stop Resource "..getResourceName(nameresource).."",root,0,255,0,true) typeinlog("Has Been Start Resource "..getResourceName(nameresource).."") return "Has Been Restart Resource" else return "that resource dont running" end end end مثال ع C# using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using MTA_SDK; namespace WindowsFormsApp2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); MTA server = new MTA("localhost",22005, "username","passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs(); string returned = server.CallFunction("cshare","getnames", luaArgs); foreach (string ppr in returned.ToString().Split(' ')) { if (ppr != "") listBox1.Items.Add(ppr); } } private void button1_Click(object sender, EventArgs e) { MTA server = new MTA("localhost",22005, "username", "passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs("" + listBox1.Text + ""); string returned = server.CallFunction("cshare", "restart", luaArgs); MessageBox.Show("" + returned + ""); } private void button2_Click(object sender, EventArgs e) { listBox1.Items.Clear(); MTA server = new MTA("localhost", 22005, "username", "passworld"); MTA_LuaArgs luaArgs = new MTA_LuaArgs(); string returned = server.CallFunction("cshare", "getnames", luaArgs); foreach (string ppr in returned.ToString().Split(' ')) { if (ppr != "") listBox1.Items.Add(ppr); } } } } config.ini log = true شرح خاص ب C# SDK Edited April 4, 2020 by Ahmed Ly Link to comment
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