Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 18/08/18 in all areas

  1. سلام عليكم عطوني رايكم على هالشي , ووش ممكن يخليه يتطور ويصير افضل
    3 points
  2. ،السلام عليكم بالنسبة للتصميم، فأقترح لو تقلل شوي من اللون الأبيض وتضيف ألوان ثانية وبعض الأزرار اشوفها عريضة بزيادة، بس لو تقلل العرض شوي Edits والـ تكون أجمل Sidebar وبالنسبة لبعض الروابط اللي تجي فوق، مثل اللي بصفحة إضافة خدمة، تقدر تخليها كـ .وبس هذي اقتراحاتي، غيره كذا اعطي التصميم 10/8 وبالتوفيق
    2 points
  3. Problem solved thx evrybody vehicle createVehicle ( int model, float x, float y, float z, [ float rx, float ry, float rz ] )
    2 points
  4. تسلم علي الاهداء بالنسبة لي كل الي بالمنتدي يعتبر مبرمج حتي لو ما يعرف و له حافز يتعلم و يحب يتعلم بشكر الي علموني البرمجة و ساعدوني @*RayaN-Alharbi. @#DesTroeyR @Rakan#
    2 points
  5. addCommandHandler has a restricted argument. Setting that to true and adding the permission to the group in the acl will do the thing.
    2 points
  6. He won't learn anything until you stop giving him full codes. @KnucklesSAEG
    2 points
  7. Jesus Christ, why do you even guys help him?
    2 points
  8. بسم الله الرحمن الرحيم سلام عليكم ورحمة الله وبركاته ,, حبيت اطرح شرح executeSQLQuery مفصل وكامل ان شاء الله . لكثرة الاعضاء الغير فاهمين له او الجاهلين له بسم الله نبدأ .. executeSQLQuery = عبارة عن قاعدة في سيرفرك dbConnect = عبارة عن قاعدة متصلة بالخادم او بالملف اولاً بننشئ كود الاتصال لو كنت بتستعمل dbFunctions test_db = dbConnect( "sqlite", "file.db" ) -- عبر ملف test_db = dbConnect( "mysql", "dbname=frank;host=1.2.3.4", "username", "password", "share=1" ) -- عن طريق الاتصال بالخادم .: ) فالنفترض انه عندنا القاعدة بهذا الشكل : { } فاضي صحيح ؟ طيب عشان ننشئ تيبل وندرج فيه المعلومات , بنحتاج نكتب هالكود : local result1 = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS players (name TEXT, money TEXT, health TEXT)" ) local qh = dbQuery( test_db, "CREATE TABLE IF NOT EXISTS players (name TEXT, money TEXT, health TEXT)" ) -- نسوي الأمر local result2 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result1 and result2 ) then print ( "Success to create tables" ) -- نكتب في الديبق نجاح في انشاء الجداول end -- CREATE TABLE IF NOT EXISTS players (name TEXT, money TEXT, health TEXT) -- الترجمة : -- players اصنع جدول اذا ماكان فيه جدول بأسم -- والأعمدة هي : -- name, money, health بيطلع الناتج في القاعدة ~> { players = { } } ^ الجدول حق players فاضي نبي نضيف عليه قيمة مثلا .. local result31 = executeSQLQuery ( "INSERT INTO players(name,money,health) VALUES(?,?,?)", 'wifi','1000','100' ) local qh2 = dbQuery( test_db, "INSERT INTO players(name,money,health) VALUES(?,?,?)", 'wifi','1000','100' ) -- نسوي الأمر local result41 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result31 and result41 ) then print ( "Success to insert values" ) -- نكتب في الديبق نجاح في ادخال القيم end -- INSERT INTO players(name,money,health) VALUES(?,?,?) -- الترجمة : -- أدخال الى player -- والأعمدة هي : -- name, money, health -- والقيم : -- ?,?,? == 'wifi', '1000', '100' ملاحظة مهمة جداً : عند وضع سهم داخل الأمر او اي عملية SQL استبداله بالارقمنت خارج العملية كمثال : ("?,?",'wifi','1000') -- الاستفهام الاول بيستبدل بوايفاي -- والاستفاهم الثاني بيستبدل برقم ألف ("?,'1000'",'wifi') -- الاستفهام الاول بيستبدل بوايفاي ^ أتمنى تكون وضحت : بيطلع الناتج في القاعدة ~> { players = { { name='wifi', money='1000', health='100' } } } لو نبي نضيف قيمة ثانية بأسم نصور مثلاً وجا بروس قال انا الي ابي اصير القيمة وتضاربو وبعدين صار بروس القيمة ونصور راح .. كذا نسوي : local result3 = executeSQLQuery ( "INSERT INTO players(name,money,health) VALUES(?,?,?)", 'BrosS','-1000','10' ) local qh3 = dbQuery( test_db, "INSERT INTO players(name,money,health) VALUES(?,?,?)", 'BrosS','-1000','10' ) -- نسوي الأمر local result4 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result3 and result4 ) then print ( "Success to insert values" ) -- نكتب في الديبق نجاح في ادخال القيم end -- INSERT INTO players(name,money,health) VALUES(?,?,?) -- الترجمة : -- أدخال الى player -- والأعمدة هي : -- name, money, health -- والقيم : -- ?,?,? == 'BrosS', '-1000', '10' بيطلع الناتج في القاعدة ~> { players = { { name='wifi', money='1000', health='100' }, { name='BrosS', money='-1000', health='10' }, } } طيب لو نبي نجيب فلوس واي فاي كيف ؟ بهذي الطريقة : local result5 = executeSQLQuery ( "SELECT money FROM players WHERE name=?", 'wifi' ) local qh4 = dbQuery( test_db, "SELECT money FROM players WHERE name=?", 'wifi' ) -- نسوي الأمر local result6 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result5 and result6 ) then print ( "Success to select values" ) -- نكتب في الديبق نجاح في تحديد القيم print ( result5, result6 ) -- راح يطبع لنا فلوس واي فاي -- Result : -- 1000 end -- SELECT money FROM players WHERE name=? -- الترجمة : -- تحديد عامود money -- من جدول players -- اين القيمة المطابقة في عامود name -- والقيم : -- ? = 'wifi' شكل التحديد في القاعدة ~> -- > = التحديد -- ? = أين -- == = يطابق { >players = { { ?name=='wifi', >money='1000', health='100' }, { name='BrosS', money='-1000', health='10' }, } } -- توضيح اكثر { >players = { -- نحدد التيبل الي نريده { ?name='wifi', >money='1000', health='100' }, -- ? نحدد القيمة الي نريدها< + الي نبحث عنها { name='BrosS', money='-1000', health='10' }, } } مثال اخر لو نبي نجيب هيلث بروس : local result7 = executeSQLQuery ( "SELECT health FROM players WHERE name=?", 'BrosS' ) local qh5 = dbQuery( test_db, "SELECT health FROM players WHERE name=?", 'BrosS' ) -- نسوي الأمر local result8 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result7 and result8 ) then print ( "Success to select values" ) -- نكتب في الديبق نجاح في تحديد القيم print ( result5, result6 ) -- راح يطبع لنا دم بروس -- Result : -- 10 end -- SELECT money FROM players WHERE name=? -- الترجمة : -- تحديد عامود money -- من جدول players -- اين القيمة المطابقة في عامود name -- والقيم : -- ? = 'BrosS' الآن لو نبي نعدل على فلوس واي فاي او هلث بروس شلون ؟ بهذه الطريقة . : local result9 = executeSQLQuery ( "UPDATE players SET health='5' WHERE name=?", 'BrosS' ) local qh6 = dbQuery( test_db, "UPDATE players SET health='5' WHERE name=?", 'BrosS' ) -- نسوي الأمر local result10 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result9 and result10 ) then print ( "Success to edit values" ) -- نكتب نجاح في تعديل القيم end -- UPDATE players SET health='5' WHERE name=? -- الترجمة : -- تحديث جدول player -- تحديد عامود health='القيمة الجديدة' -- اين القيمة المطابقة في عامود name -- والقيم : -- ? = 'BrosS' النتيجة او الطريقة في القاعدة ~> -- > = التحديد -- ? = أين -- ! = تعديل -- == = يطابق { >players = { { name='wifi', money='1000', health='100' }, { ?name=='BrosS', money='-1000', !health='10' }, } } -- Result : { players = { { name='wifi', money='1000', health='100' }, { name='BrosS', money='-1000', health='5' }, } } ثم بروس صار دمه مره قليل وراح بروس المستشفى وعالجه نصور لكن للأسف مات ونبي نحذفه من الجدول شلون ؟ local result11 = executeSQLQuery ( "DELETE FROM players WHERE name=?", 'BrosS' ) local qh7 = dbQuery( test_db, "DELETE FROM players WHERE name=?", 'BrosS' ) -- نسوي الأمر local result12 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result11 and result12 ) then print ( "Success to delete values" ) -- نكتب نجاح في حذف قيمة end -- DELETE FROM players WHERE name=? -- الترجمة : -- حذف من players -- اين القيمة المطابقة في عامود name -- والقيم : -- ? = 'BrosS' النتيجة او الطريقة في القاعدة ~> -- > = التحديد -- ? = أين -- ! = حذف -- == = يطابق { >players = { { name='wifi', money='1000', health='100' }, !{ ?name=='BrosS', money='-1000', health='5' }, } } -- Result : { players = { { name='wifi', money='1000', health='100' }, } } ثم فجأه واي فاي حزن لأن بروس مات وقال بيستقيل , وصار مافي اي قيمة باقية شلون نحذف الجدول ؟ local result7 = executeSQLQuery ( "DROP TABLE players" ) local qh8 = dbQuery( test_db, "DROP TABLE players" ) -- نسوي الأمر local result8 = dbPoll( qh, -1 ) -- ونطلع النتيجة if ( result7 and result8 ) then print ( "Success to drop table" ) -- نكتب نجاح في حذف الجدول end -- DROP TABLE players -- الترجمة : -- حذف جدول players تنبيه مهم : الترجمة ليست حرفية انما بالمعنى فقط او للتوضيح بنسبة لغة البرمجة المشاركون في المسرحية : @!#NssoR_) @#BrosS @iMr.WiFi..! من فضلكم تصفيق حار من اجلهم .. اعتذر اذا اشركت احدكم وماكان وده يشارك .. او العكس " الشرح مقدم على يد : واي فاي الحكمة من القصة لا تسلب حق غيرك لو كان في ابسط او اصغر الاشياء لأن بيجي شخص بيسلب حقك في اسوء او اكبر الاشياء وفي الختام اتمنى الشرح افادكم ولو قليل وتفهمون ان شاء الله وتقولون الله يرحمك ي بروس ?
    1 point
  9. @!#NssoR_) اتمنى انك تتصرف معه , اللي بيني وبينه مايسمحله يحط رد ويحط رايه بموضوعي
    1 point
  10. ما اعتقد كان يبي رأي شخص مثلك ما نحتاج منافقين .. خلي رايك لك وشكراً
    1 point
  11. اضافه الى ذالكك , اعتقد اسم المود لو كان فيه ارقام ماراح يركب معاه , وبيطلع له نفس الخطاء لانه مره صارت لي #
    1 point
  12. العفو , اجمعين ان شاء الله
    1 point
  13. كأنك تبي ترقي شخص بس حط بقروب الكونسل او القروب الي فيه الخصائص الكاملة وحط resource.اسم المود او لو تبي تحط جميع السكربتات لو كنت متأكد انها غير ملغمة resource.* بمجرد انك حطيت هذي اي سكربت يتطلب خصائص من الادمن راح تجيه تلقائي
    1 point
  14. Admin - تروح لها في الاسل وبعدين تضيف هاذا resource. اسم المود هنآ #
    1 point
  15. Show us your full code and tests first, assuming (or the suggestion by pirulax) it's a bug is kinda hurried.
    1 point
  16. @KhaledAlamri والله مبدعين كفو استمروا وبالتوفيق لكم : )
    1 point
  17. ابشر ههههه جهزي نفسك بس معزوم يرجل من غير ما تقول حياك الله
    1 point
  18. if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Polis")) or isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("someGroup")) then
    1 point
  19. try this addEventHandler("onClientElementStreamIn", getRootElement(), function() if getElementType(source) == "vehicle" then #getVehicleOccupants(source) == 0 then setElementFrozen(source,true) end end end) addEventHandler("onClientVehicleEnter", getRootElement(),function() if #getVehicleOccupants(source) == 1 then -- not sure right here (check if car empty) setElementFrozen(source,false) end end) @overlocus
    1 point
  20. this guy replaced a variable vehicles to use it below. If i write like this setElementPosition(vehicles[i], 0, 0, 10) -- position setElementRotation(vehicles[i], 90, 180, 0, "ZYX") -- orientation/rotation it won't affect the result at all
    1 point
  21. Set the vehicle variable to the vehicles tables' i index, which should be a number. It can be done easier. for i, vehicle in ipairs(getElementsByType("vehicle")) do setElementPosition(vehicle, 0, 0, 10) -- position setElementRotation(vehicle, 90, 180, 0, "ZYX") -- orientation/rotation end
    1 point
  22. I GOT all what you wrote but this ? local vehicle = vehicles , can you explaine it .Thanks
    1 point
  23. local ValidIDs = { -- Create a table with valid paintjob ids [1]=true, [2]=true, [3]=true, [4]=true, [5]=true, [6]=true, [7]=true, [8]=true, [9]=true } function addPaintjob(player,_,paintjobID) local acc = getAccountName( getPlayerAccount( player ) ) -- get player account name if not isObjectInACLGroup( "user."..acc, aclGetGroup( "VIP" ) ) then return end -- chekck if player is in ACL 'VIP' and if not then return if tonumber(paintjobID) and ValidIDs[paintjobID] then -- Check if the ID is Valid if isPedInVehicle ( player ) then -- Check if the player is in a vehicle triggerClientEvent( root, "addPJ", resourceRoot, paintjobID, player ) -- trigger the client event setting the player who used the command as the source else outputChatBox( "You are not in a vehicle.", player, 255,100,100 ) end else outputChatBox( "Invalid Paintjob ID.", player, 255,100,100 ) end end addCommandHandler ("addpaintjob",addPaintjob) This is serverside. Also you should store the shaders and textures within a table and delete them when they are no longer needed because i can drain your memory after constant use.
    1 point
  24. @overlocus For example this. setElementPosition(vehicle, 0, 0, 10) -- position setElementRotation(vehicle, 90, 180, 0, "ZYX") -- orientation/rotation Just play with it, until you understand it. (best way of learning) Quick test code: (client / server) do local vehicles = getElementsByType("vehicle") for i=1, #vehicles do local vehicle = vehicles[i] setElementPosition(vehicle, 0, 0, 10) -- position setElementRotation(vehicle, 90, 180, 0, "ZYX") -- orientation/rotation end end Wiki: https://wiki.multitheftauto.com/wiki/SetElementPosition https://wiki.multitheftauto.com/wiki/SetElementRotation
    1 point
  25. صدقت ألرجال غلط على الكثير من الناس هنا . ولو احد قاله الكلمه ذي م يرضآها . لذا ي اخ @MR_Mahmoud تسوي واجبك وتعتذر .
    1 point
  26. 1 point
  27. كلامك صحيح بس جرب الكود هذا وشوف القيمة والفرق local testMarker = createMarker ( 2492 , -1666 , 12.5 , "cylinder" , 3 , 255 , 255 , 255 , 120 ) local testPed = createPed ( 0 , 2493.9 , -1666 , 13 ) setTimer(function() outputChatBox ( tostring ( isElementWithinColShape ( testPed , getElementColShape ( testMarker ) ) ) ) end,700,1)
    1 point
  28. الاكواد الي فوق لو تستعملها كلينت راح يطلع زي ما انا قلت ولو تستعملها سيرفر راح يرجع لك قيم خاطئة يعني جرب استخدم هذا الكود سيرفر سايد local testMarker = createMarker ( 2492 , -1666 , 12.5 , "cylinder" , 3 , 255 , 255 , 255 , 120 ) local testPed = createPed ( 0 , 2492 , -1666 , 13 ) outputChatBox ( tostring ( isElementWithinColShape ( testPed , getElementColShape ( testMarker ) ) ) ) مع ان البيد داخل الماركر false راح يطلع وجرب استخدم هذا الكود سيرفر سايد local testMarker = createMarker ( 2492 , -1666 , 12.5 , "cylinder" , 3 , 255 , 255 , 255 , 120 ) local testPed = createPed ( 0 , 2492 , -1666 , 13 ) outputChatBox ( tostring ( #getElementsWithinColShape ( getElementColShape ( testMarker ) , "ped" ) ) ) راح يطلع لك 0 مع ان البيد داخل الماركر ولاهنت على المرور ايضا
    1 point
  29. كلامك خاطئ المبرمج يقدر يستفيد منها كـ دخل مادي آخر وكلمة الغبي أسلوب غير جيد .
    1 point
  30. how direction ? (xyz, rx,ry,rz can help u)
    1 point
  31. وظيفتك صحيحة، بس تقدر تخليها مختصرة وأكثر دقة Marker مرتبط معها ومنها الـ ColShape إن بعض العناصر عندها Wiki حسب كلام الـ ،getElementColShape بوظيفة بهذي الوظيفة Marker المرتبط مع الـ ColShape وبكذا تقدر تجيب هذا الـ أو لا Marker عشان تتأكد إن العنصر موجود داخله أو لا، وبالتالي تعرف إنه موجود بالـ isElementWithinColShape بعدها تستخدم .(سواء كانت من نوع محدد أم لا) ColShape عشان تجيب كل العناصر الموجودة في الـ getElementsWithinColShape أو تستعمل
    1 point
  32. والله ي اخوان اني مره مره مره اكرهكم
    1 point
  33. local timerr = {} function convertMilliseconds ( timeMs ) local minutes = math.floor( timeMs / 60000 ) local timeMs = timeMs - minutes * 60000; local seconds = math.floor( timeMs / 1000 ) return string.format( '%02d:%02d', minutes, seconds ); end addCommandHandler ("the", function ( player ) if isTimer ( timerr[player] ) then outputChatBox( "# You Have To Wait [ ".. convertMilliseconds ( getTimerDetails( timerr[player] ) ) .." ] !", player, 255, 0, 0 ) return end outputChatBox("done",player,255,0,0) timerr[player] = setTimer( function () end, 300000, 1 ) end )
    1 point
  34. What's your problem? @IIYAMA wants you to learn, not to beg everytime for scripts. You need to understand first how lua works and then you can go with the MTA:SA functions, events.
    1 point
  35. وعليكم السلام مبروك الافتتاح و ان شاء الله تكبر و بالتوفيق
    1 point
  36. حسبي الله ونعم الوكيل يخربيتك : |
    1 point
  37. المبرمج مايحفظ المبرمج يفهم صحح كلامك
    1 point
  38. Em relação ao botão você coloca as coordenadas do seu botão aqui: buttonPro = guiCreateButton (x/2, y/2, 80, 25, "Proteção", false) -- Botão de exemplo. Sobre essa sua dúvida: ' ou arquivo server ' R: Você não vai usar nada relacionado ao 'pro' no server-side, apenas no client-side usando setElementData E essa função você remove do seu painel: função Pro (_, estado) , se Painel == true, em seguida, se o estado == "para baixo", em seguida, se isCursorOnElement (screenW * 0,5586, screenH * 0,5716, 200, 49), em seguida, triggerServerEvent ( "pro", localPlayer) end end end end AddEventHandler ("onClientClick", root, Pro) E coloca no client-side a função que o @Lord Henry citou acima ! OBS: Percebi que tem um triggerServerEvent puxando do lado client para o lado server, você deve remover a função que esta no client/server e adicionar somente a função que o Lord citou , se eu estiver falando algo errado, me corrija por favor !
    1 point
  39. Positions = { {1941,197.7,2352,25.9,0,0,0,1, true}, {1943,412.20001,2455.1001,15.5,0,0,90,1, false}, {1941,268.5,2396.7,25.5,0,0,0,1, true}, } addEventHandler ("onResourceStart", resourceRoot, function() for i,v in ipairs ( Positions ) do local OB = createObject(unpack(v,1,7)) setElementDoubleSided(OB, v[9]) assignLOD(OB,v[8]) end end ) function assignLOD(element,Scale) local lod = createObject(getElementModel(element),0, 0 ,0, 0, 0, 0, true) setElementDimension(lod,getElementDimension(element)) setElementPosition(lod, getElementPosition(element)) setElementRotation(lod, getElementRotation(element)) setObjectScale(element, Scale) setObjectScale(lod, Scale) setElementCollisionsEnabled(lod,false) setLowLODElement(element,lod) return lod end
    1 point
  40. função Pro (_, estado) , se Painel == true, em seguida, se o estado == "para baixo", em seguida, se isCursorOnElement (screenW * 0,5586, screenH * 0,5716, 200, 49), em seguida, triggerServerEvent ( "pro", localPlayer) end end end end AddEventHandler ("onClientClick", root, Pro) Use a função do fórum para postar códigos em lua, assim fica muito feio e difícil de entender, mas enfim eu testei o exemplo do Lord e funcionou, você pode usar o que ele fez acima como base e adicionar no seu painel. OBS: Não entendi por que seu código esta em português !
    1 point
  41. Thank you so much. It works perfectly!
    1 point
×
×
  • Create New...