Jump to content

[DONE]*

Members
  • Posts

    262
  • Joined

  • Last visited

Everything posted by [DONE]*

  1. addEventHandler("onClientGUIClick", root, -- الحدث function () -- الوظيفة if source == BtnName then if guiGetVisible(GUIEditor.window[1]) == true then -- اذا اللوحة موجودة local sound = playSound("sound.mp3") -- تشغيل الصوت setSoundVolume(sound, 1) -- نضع قوة الصوت 1 end -- أنهاء التحقق end -- إنهاء الوظيفة end ) -- قوس الحدث طبعا في حدث لو ضغت زر .. يتحقق اذا اللوحه ظاهره ولا لا .. وانت مو ضايف تحقق وش هو الزر الي تبي اذا تضغطه تكمل الفنكشن كذا رح تشتغل على اي عنصر GUI
  2. الحدث. مكتوب بالحدث بالويكي.. This event is fired when the user double clicks a GUI element. Doesn't work with buttons. onClientGUIDoubleClick يعني ما يشتغل مع الأزرار .. جرب تحط onClientGUIClick ودائما خلي الفلوس من السيرفر .. عشان بالكلينت يصير بقات .
  3. استخدم الفنكشن: get وتحط الكود ذا بالميتا .. طبعا القيمه الي حطيتها بالفنكشن "*Examble" value="[ VVV ]"> تحطها بخانه name ولا تشيل ال * الي قبل الأسم .. هي الي تعطيك القدره انك تغير من لوحه الأدمنيه وتكتب بالـــ value اسم القروب او ايا كانت القيمه الي رح تحطها --------------------------------------------------- مثال لفنكشن get #~~ server File addCommandHandler ( get('Name'), -- نستخدم الفنكشن عشان نقدر نغير الأمر الي يخرج الكلام بلشات من اللوحه function(Player) outputChatBox ('Examble') end) #~~ meta File "*Name" value="[OutPut]"> اتمنى تكون فهمتها .
  4. --# server addEventHandler('onMarkerHit', root, function (hit) if source == Marker1 and getElementData( hit, 'Group' ) == groupName then triggerClientEvent ( hit, "Maxeess", hit ) end end ) --# client addEvent ( "Maxeess", true ) addEventHandler ('Maxeess',root, function maxes () guiSetVisible(bassamWindow,true) showCursor( true ) end) 1 - اللوكل بلاير ما نستخدمها بالسيرفر 2- كان ناقص تفعيل الحدث addEventHandler 3- مو لازم تضيف اكثر من تحقق لو كنت ما رح تسوي else (and) استخدم عشان تختصر 4- لو بتستخدم بارامتر للحدث لازم تضيفه function (hit) كذا
  5. مو محتاجه سكايب ولا غيره .. الكود: bindKey ('1','down', function() fixVehicle (getPedOccupiedVehicle (localPlayer)) end) -- لو تبي الكود سيرفر function fixVeh() fixVehicle (getPedOccupiedVehicle (player)) end addEventHandler ('onResourceStart',root, function() for _,players in ipairs (getElementsByType ('player')) do bindKey (players,'1','down',fixVeh) end end) الكود غير مجرب .. و اعذروني لو كان فيه اخطاء . سويته ع السريع
  6. اخوي العاجل مو بالصعوبه الي حاطها ف بالك انت ... كله ليبل و و امر + guiSetText
  7. -- ضيف تحقق اذا كان بالرتبه الي تبيها لما يكتب الامر --و استخدم guiSetText -- الا لو كان دي اكس ما رح تضبط
  8. العلامه زي م قال الاخ بسام تنحط بعد القوس و ما تسوي شي بس هي بالاصل تستخدم باكثر من لغه برمجه ثانيه زي Java Javascript C# و لو ما تكتبها باللغات المذكوره فوق كودك ما رح يشتغل
  9. اخوي سوي جدول ..وحط فيه اي دي السكنات الي تبيها ... bindkey بعدان اتحقق لما يصغط سهم يمين او يسار getElementModel ............. واذا كان سكن مثلا رقمه 50 .. تستخدم setElementModel وتخلي السكن 51 ............ نفس الشي مع التيمات ... حط كل التيمات بجدول .. ولما يضغط زر يمين او يسار تجيب التيم الي معه و تعطيه التيم الي بعده .. حسب م تبي انت طبعا لازم تحط القيم حقت جدول التيمات بسترينق " " لانك رح تجيب التيم من اسمه getTeamFromName اكيد في طريقة ثانيه .. بس هذي الطريقه الي عندي ....... حاول تسوي الكود لحالك و اطرحه هنا رح نصححه لك
  10. يخوي في اكثر من 1000 مود بالكميونتي..حمل و اتعلم من الأكواد https://community.multitheftauto.com/in ... ls&id=8454 https://community.multitheftauto.com/in ... ls&id=1562 https://community.multitheftauto.com/in ... ls&id=8043
  11. local ser = { ["ser1"] = true, ["ser2"] = true, ["ser3"] = true, ["ser4"] = true, ["ser5"] = true, } addCommandHandler ( "hacker", function(player) local playerSer = getPlayerSerial(player) if ser[playerSer] then end end)
  12. جربب تستخدم onClientPreRender وذا ما ضبط .. اطرح الكود كامل
  13. addEventHandler("onClientGUIClick",root, function() if source == Position then local selectedRow, selectedCol = guiGridListGetSelectedItem( GridList ) local playerName = guiGridListGetItemText( GridList, selectedRow, selectedCol ) local Player_ = getPlayerFromName (playerName ) local x,y,z = getElementPosition (Player_ ) guiSetText (editPosition1, x ) guiSetText (editPosition2, y ) guiSetText (editPosition3, z ) end end)
  14. addEventHandler("onResourceStart", resourceRoot, function() count = 6 exports["guimessages"]:outputServer("*[sniper Mission] Sniper Mission Started Go To Enter Mission", root, 50, 30, 255) standByMission = setTimer(function() destroyElement(marker) destroyElement(marker2) exports["guimessages"]:outputServer("*[sniper Mission] Sniper Mission Started ", root, 0, 150, 255) setTimer(checkForWinner, 1000, 1, true) setTimer(function() setTimer (function() count = count - 1 outputChatBox (tostring(count)) end,1000,count) end,10*60*1000-6000,1) end, 10*60*1000, 1) end)
  15. ^ addEventHandler("onResourceStart", resourceRoot, function() count = 6 exports["guimessages"]:outputServer("N/A", root, 50, 30, 255) sMission = setTimer(function() moveObject(1Door, 3500, x, y, z) moveObject(2Door, 3500, x, y, z) exports["guimessages"]:outputServer("N/A", root, 0, 150, 255) setTimer(checkWinner, 1000, 1, true) setTimer (function() count = count - 1 outputChatBox (tostring(count)) end,1000,count) end, 10*60*1000, 1) end)
  16. لازم ما يكون بينك و بين البيد في اوبجكت او مبنى او بيد او سياره
  17. شرح بسيط رح يفيدكـــ
  18. ضيف المود لقروب الأدمن GUIEditor = { label = {}, checkbox = {}, edit = {}, staticimage = {}, } GUIEditor.staticimage[1] = guiCreateStaticImage(344, 219, 670, 342, ":guieditor/images/dot_white.png", false) guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:483B0000 tr:483B0000 bl:483B0000 br:483B0000") guiSetVisible ( GUIEditor.staticimage[1], false ) GUIEditor.edit[1] = guiCreateEdit(10, 63, 243, 41, "", false, GUIEditor.staticimage[1]) GUIEditor.edit[2] = guiCreateEdit(10, 137, 243, 41, "", false, GUIEditor.staticimage[1]) GUIEditor.label[1] = guiCreateLabel(10, 38, 238, 25, "آسسم الحســآب", false, GUIEditor.staticimage[1]) local font_0 = guiCreateFont(":send-flos/mhmed12.ttf") guiSetFont(GUIEditor.label[1], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(15, 108, 238, 25, "كــلــمة آلســـر", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[2], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") GUIEditor.checkbox[1] = guiCreateCheckBox(35, 188, 208, 33, "حفظ آلمعلومآت", false, false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.checkbox[1], font_0) guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", "F5D70101") GUIEditor.edit[3] = guiCreateEdit(400, 63, 243, 41, "", false, GUIEditor.staticimage[1]) GUIEditor.edit[4] = guiCreateEdit(400, 137, 243, 41, "", false, GUIEditor.staticimage[1]) GUIEditor.label[3] = guiCreateLabel(405, 38, 238, 25, "آسسم الحســآب", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[3], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") GUIEditor.label[4] = guiCreateLabel(405, 114, 238, 25, "كــلــمة آلســـر", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[4], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[4], "center") GUIEditor.staticimage[4] = guiCreateStaticImage(410, 237, 237, 50, ":guieditor/images/dot_white.png", false, GUIEditor.staticimage[1]) guiSetProperty(GUIEditor.staticimage[4], "ImageColours", "tl:9EFF7B7B tr:9EFF7B7B bl:9EFF7B7B br:9EFF7B7B") GUIEditor.label[5] = guiCreateLabel(1, 3, 232, 44, "تـــســـجـــيـــل", false, GUIEditor.staticimage[4]) guiSetAlpha(GUIEditor.label[5], 0.50) guiSetFont(GUIEditor.label[5], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[5], "center") GUIEditor.staticimage[5] = guiCreateStaticImage(10, 238, 237, 50, ":guieditor/images/dot_white.png", false, GUIEditor.staticimage[1]) guiSetProperty(GUIEditor.staticimage[5], "ImageColours", "tl:9EFF7B7B tr:9EFF7B7B bl:9EFF7B7B br:9EFF7B7B") GUIEditor.label[6] = guiCreateLabel(3, 2, 232, 45, "تـــســـجـــيــل دخـــول", false, GUIEditor.staticimage[5]) guiSetAlpha(GUIEditor.label[6], 0.50) guiSetFont(GUIEditor.label[6], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[6], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[6], "center") GUIEditor.staticimage[6] = guiCreateStaticImage(326, 188, 711, 31, ":guieditor/images/dot_white.png", false) guiSetProperty(GUIEditor.staticimage[6], "ImageColours", "tl:9EFF7B7B tr:9EFF7B7B bl:9EFF7B7B br:9EFF7B7B") guiSetVisible ( GUIEditor.staticimage[6], false ) GUIEditor.label[7] = guiCreateLabel(2, 5, 709, 25, "لــــوحـــــــة تــــســـجـــيـــل دخـــول", false, GUIEditor.staticimage[6]) guiSetFont(GUIEditor.label[7], font_0) guiLabelSetHorizontalAlign(GUIEditor.label[7], "center", true) guiLabelSetVerticalAlign(GUIEditor.label[7], "center") guiSetAlpha ( GUIEditor.staticimage[4], 0.5 ) guiSetAlpha ( GUIEditor.staticimage[5], 0.5 ) addEventHandler( 'onClientMouseEnter', root, function() if source == GUIEditor.staticimage[4] then guiSetAlpha ( GUIEditor.staticimage[4], 1.0 ) elseif source == GUIEditor.staticimage[5] then guiSetAlpha ( GUIEditor.staticimage[5], 1.0 ) end end ) addEventHandler( 'onClientMouseLeave', root, function() if source == GUIEditor.staticimage[4] then guiSetAlpha ( GUIEditor.staticimage[4], 0.5 ) elseif source == GUIEditor.staticimage[5] then guiSetAlpha ( GUIEditor.staticimage[5], 0.5 ) end end addEventHandler( 'onClientGUIClick', root, function () if ( source == GUIEditor.staticimage[5] ) then if ( guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[1] ) ~= " " ) then if ( guiGetText ( GUIEditor.edit[2] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= " " ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) >= 3 ) then if ( string.len ( guiGetText ( GUIEditor.edit[2] ) ) >= 4 ) then if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) ) then remeber = true else remeber = false end if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) ) then destroyElement ( sound ) end triggerServerEvent("onRegister", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), remeber) else outputChatBox("* Password should be at least 4 characters long !", 255, 0, 0, true, 5) end else outputChatBox("* Username should be at least 3 characters long !", 255, 0, 0, true) end else outputChatBox("* Please Write Password !", 255, 0, 0, true) end else outputChatBox("* Please Write Username !", 255, 0, 0, true) end elseif ( source == GUIEditor.staticimage[4] ) then if ( guiGetText ( GUIEditor.edit[3] ) ~= "" and guiGetText ( GUIEditor.edit[3] ) ~= " " ) then if ( guiGetText ( GUIEditor.edit[4] ) ~= "" and guiGetText ( GUIEditor.edit[4] ) ~= " " ) then if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) ) then remeber = true else remeber = false end if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) ) then if ( isElement ( sound ) ) then destroyElement ( sound ) end end triggerServerEvent("onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), remeber) else outputChatBox("* Please Write Password !", 255, 0, 0, true) end else outputChatBox("* Please Write Username !", 255, 0, 0, true) end end end ) addEvent("onClose",true) addEventHandler("onClose",root, function () guiSetVisible(GUIEditor.staticimage[1],false) guiSetVisible(GUIEditor.staticimage[6],false) showCursor(false) guiSetInputEnabled(false) Show() end )
  19. غالبا يقصد التجاره بين اللاعبين الي بسيرفرات الحياه الواقعيه .. الي يكون بأف7 عند CIT #Event [onClientGUIClick] guiCreateButton guiCreateGridList guiGridListAddColumn guiGridListAddRow guiGridListGetItemText guiGridListGetSelectedItem # executeSQLQuery or -- database للحفظ setElementData getElementData givePlayerMoney takePlayerMoney
  20. الكود يجيب اللاعبين بالقريد ليست .. وفي زر يعطي اللاعب داتا للاعب لو حددت اسمي من القريد و ضغط الزر يعطي الداتا وكل شي تمام لاكن لو حدد اي شخص ثاني ما يضبط.. WindowControler = guiCreateWindow(545, 206, 317, 391, "Data Control", false) guiWindowSetSizable(WindowControler, false) guiSetAlpha(WindowControler, 1.00) GridList = guiCreateGridList(26, 39, 274, 241, false, WindowControler) Give_btn = guiCreateButton(10, 347, 85, 34, "Give Data", false, WindowControler) guiSetProperty(Give_btn, "NormalTextColour", "FFAAAAAA") TakeData_btn = guiCreateButton(115, 346, 85, 35, "Take Data", false, WindowControler) guiSetProperty(TakeData_btn, "NormalTextColour", "FFAAAAAA") getData_btn = guiCreateButton(10, 302, 85, 34, "Get His Data", false, WindowControler) guiSetProperty(getData_btn, "NormalTextColour", "FFAAAAAA") LBL = guiCreateLabel(222, 332, 68, 14, "Ammount", false, WindowControler) Ammount_edit = guiCreateEdit(219, 350, 88, 21, "", false, WindowControler) dataname_edit = guiCreateEdit(219, 305, 88, 21, "", false, WindowControler) LBL = guiCreateLabel(222, 286, 68, 14, "Data:", false, WindowControler) guiGridListAddColumn (GridList,'Player name',1) guiSetVisible (WindowControler,false) for _,v in ipairs (getElementsByType('player')) do row = guiGridListAddRow (GridList) guiGridListSetItemText (GridList,row,1,getPlayerName (v),false,false) end addEventHandler ('onClientGUIClick',root, function () if source == Give_btn and guiGridListGetSelectedItem (GridList) ~= -1 then local getPlayerNFromGrid = guiGridListGetItemText (GridList,guiGridListGetSelectedItem(GridList),1) local getDataName = guiGetText (dataname_edit) local getPlayerN = getPlayerFromName (getPlayerNFromGrid) local getamm = guiGetText (Ammount_edit) setElementData (getPlayerN,getDataName,tonumber(getElementData (getPlayerN,getDataName)) + tonumber(getamm) ) exports["guimessages"]:outputClient('Dont successfully',0,255,0) end end) الديبوق:
×
×
  • Create New...