Jump to content

KaduRo

Members
  • Posts

    157
  • Joined

  • Last visited

Details

  • Gang
    None
  • Occupation
    WoWoWoW
  • Interests
    WoWoWoW

KaduRo's Achievements

Busta

Busta (15/54)

0

Reputation

  1. local xmlFile = xmlLoadFile ("testing.xml") or xmlCreateFile ( "testing.xml", "Players") -- local PlayerData = xmlFindChild (xmlFile, acc, 0) or xmlCreateChild (xmlFile, acc) هذا الكودين استخدمتهم بدون تحقق ؟
  2. ممكن احد يشوف حل للمشكلة , او يعلمني الطريقة شلون ؟
  3. xmlطيب يا شباب تجيني مشكلة , تصيب ملف ال Resource 'ملف السكربت' start was requested (Failed to start resource item testing.xml which is required) وهذا الكود addCommandHandler("1" , function (source) local xmlFile = xmlLoadFile("testing.xml") local PlayerData = xmlFindChild(xmlFile , tostring(getAccountName(getPlayerAccount(source))) , 0) if not PlayerData then PlayerData = xmlCreateChild(xmlFile , tostring(getAccountName(getPlayerAccount(source)))) local PlayerMoney = xmlNodeSetAttribute(PlayerData , "Money" , getPlayerMoney(source)) end PlayerMoney = xmlNodeGetAttribute(PlayerData , "Money") xmlNodeSetAttribute(PlayerData , "Money " , getPlayerMoney(source)) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end ) بعد تشغيل السكربت xmlملف ال "1000" Money="1000" >-- طبعآ هنا غيرت الاكاونت طبعآ اول شيء يكون الا اكس ام ال فارغ , وبعد ما اسوي السكربت يحفظ البيانات , ولما اعيد تشغيل السكربت يخرب السكربت + كيف اقدر امنع تكرار Money ?
  4. عفوآ , تم حل المشكلة , وشرحها فوق !
  5. السلام عليكم محتاج توضيح للxml وكيفية استخدامها , انا حاولت اجرب المثال في الويكي , بس تطلع لي مشكلة @xmlNodeGetAttribute [expected xml-node at argument 1 , got boolean] وطبعآ تظهر لي لكل xmlNodeGetAttribute استخدمته وهذا الكود كما نسخته xml - "528" posX="123.4" posY="456.7" posZ="12.3" rot="90.0" /> lua - server side - الكود القديم (فيها المشكلة ) ء local xml = getResourceConfig("testing.xml") -- غيرت اسم الملف هنا local carmodel = xmlNodeGetAttribute(xml, "model") local carX = xmlNodeGetAttribute(xml, "posX") local carY = xmlNodeGetAttribute(xml, "posY") local carZ = xmlNodeGetAttribute(xml, "posZ") local carA = xmlNodeGetAttribute(xml, "rot") outputChatBox(tostring(carX)) الكود الجديد بعد حلها local xml = xmlLoadFile("testing.xml") -- هنا ابحث عن الملف local Child = xmlFindChild(xml , "car" , 0) -- استخرجت الجزء "سيارة" من الملف local carmodel = xmlNodeGetAttribute(Child, "model") -- واضفته في الملفات local carX = xmlNodeGetAttribute(Child, "posX") local carY = xmlNodeGetAttribute(Child, "posY") local carZ = xmlNodeGetAttribute(Child, "posZ") local carA = xmlNodeGetAttribute(Child, "rot") outputChatBox(tostring(carX)) -- تحربة الملف
  6. Would you please show us how it work (no need to use your code) ?
  7. addCommandHandler parameters :- arg1, arg2, ...: Each word after command name in the original command is passed here in a seperate variable. If there is no value for an argument, its variable will contain nil. You can deal with a variable number of arguments using the vararg expression, as shown in Server Example 2 below. so target is a string that contain "nil" , defined it as a player i guess ?
  8. عفوآ , ما فهمت كلامك اول عدل ومثل ما قال اخ محمد , تأكد انه السكين للاعب = 50
  9. ^? ? ??? انت عطيت للاعب الفلوس + command مالها استخدام , والكود سليم بنظري , فممكن تنزل كود اطول شوي !
  10. طيب إذا ماعليك امر , حاب اطلع اسمين او اكثر مشتركين بحرف مثلآ ممكن الطريقة ؟
  11. السلام عليكم شباب محتاج مساعدة في كود بحث , مثلآ سكربت لأسامي الاسلحة , وكتبت اول حرف من السلاح , يطلع لي اسم السلاح كامل وهذا كود بسيط ومومضبوط بس لتوضيح الطلب table1 = { "Good" , "Bad " , "No" , "Yes" } function Name (v) v = tostring(v) n = string.match(table.concat(table1) , v) return v end outputChatBox(Name("G")) عند كتابة حرف G ابيه يظهر لي كلمة Good في الشات
  12. KaduRo

    طلب

    اخوي حاول تجيب أحداثياتك داخل اللعبة اكتب /getpos وراح يجيب احداثياتك وحطه بالماركر (Z) ولما تبي تحط الارتفاع نقص منه واحد , وراح يكون الماركر على الارض وبالنسبة للون الاخضر 0 255 0
  13. اخوي مشكلتك بسيطة image = guiCreateStaticImage(....) addEventHandler("onClientMouseEnter" , image , function () guiStaticImageLoadImage(..) end) addEventHandler("onClientMouseLeave" , image , function () guiStaticImageLoadImage(..) end) انت اخوي شوف سينتاكس حقت الفنكشات فوق
×
×
  • Create New...