Jump to content

nony

Members
  • Posts

    235
  • Joined

  • Last visited

Everything posted by nony

  1. يب اعرف انا بس ابي اشوف الكود صح ولا خطأ بعدين اسوي الاسم انجليزي
  2. كفو والله يا شنب موضوع اكثر من رائع راح استفيد منه كثيرر جزاك الله الف خير
  3. الخطا الي هو اسم النافذه غلط هذا تحط اي شي لكن لازم تكون زي بعض تقصد كذا كلنت addEventHandler ("onClientGUIClick", getRootElement(), function()---????? if ( source == اسم الزر) then triggerServerEvent("JetPack",getLocalPlayer()) setTimer ( function()---????? outputChatBox ( "JetPack end 5 second " ) end, 5000, 1 ) end end ) سيرفر addEvent("JetPack",true) addEventHandler("JetPack", root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1500) then ---التأكد اذا كان معه 1500 او اكثر takePlayerMoney(source,1500)---اخذ 1500 من فلوسه outputChatBox ( "%!%!%!%!%!%", getRootElement(), 255, 0, 0, true )---اذا اشترا السلاح يجي كلام في الشات else outputChatBox("you Don't have enough Money", source, 255, 0, 0, true)-- اذا فلوسه ماتكفي end end )
  4. الكود الي اولا سيرفر ذا كلينت addEventHandler ("onClientGUIClick", getRootElement(), function()---????? if ( source == اسم الزر) then triggerServerEvent("اسم النافذه",getLocalPlayer()) setTimer ( function()---????? outputChatBox ( "JetPack end 5 second " ) end, 5000, 1 ) end end ) في اي خطأ؟؟؟
  5. ههههههه ولا يهمك كذا حلو؟ اذا فيه خطأ قلي addEvent("اسم النافذه",true) addEventHandler("اسم النافذه", root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1500) then ---التأكد اذا كان معه 1500 او اكثر takePlayerMoney(source,1500)---اخذ 1500 من فلوسه outputChatBox ( "%!%!%!%!%!%", getRootElement(), 255, 0, 0, true )---اذا اشترا السلاح يجي كلام في الشات else outputChatBox("you Don't have enough Money", source, 255, 0, 0, true)-- اذا فلوسه ماتكفي end end )
  6. ذا الي سويته الى الان addEvent("اسم النافذه",true) addEventHandler("اسم النافذه", root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1500) then ---التأكد اذا كان معه 1500 او اكثر takePlayerMoney(source,1500)---اخذ 1500 من فلوسه outputChatBox ( "%!%!%!%!%!%", getRootElement(), 255, 0, 0, true )---اذا اشترا السلاح يجي كلام في الشات else outputChatBox("you Don't have enough Money", source, 255, 0, 0, true)-- اذا فلوسه ماتكفي end end )
  7. اخذ الفلوس من الاعب كذا صح؟ function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1500) then ---التأكد اذا كان معه 1500 او اكثر takePlayerMoney(source,1500)---اخذ1500 من فلوسه outputChatBox ( "%!%!%!%!%!%", getRootElement(), 255, 0, 0, true )---اذا اشترا السلاح يجي الكلام في الشات else outputChatBox("you Don't have enough Money", source, 255, 0, 0, true)-- اذا فلوسه ماتكفي end end )
  8. شكراااا جزاك الله الف خير يا كفوو
  9. كيف اربط بين الكلينت والسيرفر؟ او بين السيرفر والكلينت
  10. الوظائف setTimer createProjectile -- يطللع قنابل من السلاح , صواريخ الخ .. takePlayerMoney -- اخذ فلوس اللاعب ( المبلغ الي تبيه ) ــ الحدث onClientPedWeaponFire الوظائف setTimer setElementHealth takePlayerMoney -- اخذ فلوس اللاعب ( المبلغ الي تبيه ) ــ الحدث onClientPlayerDamage الوظائف setVehicleRotation takePlayerMoney -- اخذ فلوس اللاعب ( المبلغ الي تبيه ) ــ الحدث onClientGUIClick بعد صناعة الزر الوظائف setTimer givePedJetPack takePlayerMoney -- اخذ فلوس اللاعب ( المبلغ الي تبيه ) ــ الحدث onClientGUIClick بعد صناعة الزر شكرااا الله يوفقك وبحاول اسويها ان شاء الله
  11. السلام عليكم ورحمه الله وبركاته يا شباب ابقا اكواد للشوب الاكواد اليزر + الي يخلي السلاح يطلق نار سوبر نار + وسوبر مان الي يخليك ماتموت + تصليح السياره والي يعدل السياره من الانقلاب + والنفاثه ذي 5 اكواد ان شاء الله ماتعبكم معي
  12. شكراااااااااا عناد الله يوفقك يا شنب ساعتني كثير تسلم يا غالي
  13. السلام عليكم ورحمه الله وبركاته يا شباب عندي كود ارسال الفلوس مايجي فيه اسماء الاعبين ذا الكود client.lua --------------------------------------------------------------------------------------- tab7 = guiCreateTab("Send Money",tabPanel) ---------------------------------------------------------------------------------------- setTimer( function() playerList = guiCreateGridList(2, 2, 250, 490, false, tab7) guiGridListSetSelectionMode(playerList, 2) local cl = guiGridListAddColumn(playerList, "Players List ...", 0.85) if ( cl and guiGetVisible(gui["_root"]) == true ) then for _,name in ipairs(getElementsByType("player")) do local rw = guiGridListAddRow(playerList) guiGridListSetItemText(playerList, rw, cl, getPlayerName(name), false, false) end addEventHandler("onClientGUIClick", playerList, onClickPlayerName) end end ,4000,0) nameEdit = guiCreateEdit(290,50,200,30,"",false,tab7) player = guiCreateLabel(365,30,300,100,' player: ',false,tab7) guiSetText ( player, getPlayerPing(source)) guiLabelSetColor(player,255,255,100) amountEdit = guiCreateEdit(335,115,100,30,"",false,tab7) money = guiCreateLabel(360,95,300,100,' money: ',false,tab7) guiSetText ( money, getPlayerPing(source)) guiLabelSetColor(money,255,255,100) sendBTN = guiCreateButton(320,165,130,36, "send", false,tab7) function onClickPlayerName () local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) guiSetText(nameEdit, name) end addEventHandler("onClientGUIClick",getRootElement(), function() if ( source == sendBTN ) then playerNick = guiGetText(nameEdit) amount = guiGetText(amountEdit) triggerServerEvent("onSendMoney", getLocalPlayer(), playerNick, amount) end end) server.lua ----------------------------------------- addEvent("onSendMoney", true) addEventHandler("onSendMoney", getRootElement(), function(who, player) local money = getPlayerMoney(source) if tonumber(player) >= 200 then if tonumber(player) <= money then toWho = getPlayerFromName(who) if toWho ~= false then givePlayerMoney(toWho, player) takePlayerMoney(source, player) name = getPlayerName(source) outputChatBox("* You have given money amount of: #00ff00$" .. player .. " #0099ccto: #ff0000" .. who, source, 0, 150, 255, true) outputChatBox("* ".. name .. " #ff0000has given you money amount of: #00ff00$" .. player .. " #ff0000!", toWho, 255, 0, 0, true) else outputChatBox("* Player did not exist !", source, 255, 0, 0) end else outputChatBox("* you dont have enough money !", source, 255, 0, 0) end else outputChatBox("* the Less amount must be #00ff00$200 !", source, 255, 0, 0) end end ) ------------------------------------------------ وش الخطأ في الكود؟؟؟
  14. السلام عليكم ورحمه الله وبركاته يا شباب عندي مود في مشكله المود اول مايدخل الاعب تجيه اماكن يختار منها اي واحد بس المشكله اذا اختار مكان الصوره تبقا معلقه على المكان gui.lua newFont = guiCreateFont ( "customfont.ttf", 20 ) function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end ----------------------------------------------------- ------spawn point ---------------------------------------------------- local x, y = guiGetScreenSize() SpawnWnd = guiCreateWindow(550, y / 3 - 0, 230, 180, "لوحة البدايات || By x===|RYAN|===x ", false) guiSetVisible(SpawnWnd, false) SpawnGrid = guiCreateGridList(20, 30, 190, 110, false, SpawnWnd) Column = guiGridListAddColumn(SpawnGrid, "الأمـاكـن ", 0.9) row1 = guiGridListAddRow(SpawnGrid) row2 = guiGridListAddRow(SpawnGrid) row3 = guiGridListAddRow(SpawnGrid) row4 = guiGridListAddRow(SpawnGrid) row5 = guiGridListAddRow(SpawnGrid) guiGridListSetItemText(SpawnGrid, row1, Column, "1- البــدايـة الرئـيـسـيـة |●|", false, true) guiGridListSetItemText(SpawnGrid, row2, Column, "2- بــدايـة الـطـعـس |●|", false, true) guiGridListSetItemText(SpawnGrid, row3, Column, "3- بــدايـة سـاحـة الـقـتـال |●|", false, true) guiGridListSetItemText(SpawnGrid, row4, Column, "4- بــدايـة الـدائـــري |●|", false, true) guiGridListSetItemText(SpawnGrid, row5, Column, "5- بــدايـة الـشـارع الـطـويـل |●|", false, true) SpawnButton = guiCreateButton(55, 145, 120, 20, "اختيار", false, SpawnWnd) function ActionClick() if source == SpawnGrid then local grid = guiGridListGetSelectedItem(SpawnGrid) local getgrid1 = guiGridListGetItemText(SpawnGrid, grid, Column) if not grid or not getgrid1 then return end ShowCamera(getgrid1) else if source == SpawnButton then local grid = guiGridListGetSelectedItem(SpawnGrid) local getgrid = guiGridListGetItemText(SpawnGrid, grid, Column) if not grid or not getgrid then return end if getgrid == "" then return end triggerServerEvent("SpawnMe", localPlayer, getgrid,getElementModel(ped)) guiSetVisible(SpawnWnd, false) setTimer(destroyElement, 500, 1, ped) destroyElement(bin) showCursor(false) visble() end end end addEventHandler("onClientGUIClick", root, ActionClick) function ShowCamera (getgrid1) if getgrid1 == "1- البــدايـة الرئـيـسـيـة |●|" then setCameraMatrix (-3707.19458, -3086.20947, 93.65739) elseif getgrid1 == "2- بــدايـة الـطـعـس |●|" then setCameraMatrix(-2541.21655, -2897.66601, 18.39924) elseif getgrid1 == "3- بــدايـة سـاحـة الـقـتـال |●|" then setCameraMatrix(-2854.25512, -2912.02514, 38.53991) elseif getgrid1 == "4- بــدايـة الـدائـــري |●|" then setCameraMatrix(1785.9481201172, 837.67370605469, 10.671875) elseif getgrid1 == "5- بــدايـة الـشـارع الـطـويـل |●|" then setCameraMatrix(-3070.94921, -3083.84301, 45.22809) end end function StartRenderDisplay() Slect = guiCreateStaticImage(0, 0, 1, 1, "Wnd.png", true) setTime(12, 0) setWeather(3) setCloudsEnabled(false) ped = createPed(46, 2909.4663085938, -2347.1797578125, 201.4604486084, 90) setElementFrozen(ped, true) setSkyGradient(105, 140, 120, 190, 130, 150) fadeCamera(true) timeshow = setTimer(showCursor, 500, 0, (guiGetVisible(Slect))) bin = createObject(1337, 2909.5014648438, -2347.2185058594, 200.16800079346, 90, 0, 0) setElementAlpha(bin, 0) setTimer(discoTime1, 500, 1) setPedAnimation(ped, "STRIP", "PUN_LOOP", -1, true, false, true) end function discoTime1() if not ped then return end setTimer(setPedRotation, 50, 1, ped, getPedRotation(ped) + 5) discTimer1 = setTimer(discoTime2, 50, 1) end function discoTime2() if not ped then return end setTimer(setPedRotation, 50, 1, ped, getPedRotation(ped) + 5) discTimer2 = setTimer(discoTime1, 50, 1) end function StopRenderDisplay() destroyElement(Slect) kill() setElementAlpha(ped, 0) destroyElement(sound) setTime(12, 0) setWeather(3) resetSkyGradient() showChat(true) guiSetVisible(SpawnWnd, true) radar = guiCreateStaticImage(0, 0.751666666666, 0.22125, 0.248333333333, "radar.png", true) guiMoveToBack(radar) showPlayerHudComponent("all", true) end function onStop() resetSkyGradient() showChat(true) showPlayerHudComponent("all", true) setElementData(localPlayer, "IsSpawned", false) end addEventHandler("onClientResourceStop", resourceRoot, onStop) function click(l_6_0, l_6_1, l_6_2, l_6_3) local l_6_4, l_6_5 = fixScreen(544, 660) local l_6_6, l_6_7 = fixScreen(960, 705) local l_6_8, l_6_9 = fixScreen(80, 660) local l_6_10, l_6_11 = fixScreen(110, 700) local l_6_12, l_6_13 = fixScreen(435, 660) local l_6_14, l_6_15 = fixScreen(470, 699) if source ~= Slect then return end if l_6_4 < l_6_2 and l_6_2 < l_6_6 and l_6_5 < l_6_3 and l_6_3 < l_6_7 then StopRenderDisplay() setCameraMatrix(-2865.09838, 1488.72497, 155.71398, -2261.01758, 2327.17847, 19.21039) elseif l_6_8 < l_6_2 and l_6_2 < l_6_10 and l_6_9 < l_6_3 and l_6_3 < l_6_11 then goLeft() elseif l_6_12 < l_6_2 and l_6_2 < l_6_14 and l_6_13 < l_6_3 and l_6_3 < l_6_15 then goRight() end end addEventHandler("onClientGUIClick", root, click) ---------------- --go left and right --------------- function goRight() newSkin = getElementModel(ped) + 1 local x, y, z = getElementPosition(ped) createExplosion(x, y, z - 1.3, 12, true, 0.2, false) while not setElementModel(ped, newSkin) do newSkin = newSkin + 1 end end function goLeft() newSkin = getElementModel(ped) - 1 local x, y, z = getElementPosition(ped) createExplosion(x, y, z - 1.3, 12, true, 0.2, false) while not setElementModel(ped, newSkin) do newSkin = newSkin - 1 end end function visble() if isTimer(timeshow) then killTimer(timeshow) setTimer(showCursor, 500, 1, false) kill() end end function kill() if isTimer(discTimer1) then killTimer(discTimer1) if isTimer(discTimer2) then killTimer(discTimer2) end end end function fixScreen(l_11_0, l_11_1) local l_11_2, l_11_3 = guiGetScreenSize() local l_11_4 = math.floor(l_11_0 * l_11_2 / 1024) local l_11_5 = math.floor(l_11_1 * l_11_3 / 768) return l_11_4, l_11_5 end ----------- --logo ------------ local logoo = guiCreateStaticImage(0, 0, 1, 1, "logo.png", true) guiSetVisible(logoo, false) showChat(false) setTimer(function() guiSetAlpha(logoo, tonumber(0)) guiSetVisible(logoo, true) showPlayerHudComponent("all", false) fadeCamera(true) setCameraMatrix(2906.0004882813, -2347.9750976563, 201.94299316406, 2906.9938964844, -2348.0361328125, 201.84664916992) sound = playSound("sound.mp3", true) local Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.1)) end, 150, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.2)) end, 250, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.3)) end, 350, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.4)) end, 450, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.5)) end, 650, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.6)) end, 740, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.7)) end, 900, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.-- s8) -->) end, 1000, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(0.9)) end, 1800, 1, true) Timer = setTimer Timer(function() guiSetAlpha(logoo, tonumber(1))
  15. nony

    طلب كود

    شكراااا الله يجزاكم الف خير الله يتقبل صيامكم
  16. nony

    طلب كود

    طيب كيف احفظ الاشياء الي سويتها؟ ووين القاها؟
  17. يسلموووو حسون + تابل على التعديل الحين اشتغل تمام
  18. هههههههههههه ذا نيترو الي في الشوب بس عدلت عليه الحين اعطيك كودات
  19. كذا صح ولا خطأ؟ كلنت buttons.nitro10x = guiCreateButton(20,10,90,75, "Nitro 10x", false, tap3) labels.price_nitro10x = guiCreateLabel(20,80,90,30, "R$:1.800", false, tap3) guiLabelSetHorizontalAlign(labels.price_nitro10x, "center", false) guiSetFont(labels.price_nitro10x, "default-bold-small") guiSetProperty( buttons.nitro10x, "HoverTextColour", "FFFFFF00" ) --------------ربط الازرار------------------ elseif (source == buttons.nitro10x) then player = localPlayer local price_nitro10x = 500 money = getPlayerMoney (source) سيرفر if (money >= price_nitro10x) and getPedOccupiedVehicle(player) then outputChatBox ("You bought #FF0000Nitro 10x #FFFFFFfor #00ff00$#FF0000"..price_nitro10x.."", 255, 255, 255, true) takePlayerMoney(price_nitro10x) addVehicleUpgrade( getPedOccupiedVehicle(player), 1010 ) elseif money <= 1800 then outputChatBox("You dont have enough money to buy Nitro 10x.", 255, 0, 0) elseif not getPedOccupiedVehicle(player) then outputChatBox("You should be in a vehicle.", 255, 0, 0) end end)
  20. يا شباب بغيت اسأل ذا الكود في خطأ؟ buttons.nitro10x = guiCreateButton(20,10,90,75, "Nitro 10x", false, tap3) labels.price_nitro10x = guiCreateLabel(20,80,90,30, "R$:1.800", false, tap3) guiLabelSetHorizontalAlign(labels.price_nitro10x, "center", false) guiSetFont(labels.price_nitro10x, "default-bold-small") guiSetProperty( buttons.nitro10x, "HoverTextColour", "FFFFFF00" ) ----------------ربط الازرار---------------- elseif (source == buttons.nitro10x) then player = localPlayer local price_nitro10x = 500 money = getPlayerMoney (source) if (money >= price_nitro10x) and getPedOccupiedVehicle(player) then outputChatBox ("You bought #FF0000Nitro 10x #FFFFFFfor #00ff00$#FF0000"..price_nitro10x.."", 255, 255, 255, true) takePlayerMoney(price_nitro10x) addVehicleUpgrade( getPedOccupiedVehicle(player), 1010 ) elseif money <= 1800 then outputChatBox("You dont have enough money to buy Nitro 10x.", 255, 0, 0) elseif not getPedOccupiedVehicle(player) then outputChatBox("You should be in a vehicle.", 255, 0, 0) end end) وفيه كود لسيرفر ولا لا؟
  21. nony

    طلب كود

    سو لوححات عن ططريق ذا https://community.multitheftauto.com/ind ... ils&id=141 شكراااااااا على المود والله حلو + سهل
  22. والله انا طبقت على الكودات الي قبل ومعليش على الخطأ
  23. كلنت BTN2 = guiCreateButton(580,280,90,30,"Kills and Deaths",false,tab4) ---------------------ربط الازرار---------------- addEventHandler("onClientGUIClick",root,function() if source == BTN2 then triggerServerEvent("Kills and Deaths",localPlayer) end end) سيرفر addEvent("Show Kills and Deaths",true) addEventHandler("Show Kills and Deaths",root,function() local Name,Killer = getPlayerName(source),getPlayerKiller(source) outputChatBox(Name.." has Kills and Deaths "..Killer,root,255,255,255,true) end)
×
×
  • Create New...