Jump to content

abu5lf

Members
  • Posts

    2,193
  • Joined

  • Last visited

Everything posted by abu5lf

  1. -- this function freezes or unfreezes the specified player's vehicle, if he's in one function toggleFreezeStatus ( thePlayer ) -- get the vehicle element local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) if playerVehicle then -- get the current freeze status local currentFreezeStatus = isElementFrozen ( playerVehicle ) -- get the new freeze status (the opposite of the previous) local newFreezeStatus = not currentFreezeStatus -- set the new freeze status setElementFrozen ( playerVehicle, newFreezeStatus ) end end -- now make this function available as key bind to all players. -- first, get the list of players local connectedPlayers = getElementsByType ( "player" ) -- for each one in it, for i, aPlayer in ipairs(connectedPlayers) do -- bind the player's "p" key to the toggleFreezeStatus function bindKey ( aPlayer, "p", "down", "Toggle freeze status", toggleFreezeStatus ) end هو صح يوم جبته من الويكي ليه تغير فيه ؟
  2. جايب كود من الويكي ولآصقه ومخربط فيه وضايف اشياء وسويت وسويت كود تراك منت متعلم بهذي الطريقة
  3. ارجو من الادارة اغلاق الموضوع قبل ينسخ الويكي كله ويجيبه هنا
  4. end انا معطيك الكود ماعد به شيء صالح تغير فيه ؟ ليه على الاقل جرب الكود قبل تسأل
  5. اربط الاعب بالوظيفة function invisible(player) if getPlayerMoney(player) >= 1500 then if getElementAlpha( player ) == 255 then takePlayerMoney(player,1500) setElementAlpha ( player, 0 ) end end end addCommandHandler ( "invis", invisible )
  6. تبي تشوف اذا كانت فلوس اكبر من 1500 ليه منت حاط سحب فلوس ولا شيء ولازم تربط الاعب مع الوظيفة ناقص قوس في الاخير
  7. تخفيه وتظهره في نفس الوقت وترى المثال واضح في الويكي مايحتاج تغير فيه https://wiki.multitheftauto.com/wiki/SetElementAlpha function toggleInvis ( thePlayer ) -- thePlayer is whoever executed the command if getElementAlpha( thePlayer ) == 0 then -- if the player is NOT invisible setElementAlpha ( thePlayer, 0 ) -- set the players alpha to 0 (make them invisible) else -- else, if the source player IS visible setElementAlpha ( thePlayer, 255 ) -- set the players alpha to 255 (make them 100% visible) end end addCommandHandler ( "invis", toggleInvis )
  8. التكوين هو إخراج الشيء من العدم إلى الوجود
  9. صيغة الوظيفة : تركيبها وعبارتها
  10. المتغيرات variables الصيغة Formula Syntax هو أحسن التكوين اقول ارقد جايب الترجمة من قوقل برهان اجل ههههههههههههه برهان ايش اول مرة اسمع بها بالبرمجة بعدين تكوين ايش وضح معناها في البرمجة
  11. Return = إعادة ، إرجاع ، رد Arguments = متغيرات Syntax = الصيغ ، صيغة ، صاغ
  12. من الي فهمته تستخدم getTeamFromName getPlayersInTeam getPlayerName
  13. لكل " عصابة " زر معين وتاب ؟
  14. addCommandHandler setPlayerTeam واذا تبي تسوي تيمات createTeam
  15. ماجبت شيء جديد مثل ماقال تابل قبلك
  16. وانا اقول وش القصة قد مرت علي حذف الماب ذي قلت اقدر اصغر الماب
  17. قد جربت كلنت ماصغر شيء اعتقد انه مايأخذ كل الابجكت فيه سبب ولا هو كذا
  18. function allObjectScale ( ) for i, object in ipairs ( getElementsByType ( "object" ) ) do setObjectScale ( object, 0.5 ) end end addEventHandler ( "onResourceStart", resourceRoot, allObjectScale ) الكود مافيه خطا لكن مايشتغل ؟
  19. هنا برنامج جميل انا استخدمه http://notepad-plus-plus.org/ وايضا http://luaedit.sourceforge.net/download.html وايضا https://wiki.multitheftauto.com/wiki/MTASE
  20. الي اعرفه انا ان اسمها مفكرة
  21. -- server side addCommandHandler ( "تشغيل", function ( ) ped = createPed ( 230, 1808, 1282, 6 ) vehicle = createVehicle ( 411, 1808, 1282, 6 ) -- عدل احداثياتك warpPedIntoVehicle ( ped, vehicle, 0 ) triggerClientEvent ( "setPedControl", getRootElement(), ped ) end ) -- client side addEvent( "setPedControl", true ) addEventHandler( "setPedControl", getRootElement(), function ( ped ) setPedControlState ( ped, "accelerate", true ) end )
×
×
  • Create New...