-
Posts
1,474 -
Joined
-
Last visited
-
Days Won
23
Everything posted by !#NssoR_)
-
غير مجرب ذذ timeouted = 1220 -- وقت خروجه من المقبره addEventHandler,('onPlayerWasted',root,function (attacker) spawnPlayer (source,812.29241943359,-1100.7707519531,25.786060333252) outputChatBox(' You Are Wasted [ '..getPlayerName(attacker).. ' ] ',source,255,255,0,true) setTimer(outAttac,timeouted,1) end ) function outAttac () spawnPlayer (source,0,0,0) outputChatBox(' تم خروجك من مقبره المقتول [ '..getPlayerName(source).. ' ] ',source,255,255,0,true) end
-
مادري وش تبي تسوي بضبط ولكن بعدل الي شايفه خطأ بل كود addEventHandler,('onPlayerWasted',root,function (attacker) spawnPlayer (source,812.29241943359,-1100.7707519531,25.786060333252) outputChatBox(' You Are Wasted [ '..getPlayerName(attacker).. ' ] ',source,255,255,0,true) end )
-
GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) Maarker = createMarker ( 179.69999694824,1915.3000488281,17 "cylinder" ,1.5 ) addEventHandler ( "onClientMarkerHit", Maarker, function ( hitPlayer ) if ( getElementData ( hitPlayer , "gang" ) == "ARMY" ) then if getElementType ( hitPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end end ) addEventHandler ( "onClientMarkerLeave", Maarker, function ( leftPlayer ) if getElementType ( liftPlayer ) == "player" and ( getElementData ( liftPlayer , "gang" ) == "ARMY" ) then then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end ) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات outputChatBox("تم انتقال الى مركز الشرطة") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة البنك") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الي محل اسلحة") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة سرقت البنك") setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[1],"NormalTextColour", "FF0FFF0F") -- لتليون الزر باللون الاخضر -----------------------------------------------
-
onWasted = function() if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'No Team' and getElementData ( source , "Group" ) == "[s.S]" then function sp( source ) setElementPosition( source, 2005.00000,1543.00000,13.59075 ) setPedArmor( source, 100 ) giveWeapon( source, 46 ) setPedSkin( source, 181 ) end setTimer(sp,1000,1,source) end end addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) group = "[s.S]" joinhome = createMarker ( 744.5, 1346.5, 37.5, "arrow", 1, 13, 91, 200) outhome = createMarker ( 745.79998779297, 1351.1999511719, 777, "arrow", 1, 13, 91, 200) addEventHandler ( "onMarkerHit", joinhome, function ( player ) if getElementType ( player ) ~= "player" then return end if getElementData ( player, "Group" ) ~= group then return end spawnPlayer(player,743.66040,1353.60657,776.50989) setPedArmor (player,100) setPedSkin (player,181) end ) addEventHandler ( "onMarkerHit", outhome, function ( player ) if getElementType ( player ) ~= "player" then return end if getElementData ( player, "Group" ) ~= group then return end spawnPlayer(player,748.94470,1346.76086,36.91845) setPedArmor (player,100) setPedSkin (player,181) end )
-
ped = مومعرفه بل كود ! + الحدث ماله وظيفة ؟
-
https://forum.multitheftauto.com/viewtopic.php?f=164&t=62041
-
Try this .. Server Side # function Quit() local playeraccount = getPlayerAccount ( source ) if not playeraccount or isGuestAccount(playeraccount) then return end setAccountData ( playeraccount, "Money", getPlayerMoney ( source ) ) end addEventHandler("onPlayerQuit",root,Quit) function join(_,playerAccount) local playerMoney = getAccountData(playerAccount, "Money") setPlayerMoney ( source , playerMoney ) end addEventHandler( "onPlayerLogin", getRootElement(), join) I think the money automatically changes in the scorebord
-
You can download any sound you want from YouTube, but Should change the formula to MP3 and use it in this way sound = playSound("yoursound.mp3",true) And in meta . "theFile/yoursound.mp3"/> Just this -_-"
-
See to that . local sound = playSound3D ( "http://www.uploadmusic.org/MUSIC/628051381741104.mp3", x, y, z, true ) -- Link the video setSoundMaxDistance ( sound, 100 )
-
Yes, you can but.. You should change formula the video to mp3.
-
اتمني التعديل علي الكود وشكرا/تمت الافاده من اخونا جعفر شكرا
!#NssoR_) replied to alsanfor2014's topic in البرمجة
اولأ اكوادك تجيب الصداع بـ الراس حاول تحط اكوادك بـ Lua عشان تكون ملونه واذا مافهمت كلامي شوف هنا viewtopic.php?f=160&t=46670 ثانياً القسم غلط ثالثاً الحرامي كيف تبيه يعني بـ تيم معين ولا كيف ! -
ايه الحين الاطفال طايحين بـ الشغله ذي قبل سبوعين علي ما أعتقد لقيت مود نفس كذا بضبط وكان اسمه مود الخطف لما حملته نفس كذا تخريب ومدري وش -__-
-
انا سويت الكود كامل ولكن ابيك تحاول كم محاوله واذا ماعرفت بعطيكياه حاول = تتعلم كوبي بست = فشل انا عدلت علي كودك وابشيل بعض الوظائف وابيك انت تحطها عشان تتعلم GUIEditor_Window = {} GUIEditor_Window[1] = guiCreateWindow(221,290,352,204,"اللوحه الاولا",false) GUIEditor_Window[2] = guiCreateWindow(169,76,459,213,"اللوحه الثانيه",false) window2 = guiCreateButton(45,50,264,103,"Window-2",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F2" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) end end) addEventHandler ('onClientGUIClick',window2,function () end) تقريبا سويتلك الكود 96 % 100 شوف سطر 22 باقي كودين لازم تحطهم الي هم guiSetVisible -- يظهر النافذه الثانيه guiBringToFront -- يخليها بل مقدمه ويكمل الكود حااول وانا بساعدك ي الذيب
-
سهل انت سو الوحه وكل شي وافتح الوحه الاساسيه وحدد الزر الي بيفتحلك الوحه من خلال هذا الكود onClientGUIClick وتظهر النافذه من خلال هل كود guiSetVisible طبعا بتحط اسم النافذه الثانيه الي تبيها تظهر وعشان تكون في المقدمة تستخدم guiBringToFront وبس
-
Yes, I forgot you're right
-
الرجاء اعادة قراءة الموضوع من جديد
-
guiSetVisible -- فتح النافذه showCursor -- اظهار المؤشر onClientGUIClick -- عند الضغط علي الزر
-
علي ما اعتقد ان الي سوا الكود الموجود في هل موضوع viewtopic.php?f=160&t=68072 يقدر يسوي هل كود البسيط !
-
[return-break-tostring-tonumber] : تحديث : شرح
!#NssoR_) replied to فاّرس's topic in دروس في البرمجة
حبيت اترجم كود الاخ احمد للي مافهمو الكود -- player = الاعب الذي يرسل الفلوس -- command = لـ ارسال الفلوس عن طريق الأمر "send" -- amount = العدد الذي سوف يتم توزيعه للاعبين -- sendMoney = اسم الوظيفة function sendMoney(player, command, amount) -- بداية الوظيفة if isObjectInACLGroup ( "user." .. getAccountName (getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) then -- يتحقق اذا المرسل كان ادمن if amount ~= "" and amount ~= nil then -- اذا الاعب لم يكتب الفلوس المرسله for k,v in ipairs ( getElementsByType( "player" ) ) do -- جلب جميع لاعبين السيرفر if tonumber(amount) then -- يتحقق اذا الاعب كتب أرقام ولم يكتب حروف num = getPlayerCount ( ) -- جلب جميع عدد لاعبين السيرفر clear = math.floor( amount ) -- تجيبلك العدد بدون فواصل مثال 97.3 تخليه 97 فقط بدون فواصل real = num * clear -- ضرب عدد لاعبين السيرفر بـ عدد الفلوس التي ارسلتها else -- اذا الاعب كتب حروف بدال الارقام outputChatBox("يجب عليك كتابة ارقام وليس حروف", getRootElement(), 255,0,0,true) end -- انهاء if real > getPlayerMoney( player ) then outputChatBox("if you will send "..amount.."$ to "..num.." player in server you need to "..real.."$", player, 255,0,0,true) return end -- اذا الاعب الذي ارسل الفلوس ليس لديه المال الكافيه تأتيه رساله takePlayerMoney ( player, real ) -- سحب من الاعب الذي ارسل الفلوس بمقدار ما ارسله للاعبين givePlayerMoney( v, clear ) -- اعطاء فلوس لجميع الاعبين ماعاد المرسل outputChatBox("Admin ["..getPlayerName(player).."] give all players ["..clear.."$]", getRootElement(), 255,0,0,true) -- رساله تقول هذا الادمن ارسل المبلغ للجميع end -- انهاء else -- انهاء outputChatBox("send ", getRootElement(), 255,0,0,true) -- اذا الاعب كتب فقط امر ارسال من دون ان يضع عدد الفلوس تأتيه هذه الرساله end -- انهاء else -- انهاء outputChatBox("you are not in admin group", getRootElement(), 255,0,0,true) -- يتحقق من الي كتب الامر هل هو ادمن او لا end -- انهاء end -- انهاء addCommandHandler("send", sendMoney) -- امر ارسال " المال " للاعبين وشكراً.. -
مستعد اراهن علي انه مو انت الي مسوي الكود ^
-
عذراً .. علي التدخل ولكن انت دايم تطلب اكواد جاهزه والاخوان مايقصرون يعطونك ولكن احب اقولك اذا طول عمرك كذا ماراح تحقق الي في بالك يعني بتعتمد ع المنتدي ملاحظة : لاحظ الكلمه الي تحتها خط موكانك تدعي علي الرجل وليس تدعي له !
-
Try This addEventHandler("onClientGUIClick",root, function () if ( source == X ) then guiSetVisible(shop_1,true) showCursor(true) guiSetInputEnabled(true) end end )