Jump to content

hassan.k.s.a

Members
  • Posts

    868
  • Joined

  • Last visited

Everything posted by hassan.k.s.a

  1. ---server side--- ------بسم الله الرحمن الرحيم ---نبدأ على بركة الله سهل ان شاء الله راح تفهم --الشرح من قبل ---HaSsAn.K.s.A addEvent("gived",true) --- اسم السلاح addEventHandler("gived",root, --اضافة معالج لأسم السلاح function()--الوظيفة local PlayerMoney = getPlayerMoney(source)---هنا مصدر ارسال المال if ( PlayerMoney >= 150) then--هنا مبلغ السلاح الي يرسله الاعب لشراء السلاح takePlayerMoney(source,150) -- هنا المبلغ المأخوذ من الاعب نفس الكلام giveWeapon ( source , 24,700 ) -- عدد الطلقات setPedWeaponSlot(source, getSlotFromWeapon(24)) -- رقم التعريف منح سلاح للاعب local name = getPlayerName(source)--مصدر اسم الاعب outputChatBox ( "#ffffff" .. name .. " #ffffff Has Bought weapon ...", getRootElement(), 255, 0, 0, true )---اضهار نص في الشات عند الشراء else--اخر outputChatBox("You don't have $150 to buy deagle", source, 255, 0, 0, true)--اذا ماكان المبلغ كافي end -- نهايه end --نهاية القوس ) ------------------------------------------------------------------------------------------m4 addEvent("givem4",true) --اسم اسلاح addEventHandler("givem4",root, --معالج function()--الوضيفة local PlayerMoney = getPlayerMoney(source)--هع خلاص تعبت انت كمل الباقي على كلامي الي فوق if ( PlayerMoney >= 250) then takePlayerMoney(source,250) giveWeapon ( source , 31,600 ) setPedWeaponSlot(source, getSlotFromWeapon(31)) local name = getPlayerName(source) outputChatBox ( "#ffffff" .. name .. " #ffffff Has Bought weapon ...", getRootElement(), 255, 0, 0, true ) else outputChatBox("You don't have $250 to buy M4", source, 255, 0, 0, true) end end ) ------------------------------------------------ هع مو كامل طويل مره انا عطيتك امثله اخوي وانت طبق الي مافهمته قولي -------------------------
  2. بشرحلك على شوب مجرم الي مو مشفر . . . . . root = getRootElement() localPlayer = getLocalPlayer() outputChatBox("#ffffff=shop panel by MOJRM-511 | #00ff00Press F2 To Open it =",0,255,0,true)--اول ماتشغل المود رساله بشات shopWindow = guiCreateWindow(170,50,530,510,"shop panel by MOJRM-511 ",false)--اسم النفاذة guiSetVisible (shopWindow, false)--اكوادها الاخفاء والسهم وغيرها guiWindowSetSizable(shopWindow,false) guiWindowSetMovable(shopWindow,true) tabPanel = guiCreateTabPanel(11,23,599,499,false,shopWindow) ------------------------------------------------------------------------------------------------------- tab2 = guiCreateTab("buy weapons",tabPanel)--هاذا التاب رقم 2 --------- ????? 1 -line 1 ------------------------------------------------------------------------------------ guiCreateStaticImage( 10,10,90,75, "weapon/24.png", false,tab2 )-- هنا صورة السلاح weapButton_1 = guiCreateButton(10,80,90,30,"$150 deagle",false,tab2)--هنا اسمه وسعره طبعا بس مسما مو اصل الاسم والسعر الاصل راح يجينا بعد شوي guiCreateStaticImage( 110,10,90,75, "weapon/31.png", false,tab2 )--نفس الكلام شوف التاب 2 علشان يثبت في التاب2 مو يطلع برا على الشاشه weapButton_2 = guiCreateButton(110,80,90,30,"$250 M4",false,tab2)--نفس الكلام --------------------------------- guiCreateStaticImage( 210,10,90,75, "weapon/16.png", false,tab2 )--خلاص دامك عرفت ألأول عرفت البقيه بشرحلك اخر مره weapButton_3 = guiCreateButton(210,80,90,30,"$1500 Grenade ",false,tab2)--هنا السعر يكون على اليسار واليمين اسم السلاح --------------------------------- guiCreateStaticImage( 310,10,90,75, "weapon/30.png", false,tab2 )--weapon هنا الصوره يكون رقمها 30 وتكون بصيغة بنق وتكون بمجلد weapButton_4 = guiCreateButton(310,80,90,30,"$200 AK-47",false,tab2)--تم شرحه -------------------------------- guiCreateStaticImage( 410,10,90,75, "weapon/29.png", false,tab2 ) weapButton_5 = guiCreateButton(410,80,90,30,"$150 mp5",false,tab2) -------------------------2 ?????----------------------------------------------------------------------------------------------------------- guiCreateStaticImage( 10,110,90,80, "weapon/32.png", false,tab2 ) weapButton_6 = guiCreateButton(10,190,90,30,"$450 TEC-9",false,tab2 ) guiCreateStaticImage( 110,110,90,80, "weapon/34.png", false,tab2 ) weapButton_7 = guiCreateButton(110,190,90,30,"$250 Sniper",false,tab2) guiCreateStaticImage( 210,110,90,80, "weapon/28.png", false,tab2 ) weapButton_8 = guiCreateButton(210,190,90,30,"$400 Uzi",false,tab2) guiCreateStaticImage( 310,110,90,80, "weapon/46.png", false,tab2 ) weapButton_9 = guiCreateButton(310,190,90,30,"$250 Parachute ",false,tab2) guiCreateStaticImage( 410,110,90,80, "weapon/25.png", false,tab2 ) weapButton_10 = guiCreateButton(410,190,90,30,"$200 ShotGun",false,tab2) -------------------------------------------------------------------------- line 3--هع ماعليك منه ذا guiCreateStaticImage( 10,220,90,80, "weapon/26.png", false,tab2 ) weapButton_11 = guiCreateButton(10,300,90,30,"$700 Sawn-Off",false,tab2 ) guiCreateStaticImage( 110,220,90,80, "weapon/27.png", false,tab2 ) weapButton_12 = guiCreateButton(110,300,90,30,"$650 Combat",false,tab2 ) guiCreateStaticImage( 210,220,90,80, "weapon/4.png", false,tab2 ) weapButton_13 = guiCreateButton(210,300,90,30,"$500 Knif",false,tab2 ) guiCreateStaticImage( 310,220,90,80, "weapon/22.png", false,tab2 ) weapButton_14 = guiCreateButton(310,300,90,30,"$200 Pistol",false,tab2 ) guiCreateStaticImage( 410,220,90,80, "weapon/9.png", false,tab2 ) weapButton_15 = guiCreateButton(410,300,90,30,"$400 Chainsaw",false,tab2 ) --------------------------------------------------------------------------------------line 4--ماعليك منه ليني 4 هع تركه يولي guiCreateStaticImage( 10,330,90,80, "weapon/17.png", false,tab2 ) weapButton_16 = guiCreateButton(10,410,90,30,"$1200 Tear Gas",false,tab2 ) guiCreateStaticImage( 110,330,90,80, "weapon/42.png", false,tab2 ) weapButton_17 = guiCreateButton(110,410,90,30,"$400 Fire Extinguisher",false,tab2 ) guiCreateStaticImage( 210,330,90,80, "weapon/23.png", false,tab2 ) weapButton_18 = guiCreateButton(210,410,90,30,"$100 Silenced Pistol",false,tab2 ) guiCreateStaticImage( 310,330,90,80, "weapon/39.png", false,tab2 ) weapButton_19 = guiCreateButton(310,410,90,30,"$1800 Satchel Charges",false,tab2 ) guiCreateStaticImage( 410,330,90,80, "weapon/38.png", false,tab2 ) weapButton_20 = guiCreateButton(410,410,90,30,"$3000 minigun",false,tab2 ) --------------------------------------الشوب-------------------------------------------------3tab tab3 = guiCreateTab("shop",tabPanel)-- هاذا التاب الثالث يكون في النافذه يكون جنب التاب 2 هاذا جديد تحط فيه ارسل المال او اسلحه زياده او او براحتك --------------------------------------------------------------------------------------------------------- -------------------------------- ----------------------------------------------------------------------------------------------------------- bindKey ( "F2" , "down" , function()--زر الصفحه if ( guiGetVisible ( shopWindow ) == true ) then--اسم الصفحه والي تحت اكواد النافذه معروفه بدون شرح guiSetVisible ( shopWindow ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( shopWindow ) == false ) then guiSetVisible ( shopWindow ,true ) showCursor (false ) guiSetInputEnabled(true) playSound("MOJRM-511.mp3")--هنا صوت لما يفتح واحد الشوب تحط ملف صوت بأسم مجرم-511 بصيغة ام بي 3 end--نهايه end--نهاية القوس ) ------------------------------------------------------------------------------------------------------ -------------------------------------------------------------------بدايه ربط الازرار بالسيرفر server----------هاذا الي كنا نقصده في السريال في الرد الي قبل شوي addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_1 ) then -----( source == اسم الزر الي يضغطه الاعب ويجيه السلاح لازم كل زر مختلف ) ----مثال لزر -------weapButton_1 = guiCreateButton(310,410,90,30,"$1800 Satchel Charges",false,tab2 )--(weapButton_1 هوالزر ) triggerServerEvent("gived",getLocalPlayer()) --- server هاذا اسم السلاح راح يجينا في ملف end--نهايه end--نهاية القوس ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_2 ) then triggerServerEvent("givem4",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_3 ) then triggerServerEvent("givegrn",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_4 ) then triggerServerEvent("givemk",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_5 ) then triggerServerEvent("givemp5",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == weapButton_6 ) then triggerServerEvent("TEC-9",getLocalPlayer()) end end )
  3. حفظ الفلوس :: تخليه في ملف server.lua او اي اسم لاكون يكون بالميتا server هع هاذا الكلام حق مبتدأ انا مادري عنك المهم ببدأ حفظ الفلوس ---server side--- node = xmlLoadFile ("accounts.xml") function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount(source))) then local accountData = getAccountData (theCurrentAccount, "money") if (accountData) then local playerMoney = getAccountData(theCurrentAccount, "money") setPlayerMoney(source, playerMoney) else setPlayerMoney(source, 500) end end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin) function onQuit() if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData(account,"money", tostring(getPlayerMoney(source))) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) تابع حق حفظ الفلوس :: ---help.xml--- With this Saver resource, it can save your money into the server accounts.xml with no problems, errors or warnings meta>> ارسل المال :: ---clint side--- gui["comboBox"] = guiCreateComboBox(50, 20, 191, 54,"اختر لاعب للأرسل", false,tab4) --وتحط رقم التاب الي تبي يكون فيه التسجيل--tab4تستبدل for id, player in ipairs(getElementsByType("player")) do guiComboBoxAddItem(gui["comboBox"], getPlayerName(player)) end gui["label_2"] = guiCreateLabel(6, 20, 50, 13, "الاعب:", false,tab4)---وهنا نفس الكلام تشيل 4 جنب التاب وتحط رقم التاب الي لك guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") guiLabelSetColor(gui["label_2"],0,255,0) gui["label_3"] = guiCreateLabel(20, 50, 50, 15, "المال:", false,tab4)--نفس الكلام guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") guiLabelSetColor(gui["label_3"],255,0,255) gui["lineEdit"] = guiCreateEdit(80, 50, 101, 20, "", false,tab4) guiEditSetMaxLength(gui["lineEdit"],8) gui["label_4"] = guiCreateLabel(40, 125, 331, 51, "By = HaSsAn.K.s.A", false,tab4)--انا افدتك ياريت ماتشيل الحقوق كأخو مسلم أفدتك guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],255,0,0) gui["label_4"] = guiCreateLabel(30, 250, 430, 200, "اهداء الى اعز اصحابي ::", false,tab4)--كمان هنا الحقوق لاتشيلها guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],255,0,0) gui["label_4"] = guiCreateLabel(20, 270, 430, 200, "HMODY", false,tab4)--وهنا guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],51,51,255) gui["label_4"] = guiCreateLabel(70, 270, 430, 200, "AND", false,tab4)--وهنا guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],255,0,0) gui["label_4"] = guiCreateLabel(140, 270, 430, 200, "SLOOM", false,tab4)--وهنا guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],204,204,51) gui["label_4"] = guiCreateLabel(200, 270, 430, 200, "AND", false,tab4)--لاتشيلها ولاتغيرها guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],255,0,0) gui["label_4"] = guiCreateLabel(260, 270, 430, 200, "F.MK", false,tab4)--وهنا guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],255,102,102) gui["label_4"] = guiCreateLabel(330, 270, 430, 200, "MLOOKY", false,tab4)--لاتنسى تغير الرقم الي جنب التاب في كل تاب هنا جنبه 4 غيره وحط رقم التاب الي بصفحت التسجيل guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],153,153,102) guiCreateStaticImage(6,160,320,70,"a.png",false,tab4)--هاذي صوره اصرحلك تعدل عليها او تغيرها او او إالخ gui["pushButton"] = guiCreateButton(40, 90, 331, 51, "ارسال", false,tab4) -- لاتنسى تغير الرقم الي جنب تاب هع هاذي 100 مره اقولك ---------------------------------------------------------------------------------------------------------------------------------- في شي ضروري علشان تشتغل الألوان والابل وغيرها .. لازم تحط في بداية الشوب في ملف client تحط بالبدايه local gui = {} gui._placeHolders = {} GUIEditor_Label = {} وبنسبه لتسجيل وتسجيل الدخول لسى ماسويتها . .. وهاذي اكواد بتفيدك البنق الاسم السلاح السريال نسخ السريال والملابس والفلوس تفضل :: طبعا كلها حق الشوب حقي لاكن راح اعطيك اياها لاكن اهم شي الحقوق مثل ماقلتلك صرت كريم معك صير كريم معي هع .. ---client side--- playerPing = guiCreateLabel(6,10,300,70,'Your ping :',false,tab5) guiSetText ( playerPing, getPlayerPing(source)) guiLabelSetColor(playerPing,255,0,0) function refreshStats() if guiGetVisible(tab5,true) then playerPing(playerPing," "..getPlayerPing(getLocalPlayer())) else guiSetText(playerPing,"Your ping :"..getPlayerPing(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) --------------------------------By=HaSsAn.K.s.A-------------name playerName = guiCreateLabel(6,30,300,70,'Your Name :',false,tab5) guiSetText ( playerName, getPlayerName(source)) guiLabelSetColor(playerName,204,204,51) function refreshStats() if guiGetVisible(tab5,true) then playerName(playerName," "..getPlayerName(getLocalPlayer())) else guiSetText(playerName,"Your Name :"..getPlayerName(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) ---------------------------------------------By=HaSsAn.K.s.A -----------------------------------------------------Skin playerSkin = guiCreateLabel(6,50,300,70,'Your Skin :',false,tab5) guiSetText ( playerSkin, getPlayerSkin(source)) guiLabelSetColor(playerSkin,51,51,255) function refreshStats() if guiGetVisible(tab5,true) then playerSkin(playerSkin," "..getPlayerSkin(getLocalPlayer())) else guiSetText(playerSkin,"Your Skin :"..getPlayerSkin(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) ------------------------------------------------By=HaSsAn.K.s.A -----------------------------------------------------Serial playerSerial = guiCreateLabel(6,70,300,70,'Your Serial :',false,tab5) guiSetText ( playerSerial, getPlayerSerial(source)) guiLabelSetColor(playerSerial,153,153,102) function refreshStats() if guiGetVisible(tab5,true) then playerSerial(playerSerial," "..getPlayerSerial(getLocalPlayer())) else guiSetText(playerSerial,"Your Serial :"..getPlayerSerial(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) coppySerial = guiCreateStaticImage( 330,60,90,30, "f.png", false,tab5 )--هنا حط صوره صغيره اكتب فيها نسخ سريال لو ضغط عليها واحد ينسخ السريال لو ماتبيه حذفه السطر ذا ------------------------------------------------By=HaSsAn.K.s.A -----------------------------------------------------Money-playr playerMoney = guiCreateLabel(6,90,300,70,'Your Money :',false,tab5) guiSetText ( playerMoney, getPlayerMoney(source)) guiLabelSetColor(playerMoney,255,102,102) function refreshStats() if guiGetVisible(tab5,true) then playerMoney(playerMoney,"$ "..getPlayerMoney(getLocalPlayer())) else guiSetText(playerMoney,"Your Money :"..getPlayerMoney(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) ----------------------------------------------------------------------------------------------------------By=HaSsAn.K.s.A-- -----------------------------------------------------Weapon playerWeapon = guiCreateLabel(6,110,300,70,'Weapon (ID) :',false,tab5)--غير رقم التاب هع في كل مره يجيك غيره guiSetText ( playerWeapon, getPlayerWeapon(source)) function refreshStats() if guiGetVisible(tab5,true) then playerWeapon(playerWeapon,""..getPlayerWeapon(getLocalPlayer())) else guiSetText(playerWeapon,"Weapon (ID) :"..getPlayerWeapon(getLocalPlayer())) end end addEventHandler("onClientRender", getRootElement(), refreshStats) ----------------------------------------------------------------------By=HaSsAn.K.s.A بنسبه لنسخ السريال تحتاج الى :: كود تحطه في قسم ربط الأزرار هاذا الكود ---------------By=hAsSaN.k.S.a function onGuiClick (button, state, absoluteX, absoluteY)--الوظيفة والربط if source == coppySerial then --(coppySerial هاذا يكون اسم الزر ) setClipboard ( "" .. getPlayerSerial(source) .. "" )---هنا المصدر end--نهايه end--نهاية القوس addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick)
  4. تفضل اخوي : أ = -1928.7668457031 , 2577.3129882813, 419.80780029297 ب = -1925.7059326172, 2547.720703125,419.80780029297 وشكرا..
  5. امووواح .. احب السيرفرات الي كيذا .. بتوفيق حبي..
  6. وشكرا سنايبر وcx.38 على المساعده ياريت تكملون جميلكم ..
×
×
  • Create New...