Jump to content

Sora

Members
  • Posts

    698
  • Joined

  • Last visited

Everything posted by Sora

  1. ادري انه تمت الافاده بس حبيت اقولك على شيء getLocalPlayer ( ) مايحتاج تستخدم هذا الفنكشن في اضافة الامر تقدر تسوي كذا addCommandHandler("البداية", function (playerWhoWroteTheCommand) setElementPosition ( playerWhoWroteTheCommand, 1536.7, 2773.6, 10.7 ) end ) addCommandHandler("البداية", function (source) setElementPosition ( source, 1536.7, 2773.6, 10.7 ) end ) addCommandHandler("البداية", function (kingabady) setElementPosition ( kingabady, 1536.7, 2773.6, 10.7 ) end ) هذي امثله بس عشان اوضح لك الموضوع والسلام عليكم ^^
  2. بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاته كم من مره قمت بتشغيل السكربتات بالسيرفر واحداً تلو الاخر .. لابد ان الامر متعب ويتكرر كل مره تقوم فيها باعادة تشغيل خادمك تم تصميم هذا السكربت ليقوم بتشغيل السكربتات التي تقوم بتشغيلها تلقائياً عندما يشتغل كيف يعمل السكربت ؟ يقوم السكربت بحفظ اسامي السكربتات التي تقوم بتشغيلها , ثم يقوم بتشغيلها تلقائياً عندما تقوم بتشغيله مثلاً , قمت بتشغيل عدد من السكربتات وبعد ذلك اعدت تشغيل الخادم الخاص بك , لايجب عليك تشغليها واحداً تلو الاخر فقط قم بتشغيل السكربت هذا وهو يقوم بالباقي مالذي يجب علي فعله ليعمل السكربت بشكل صحيح ؟ (يجب عليك اضافة السكربت لمجموعة الادارة (قروب ادمن اذهب إلى اللعبه وافتح لوحة الادارة (الادمن) ثم إلى التبويب Resources وضع هذه الشفره في الفراغ كما في الصورة ادناه aclGroupAddObject (aclGetGroup("Admin"), "resource.resourcestarter") كيف اجعل السكربت يعمل مع بدء تشغيل الخادم ( السيرفر ) ؟ اضف هذا السطر ادناه إلى ملف mtaserver.conf الموجود في المسار التالي /mods/deathmatch/ <resource src="resourcestarter" startup="1" protected="1" /> هل احتاج لحذف السكربت الذي لا ارغب به من قائمة بدء التشغيل التلقائي ؟ لا , فعندما تقوم بايقاف تشغيل السكربت الذي لاترغب به , يقوم هذا السكربت بحذفه من القائمة تمت اضافه خواص جديده واصلاح بق تكرار الاضافه نافذه للتحكم .. اضافه سكربتات حذف سكربتات من القائمه اعدادات المجموعة المسموح لها بفتح القائمه allowedGroup و تفعيل الحذف التلقائي او تعطيله autoRemover يتم فتح القائمه باستخدام الامر /rss لتحميل السكربت اضغط هنا ملاحظة : يجب عليك فك ضغط السكربت قبل استخدامه * انا انصح بإطفاء خاصية الحذف التلقائي وحماية السكربت من ملف اعدادات السيرفر mtaserver.conf src="resourcestarter" startup="1" protected="1" />
  3. i want to remove the version 1.2.0 of this resource ( not the whole resource only the version 1.2.0 ) https://community.multitheftauto.com/ind ... ls&id=6059 DONE
  4. java.lang.UnsupportedClassVersionError: com/mtasa/MTAException : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Exception in thread "main"
  5. do you mean like that? ^^ local sWidth,sHeight = guiGetScreenSize() dxDrawText("Sora :",0.13*sWidth,0.167*sHeight,0.55*sWidth,0.182*sHeight,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) dxDrawText(message,0.58*sWidth,0.168*sHeight,0.799*sWidth,0.224*sHeight,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false)
  6. thanks for replay ^^ how do i get offsets , and how to set them on the same place up there ^
  7. hi .. i've drew a text with guieditor and my screen resolution was 800x600x32 dxDrawText("Sora :",13.0,167.0,55.0,182.0,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) dxDrawText(message,58.0,168.0,799.0,224.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) ( works fine ) and i found out that the text place changes on another screen resolutions i wanted the script to be shown in the same place on all screen resolutions so i used this function guiGetScreenSize() i've followed the tutorial step by step and the results was this local sWidth,sHeight = guiGetScreenSize() dxDrawText("Sora :",13.0/800*sWidth,167.0/600*sHeight,55.0/800*sWidth,182.0/600*sHeight,tocolor(255,0,0,255),1.0,"default-bold","left","top",false,false,false) dxDrawText(message,58.0/800*sWidth,168.0/600*sHeight,799.0/800*sWidth,224.0/600*sHeight,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) ( doesn't work ) but the text didn't show up on the screen Solved Go to solution
  8. Table = { "MR.S3D", '3ɑsн8 ɑʟsнɾq', 'ρяєsτɪɢє', "TaLaL", 'jafar', 'SoRa', '7', '8', '9', '10', '11', '12', '13', '14', }
  9. سوي ملف سميه gserverip.xml وحط فيه هذا الكود مع تعديل ا لايبي > >172.0.0.1>> function getServerIP() ip = xmlNodeGetValue (xmlFindChild( xmlLoadFile ( "gserverip.xml" ), "serverip", 0 )) return ip end واستخدم الفنكشن فوق عشان تسحب الايبي من ملف الاكسمل ملاحظة تقدر تغير الايبي بدون ماتسوي رستارت للسكربت
  10. thanks but i meant @reboot when system starts , the mta server start auto
  11. marker = createMarker ( 226.4, 1873.5, 15.4, "cylinder", 5, 0, 0, 0 ) isDoorClosed = true -- وضع قيمة الباب مغلق x1,y1,z1 = 226.4, 1873.5, 15.4 x2,y2,z2 = 226.4, 1871.5, 15.4 chinaTgate = createObject ( 2930, x1,y1,z1) function op() moveObject ( chinaTgate, 2000, x2,y2,z2) end function cl() moveObject ( chinaTgate, 800, x1,y1,z1 ) end function checkAdmin(player) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( "King-abady" ) ) then if isDoorClosed == true then -- اذا كان الباب مغلق , يفتحه op() isDoorClosed = false -- يغير قيمة الباب إلى مفتوح بعد فتحه else cl() -- يغلق الباب اذا كان العكس , مفتوح end end end function onStart ( ) for i,v in ipairs(getElementsByType( "player" )) do bindKey(v,"X","down",checkAdmin) end end addEventHandler ( "onResourceStart", getResourceRootElement(), onStart ) function onJoin() bindKey(source,"X","down",checkAdmin) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin) addEventHandler("onMarkerHit", marker, -- عند لمس الماركر يفتح الباب function (element) if getElementType(element) == "player" then -- يتاكد ماإذا كان ا لشيء الذي لمس ا لماركر لاعب player = element checkAdmin(player) end end ) addEventHandler("onMarkerLeave", marker, -- عند الخروج من الماركر يغلق الباب function (player) checkAdmin(player) end ) لم يتم التجريب
  12. sorry but , from your source how could i use @reboot i mean after i wrote crontab -e it's let me edit the file , then i should go under the line # right? and then write like this @reboot /home/startup.sh but how to save the file from putty ? and the startup.sh file is like that is it okay ? ./home/sora/mta-server
  13. setTimer(restartResource,300000,0,getThisResource())
×
×
  • Create New...