Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 24/03/17 in all areas

  1. هلا والله بالعيال خلينا اليوم نبدأ بشرح نبذه سريعة عن البرنامج الملفات الأساسية 1- هذا الملف خاص بالتعديل على التصاميم كتغيير حجم الزر او اللون والكثير 2- هنا تكتب أوامر البرمجة ك if - for - array - while -variables - etc... 3- هذا الملف عن نقطة بدء البرنامج واشياء كثيره لكن يستخدم للحمايه أكثر شيء 4- هنا ملفات البرمجية التي لديك 5- مجلد الريسورس وهو المسؤؤل التصاميم والملفات بشكل عام لكن يجب ان تنتبه عند انشاءك ملف او وضع صورة يجب ان يكون لا يوجد مسافة او حروف كبيرة في هذا المجلد والا لن يعمل لديك 6- هذا المجلد تضع فيه الصور 7- هنا ملفات xml 8- هنا ايقونه التطبيق يجب ان تضع 5 صور بمقاسات مختلفه لأن شاشات الهواتف تختلف في الحجم 9- هذا الملف تضع فيه الالوان والترجمه واشياء كثيره جدا الأدوات 1- هنا الادوات التي تريد رسمها كالزر او راديو او شيك بوكس او ايديت تكست هناك الكثير من الادوات 2- هنا الادوات التي موجوده لديك في الشاشة 3- هذه اعدادات الاداه كتغيير المارجن او الالوان او الحجم حسب كل اداه او يمكنك التعديل من ملف xml 4- الهاتف يكون بالطول او العرض 5- نوع المحاكي الافتراضي 6- الzoom طبعا البرنامج عملاق وصعب انه اشرح كل شي لكن راح تتعلم شيئا فشيئا مع الوقت الأن خلينا نبدأ طريقة برمجة زر عند الضغط عليه يكتب لك مثلا جافا في التكست اول شي نحتاج نسحب الزر الى الشاشه وأيضا نسحب أداه اسمها textview ثم نذهب لمجلد الxml للتعديل عليه <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:text="" android:textSize="30dp" android:layout_width="170dp" android:padding="10dp" android:layout_marginTop="10dp" android:layout_height="wrap_content" android:id="@+id/textView" /> <Button android:text="Button" android:layout_width="50dp" android:layout_height="50dp" android:id="@+id/button" android:layout_weight="0.49" /> </LinearLayout> نريد اول شي نضع للزر أسم add مثلا android:text="add" ثم نضع له أسمه البرمجي اي الاي دي حتى نستطيع التعامل معه android:id="@+id/button" نتعامل مع التكست كما تعاملنا مع الزر الأن نريد عند الضغط على الزر يضيف أسم معين للتكست هناك طريقتين عند الضغط لكن حاليا سنتعلم الطريقه الأسهل يجب أن نضيف هذا للزر android:onClick="butc" الأسم بين "" ضعه كما تريد لكن ما يصير في تشابه سيصبح الكود هكذا <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:text="" android:textSize="30dp" android:layout_width="170dp" android:padding="10dp" android:layout_marginTop="10dp" android:layout_height="wrap_content" android:id="@+id/textView" /> <Button android:text="Button" android:layout_width="50dp" android:layout_height="50dp" android:id="@+id/button" android:onClick="butc" android:layout_weight="0.49" /> </LinearLayout> الأن سوف نكتب الأوامر البرمجية في مجلد الجافا هذا هو مجلد الجافا قبل ان نكتب فيه شيء package com.example.java.customlv; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylayout); } } طبعا بحب اذكر نقطه انه يجب ان تكون تعلمت اساسيات الجافا من الروابط التي وضعتها في الموضوع السابق الان نريد اول شي ان نعرف الادوات في ملف الجافا حتى نستطيع ان نتعامل معها هكذا package com.example.java.customlv; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; public class MainActivity extends AppCompatActivity { TextView tx1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylayout); tx1 = (TextView)findViewById(R.id.textView); } } لأحظ هنا tx1 = (TextView)findViewById(R.id.textView); هنا نضع متغير وبداخله يقوم بالبحث عن الاي دي حق التكست الأن نريد عند الضغط على الزر يطبع مثلا java سيصبح الكود هكذا package com.example.java.customlv; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.TextView; public class MainActivity extends AppCompatActivity { TextView tx1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylayout); tx1 = (TextView)findViewById(R.id.textView); } public void btnc(View v) { tx1.setText("java"); } } الأن عند تشغيل البرنامج والضغط على الزر سيطبع لك النص أي سؤال أو مشكله أطرحه هنا او قم بعمل موضوع جديد وعمل أشاره ويفضل ان يكون التاج java -> android -> android-studio وبحاول اطور الشرح مع الوقت بأذن الله + سأطرح روابط مشاريع التي نتعلمها كل فتره للتعلم منها ان شاء الله هذا يعتبر اول شرح اتمنى انه يعجبكم
    2 points
  2. S تدري لما تضغط الرمز تصير تكتب هيك حسابي غير سليم لاااااااااااااااااا ض بالتوفيق
    2 points
  3. 2 points
  4. -Liitle intro - The Division takes place in mid-crisis San Andreas, an open world with destructive environments that are free for players to explore. The player's mission is to restore order by investigating the source of a virus. -Server info - Server is under development. Our development team consists of 2 mappers and 2 scripters. Server date of release is going to be somewhere at summer and open beta release at end of the spring. -Gameplay- We dont have any footage of gameplay yet, but I will describe how its going to be like. Basically player will have to choose side of 2 factions. Each faction is going to have their cons and pluses. Player will have level system, to level up player will have to kill another faction players to gain xp, or particitape in various events. Whats up with level system? With higher level player will get more access to become stronger (Special suits,Guns,armors,Unlockable areas...) Player also will be abble to create his own group (Unofficial) To create official group, player will have to make his group well known to server and have many players in group. This is not much what I have revealed of gameplay, very much more stuff is comming up. -And this is small trailer- --This topic will be updated often--
    1 point
  5. setTimer( function() local x, y, z = getElementPosition(localPlayer) local models = getElementsByType("vehicle") if #models ~= 0 then for i, v in pairs(models) do if getElementModel(v) == 525 then --525 is just a random number, you can just add whatever you want, later i will make this into a table local ex, ey, ez = getElementPosition(v) local elementdistance = getDistanceBetweenPoints2D ( x, y, ex, ey ) if elementdistance <= 350 then outputDebugString("Download File") end end end end end, 500, 0) This will make the Client side check for any elements within this area and if the model id is the same.If both are true then it will trigger the download
    1 point
  6. Client side, dont even try this on server side. setTimer(function() for i, k in ipairs(getElementsByType("vehicle", getRootElement(), true)) do if downloadFile(getElementModel(k) .. ".txd") then outputChatBox("Updated a file. (MODEL ID: " .. getElementModel(k) .. ")") end end for i, k in ipairs(getElementsByType("object", getRootElement(), true)) do if downloadFile(getElementModel(k) .. ".txd") then outputChatBox("Updated a file. (MODEL ID: " .. getElementModel(k) .. ")") end end end, 5000, 0) Should work, not tested tho.
    1 point
  7. Fetchremote should get the data of it.use that with a callback to the download https://wiki.multitheftauto.com/wiki/FetchRemote
    1 point
  8. function getNewMission () local buttonTable = { {"Button1"}, } if ( buttonTable ) and ( #buttonTable ~= 0 ) then for _,v in ipairs (buttonTable) guiSetEnabled(v[1], false) end else return false end local mission = math.random(buttonTable) guiSetEnabled(mission, true) return mission end setTimer(getNewMisson, 10000, 0)
    1 point
  9. ايهه اذا انت ماتعرف وش هو السي بق اختصر لك الشرح الحين اول ماتطلق بالديقل اول طلقة بعدين تستنى نص ثانية وتطلق الطلق الثانية لكن السي بق يختلف السي بق تقدر به تطلق 5 طلقات بسرعة وابحث عنه باليوتيوب للاستزادة
    1 point
  10. Exactly! thank you oh my god lol -,-
    1 point
  11. Так запускайте свои ресурсы после запуска ресурсов редактора
    1 point
  12. نعم اخوي حسابك سليم ، وحياك الله بالخدمة
    1 point
  13. تصدق ما خطر على بالي ههههههههه https://developer.android.com/studio/index.html
    1 point
  14. yaaayayayayay i just changed table format in server side thx thx thx so much really you helped me
    1 point
  15. آخوي حط صور للموتر طيب , عشان الناس مو تقعد تحمل وماتشوف شكله تمام
    1 point
  16. Because what you're doing is, for every row loop through all the rows in the gridlist and set the table value to each of them. what you want to do is do it all in a single loop and maybe redo your table. Maybe something like this: local vehs = { {model = 411, mod = 4, price = 12000}, -- 1 {model = 411, mod = 4, price = 12000}, -- 2 etc.. } for i, v in pairs (vehs) do local row = guiGridListAddRow ( GUIEditor.gridlist[1], getVehicleNameFromModel(v.model), v.mod, v.price) guiGridListSetItemData ( GUIEditor.gridlist[1], row, 1, v.model) end Also in 1.5.2 or so, they introduced an alternative easier way to set the text of a row for each column, the syntax is like this: int guiGridListAddRow ( element gridList, int/string itemText1, int/string itemText2, ... ) where itemText1 is for column 1 and itemText2 for column 2 and so on.
    1 point
  17. @#!Error.xD حبيبي اتوقع الكل يعرف ان المشاركات مالها فائدة هنا مدري لو تقهرك مشاركاتي وثانيا انت منزل موضوع بالقسم هذا اي شخص عنده شي يقدر يفيد ويستفيد وثالثا نساعدك ببلاش ولاحط مجبور يساعدك ولو بسطر وماني فاضي للمشاكل واخر رد لي
    1 point
  18. في اكثر من مواضيعك تحاول تاخذ الجاهز وتمشي واشوفك تخبص اكواد وتبي الناس تصححها لك تحط كود وتقول صح وش درينا حنا تبي نجرب عنك , انت صاحب الشغله ماحد مجبور يساعدك جرب اكوادك وشوف الدي بق لو فيه اخطاء واذا مافيه وماشتغل كودك حط المشكلة حقتك هنا وماراح يقصروا الشباب , لكن نظام كوبي باست ماراح يعطيك نتيجة
    1 point
×
×
  • Create New...