Jump to content

yazan

Members
  • Posts

    1,452
  • Joined

  • Last visited

Everything posted by yazan

  1. ههههههههههههه من عطاك سمكة ! يقدر يكبس على الفنيشن و يشوف الشرح
  2. اول طلب تستخدم end مع if function loop تعد كم وحده من الذكرتهم فوق و تحط حسب العدد و بنسبه لل كلنت تقدر ترسل ترايقر بمعلومات يلي تبي تستخدمها بجانب الكلنت او سيرفر
  3. وش الكلنت حقك ذا اول شي عامل اخفاء للنافذه و انت مو عامل نافذه ثاني شي صور دي اكس بتفضل موجود من اول ما تشغل المود لين ينطفي ما تروح مع لوحة ثالث شي بسيرفر لزم تحقق من فلوس لاعب من اجل الاخطاء edit # Client GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(275, 39, 288, 447, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.button[1] = guiCreateButton(207, 344, 115, 31, "Muscles 100000$", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(355, 344, 106, 33, "Skinny 50000$", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(485, 344, 111, 33, "Paunch 75000", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(257, 180, 236, 19, "مود العضلات من قبل ...", false, GUIEditor.window[1]) guiSetVisible(GUIEditor_Window[1],false) end ) function dxx() dxDrawImage(172, 169, 456, 257, "progress.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(209, 212, 113, 129, "mus.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(358, 210, 103, 131, "n7ef.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(488, 209, 108, 132, "krs.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor.button[1] then triggerServerEvent( "Muscles", localPlayer ) end end) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor.button[2] then triggerServerEvent( "Skinny", localPlayer ) end end) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor.button[3] then triggerServerEvent( "Paunch",localPlayer ) end end) local opened = false function Open ( ) if ( opened == false ) then addEventHandler("onClientRender", root, dxx) showCursor ( true ) opened = true guiSetVisible(GUIEditor_Window[1], true) else removeEventHandler ( "onClientRander", root,dxx) showCursor ( false ) opened = false guiSetVisible(GUIEditor_Window[1], false) end end bindKey ("F10", "down", Open ) server addEvent("Muscles", true) addEventHandler("Muscles", root, function ( thePlayer ) if getElementType ( thePlayer) == "player" then if ( getPlayerMoney (source) >= 4000 ) then takePlayerMoney(source,4000) setPedStat(thePlayer, 23, 999) then outputChatBox ( "You now own Muscles " ) else outputChatBox ( " ما معك فلوس" ) end end end ) ------------------------------ addEvent("Skinny", true) addEventHandler("Skinny", root, function (thePlayer) if getElementType ( thePlayer) == "player" then if ( getPlayerMoney (source) >= 4000 ) then takePlayerMoney(source,4000) setPedStat(thePlayer, 23, 999) then outputChatBox ( "You now own Skinny " ) else outputChatBox ( " ما معك فلوس" ) end end end) -------------------------- addEvent("Paunch", true) addEventHandler("Paunch", root, function (thePlayer) if getElementType ( thePlayer) == "player" then if ( getPlayerMoney (source) >= 4000 ) then takePlayerMoney(source,4000) setPedStat(thePlayer, 23, 999) then outputChatBox ( "You now own Skinny " ) else outputChatBox ( " ما معك فلوس" ) end end end)
  4. Client# local Weapons = { --- انشاء جدول يحتوي ع اسم السلاح اللي بيجي باللستة والايدي حق السلاح والسعر .. وتقدر تضيف مليون سلاح [ 1 ] = { "M4", 31, 300 }, [ 2 ] = { "AK", 25, 500 }, } addEventHandler( "onClientResourceStart", resourceRoot, function ( ) -- يوم يشتغل السكربت wnd = guiCreateWindow(187, 116, 450, 386, "=[ Panel Shop v1.0 | By Mr.R ]=", false) guiWindowSetSizable( wnd, false ) guiSetVisible ( wnd, false ) GridList = guiCreateGridList(9, 21, 223, 355, false, wnd) guiGridListAddColumn(GridList, "Weapon ...", 0.9) guiGridListAddColumn(GridList, "Cost", 5) Button1 = guiCreateButton(270, 243, 139, 39, "=[ Buy ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(270, 292, 139, 39, "=[ X ]=", false, wnd) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") MTA = guiCreateStaticImage(249, 27, 191, 193, "MTA.png", false, wnd) for i, v in ipairs ( Weapons ) do --- نسوي لوب لجميع القيم حق الجدول يعني نجلب جميع قيم الجدول Row = guiGridListAddRow( GridList ) --- نضيف رو جديد بعدد القيم اللي بالجدول رو يعني سطر جديد باللستة guiGridListSetItemText( GridList, Row, 1, v[1], false, false ) --- نحط التكست حق اول كولمن والتكست هو اول قيمة من الجدول وهي اسم السلاح guiGridListSetItemText( GridList, Row, 2, v[3], false, false ) --- نحط التكست للكولمن الثاني وهو القيمة الثاني من الجدول وهي السعر guiGridListSetItemData( GridList, Row, 1, v[2] ) --- هنا نحط داتا قيمة الداتا ذي هي الايدي حق السلاح عشان لو ما تبي تحط الايدي باللستة نحط داتا ونجيبها يوم يختار شي من اللستة end end ) bindKey ( "F2", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) guiStaticImageLoadImage ( MTA, "MTA.png" ) end ) addEventHandler( "onClientGUIClick", resourceRoot, function( ) --- حدث الضغط على الزر if ( source == Button1 ) then --- نحدد السورس if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then --- نتحقق انه اختار شي من اللستة local Money = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 2 ) ---- نجلب اللي اختاره بالكولمن الثاني وهو الفلوس local iD = guiGridListGetItemData( GridList, guiGridListGetSelectedItem( GridList ), 1 )--- نجلب الايدي وهو محفوظ بالداتا جلبناه عن طريق اللي اختارهـ if ( Money ~= '' and iD ~= '' ) then --- "" نتحقق انه الفلوس والايدي مهيب triggerServerEvent( "giveWeapon", localPlayer, iD, Money ) --- نسوي تريقر لاعطاء اللاعب سلاح طبعا نرسل مع التريقر المعلومات الفلوس والايدي end else -- لو ما اختار شي من اللستة outputChatBox ( "* Please Select Weapon", 255, 255, 255, true ) --- نسوي مخرج شات end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( guiGetVisible ( wnd ) ) elseif ( source == GridList ) then --- لو ضغط ع اللستة if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then --- نتحقق انه اختار شي من اللستة local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) if ( fName ~= '' ) then guiStaticImageLoadImage ( MTA, ""..fName..".png" ) --- نستبدل صورة السلاح الموجودة باللي اختارهـ end else --- لو ضغط بدون ما يختار guiStaticImageLoadImage ( MTA, "MTA.png" ) --- نرجع الصورة الاصلية end end end ) Server # addEvent( "giveWeapon", true ) -- نضيف الحدث بجانب سيرفر addEventHandler( "giveWeapon", root, function( iD, Money ) --- نضيف الحدث مع تعريف اللي ارسلناه if ( getPlayerMoney ( client ) >= tonumber ( Money ) ) then --- اتحقق من فلوس اللاعب لو كانت تساوي او اكبر من سعر السلاح if ( giveWeapon ( client, tonumber ( iD ), 500 ) ) then --- نتحقق لو عطاهـ للاعب سلاح بالايدي اللي ارسلناهـ يعني اللي اختارهـ takePlayerMoney ( client, tonumber ( Money ) ) --- نسحب منه سعر السلاح outputChatBox ( "* You Bought "..getWeaponNameFromID ( iD ).." With "..tonumber ( Money ).."", client ) --- نسوي مخرج شات باسم السلاح اللي شراهـ والفلوس اللي انسحبت end end end ) هذه من موضوع انطرح من قبل
  5. The source of this event is the GUI element that was clicked.
  6. ألزبدده مو lua خخخخخ
  7. اف 8 مسحوب عليه من قلك انا يوم ادخل سيرفر اجرب 300 كلمة تواجد ساعات ****الخ و كل كلمة بشات تنكتب تعبر كومند
  8. addEventHandler("onClientResourceStart", resourceRoot, function() editPassword = guiCreateEdit(62,201,157,32,"",false,mainWindow) guiEditSetMaxLength(editPassword,20) guiEditSetMasked(editPassword,true) guiSetAlpha(editPassword,0.40000000596046) pass = guiCreateCheckBox(319, 337, 106, 15, "ShowPassword",false,mainWindow) guiSetFont(pass, "default-bold-small") guiSetProperty(pass, "NormalTextColour", "FF00FF0C") end) addEventHandler("onClientGUIClick",root, function () if source == pass then guiEditSetMasked(editPassword, guiCheckBoxGetSelected(source)) end end)
  9. بنسبه لل gta sa فا لغة البرمجه c مو lua و في برنامج تقدر تعمل سيارات جديده بس مدري لو يصلح او لا + ذا مو في قسم بالبرمجة ذا قسم عام
  10. هريسه بطعم الكود ريد addEventHandler("onPlayerWasted", root, function(_, killer) if killer and getElementType(killer) == "player" then local playerTeam = getPlayerTeam (source) if ( playerTeam ) then local t = getTeamName ( polic ) fi = getElementData ( killer, "poo" ) if ( fi == 1 ) then setElementData ( killer, "poo", 2 ) else setElementData ( killer, "poo", 1 ) if ( fi == 2 ) then setElementData ( killer, "poo", 3 ) else setElementData ( killer, "poo", 2 ) if ( fi == 3 ) then myBlip = createBlipAttachedTo ( killer, 52 ) end end end end end end)
  11. yazan

    طلب

    هذ ه الكود مو صح + مو مرتب + لو تشوف مثال
  12. changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end end end end end
  13. getAccountName getPlayerAccount aclGetGroup isGuestAccount guiSetText triggerClientEvent triggerServerEvent
  14. account = getPlayerAccount(thePlayer) --- هذي مثال على جلب حساب لاعب if isGuestAccount ( sourceAccount ) then - تحقق اذا لاعب في قورب d = getElementData ( source, "Time" ) -- جلب داتا a= aclGetGroup("Admin") -- جلب القورب يلي اسمه ادمن aclGroupRemoveObject (aclGetGroup("Admin"), "user."..accountName)-- حذف حساب من قروب يلي اسمه ادمن هذه مثال على كل فنيشن و يوش يستخدم طبعت هذه مو كود مررتب يعني لو تطرح و تقول حاولة بيطلع لك واحد يقول هريسه و يمكن احد يوقل لي انا بعد هريسه ما علينا شوف فوق كيف تستخدم كل واحد
  15. ستخدم ذا مع الايفنت يوم تضرب سياره function () local vehicle = getPedOccupiedVehicle ( localPlayer ) if ( vehicle ) then fixVehicle ( vehicle ) end end
  16. العفو ههههههه مدري ذا وش عمل بس قلب السطر
  17. طلب ثاني getElementRotation setElementRotation
  18. جاك صروخ بجبهتك نسفك --------------------------- احس يلي يجي هنا و يكون له فتره و يثبت وجوده و يحقق نجاح يعز عليه يترك وضعه و مركزه بالعبه و يرجع للعبه ثانيه يعيد مشوار ثاني من وجهت نظري لي فتره ما احمل العاب اون لاين من اجل كذا مدري لو تفكيري غبي او فيه وجة نظر
  19. الكلنت مو مرتبط ب سيرفر
  20. server function OnPlayerKill (_, killer) if killer then if getElementType ( killer ) == "player" then if killer ~= source then if not isGuestAccount(getPlayerAccount(killer)) then local experience = tonumber(getElementData(killer,"experience")) local SourceLevel = getElementData(killer,"level") if ( not SourceLevel ) then SourceLevel = 1 setElementData(killer,"level",1) end if ( levels[SourceLevel+1] ) then local randomExperience = math.random(unpack(ExpRewardForKill)) if (experience) then setElementData(killer,"experience",experience+tonumber(randomExperience)) else setElementData(killer,"experience",randomExperience) end else setElementData(killer,"experience",tonumber(levels[SourceLevel]["experienceRequired"])) end end end end end end addEventHandler ("onPlayerWasted", root, OnPlayerKill) كلنت# local sx, sy = guiGetScreenSize() function drawExperience() dxDrawRectangle((310/1024)*sx,(698/768)*sy,(481/1024)*sx,(36/768)*sy,tocolor(255,255,255,35),false) dxDrawRectangle((315/1024)*sx,(703/768)*sy,(472/1024)*sx,(26/768)*sy,tocolor(0,0,0,255),false) local experience = getElementData(localPlayer,"experience") or 0 local experience_n = getElementData(localPlayer,"experience_n") or 0 local level = getElementData(localPlayer,"level") or 1 local percent = (experience / experience_n * 100) if (percent >= 100) then percent = 100 elseif (experience_n < 1) then percent = 0 end dxDrawRectangle((320/1024)*sx,(706/768)*sy,(tonumber(percent)*4.64/1024)*sx,(20/768)*sy,tocolor(255,255,255,75),false) dxDrawBorderedText("Level: ".. tostring(level) .." | Experience Points: ".. tostring(experience) .." > ".. tostring(experience_n),(430/1024)*sx,(707/768)*sy,(667/1024)*sx,(724/768)*sy,tocolor(0,0,0,255),(sx/1024)*0.6,"bankgothic","center","center",false,false,false) end addEventHandler("onClientRender",root,drawExperience) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end addEvent ( "LevelUpEffect", true ) addEventHandler ( "LevelUpEffect", root, function ( ) PlayerLevelUpSound() addEventHandler("onClientRender",root,DrawLevelUp) setTimer(function() removeEventHandler("onClientRender",root,DrawLevelUp) end, 4000, 1) end ) function PlayerLevelUpSound() local sound = playSound("levelup.mp3") setSoundVolume(sound, 1) end function DrawLevelUp() dxDrawBorderedText( "LEVEL UP!!!", sx/2, sy/15, sx/2, sx/2, tocolor(255,144,0,255),(sx/1024)*2.5,"bankgothic","center","center",false,false,false ) end
  21. function rr ( ) local seconds = getTickCount() / 6000 local angle = math.sin(seconds) * 360 dxDrawImage ( 589, 338, 121, 90, '1.png', angle, 0, 0) end function ty ( ) addEventHandler("onClientRender", getRootElement(), rr) end addEventHandler("onClientResourceStart",resourceRoot, ty)
  22. لا في فوق مو حق زومبي قبل تعديل الموضوع
  23. شوف ذا الموضوع فيه مثل طلبك بس شوف الاكواد يلي فيه اول شي قبل لا تتعدل viewtopic.php?f=160&t=77320&hilit=rowdata&start=15
  24. ههههههههههههههههههههههههههههههههههههههههههههههههههه مستحيل
×
×
  • Create New...