Jump to content

Joker_Mta

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by Joker_Mta

  1. لما تحط الوقت بحذف ألأكواد ماريده ينتشر
  2. تفضل = ---------تم الحل-------- تسلم اياديك عساه في ميزان حسناتك
  3. ماعندي اي معلومه في برمجة مودات الريس ولا افهمله ابد
  4. هههههههه اوك والله فكرت مامنه فايده ابد معلومه مفيده شوف اريدك تضيف وقت لهاذا الكود يعني الكلام يكون 5 ثواني فوق الاعب ويختفيتسلم مشكور ماقصرت بتوفيق ---------تم الحل-------- تسلم اياديك عساه في ميزان حسناتك
  5. تسلم اياديك خوي عناد ماقصرت تعبتك معي
  6. والله للحين الخطأ تأكد انت وتأكد من ملف سيرفر ممكن منه مع اني ماحركت شي ابد في ملف سيرفر خذ وجرب سلينت setTimer( function() playerList = guiCreateGridList(6, 6, 140, 380, false, tab2) 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(160,150,200,30,"",false,tab2) amountEdit = guiCreateEdit(160,200,100,30,"",false,tab2) sendBTN = guiCreateButton(150,280,130,36, "send", false,tab2) 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) السيرفر 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 )
  7. شغال وكل شي لاكن مايرسل خذ ألأكواد + الخطأ --window=tab2 setTimer( function() playerList = guiCreateGridList(6, 6, 140, 380, false, tab2) guiGridListSetSelectionMode(playerList, 2) local cl = guiGridListAddColumn(playerList, "Players List ...", 0.85) if ( cl and guiGetVisible(tab2) == 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(160,150,200,30,"",false,tab2) amountEdit = guiCreateEdit(160,200,100,30,"",false,tab2) sendBTN = guiCreateButton(150,280,130,36, "send", false,tab2) --link button function onClickPlayerName () local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) guiSetText(nemeEdit, neme)-----جاني الخطأ هنا guiSetText end addEventHandler("onClientGuiClick",getRootElement(), function() if ( source == sendBTN ) then playerNick = guiGetText(nameEdit) amount = guiGetText(amountEdit) triggerServerEvent("onSendMoney", getLocalPlayer(), playerNick, amount) end end)
  8. السلام عليكم ورحمة الله وبركاته شباب عندي مشكله في ارسال المال انا اريد اركبه في الشوب لما اركبه ماقدر اختار لاعبين يعني السهم على فوق فقط ماقدر اشوف الاعبين مافي سهم على تحت gui["comboBox"] = guiCreateComboBox(70, 85, 191, 54,"اختر لاعب للأرسل", false, gui["_root"]) for id, player in ipairs(getElementsByType("player")) do guiComboBoxAddItem(gui["comboBox"], getPlayerName(player)) end هاذا ربط الزر addEventHandler("onClientGUIClick", getRootElement(), function(a,b,c,d) if source == gui["pushButton"] and guiComboBoxGetItemText(gui["comboBox"],guiComboBoxGetSelected(gui["comboBox"])) ~= "Select a player" then local getComboPlayer = guiComboBoxGetItemText(gui["comboBox"],guiComboBoxGetSelected(gui["comboBox"])) local getMoneyToSend = guiGetText(gui["lineEdit"]) if getComboPlayer and getMoneyToSend then triggerServerEvent("onPlayerReceiveMoney",localPlayer,getComboPlayer,getMoneyToSend) end end end ) ولو في افضل منه اعطوني بركب في الشوب لو يكون لسته افضل وان شاء الله اكون ماتعبتكم
  9. طيب ممكن تخلي ذا الكود لليزر يشتغل على طول اول مايدخل الاعب مو لازم يكتب في اف8 Client-- -- laserpointer client.lua -- by vick --[[ Player Element Data -- changing these to an invalid value can break this script "laser.on" -- tells you player has turned laser on "laser.aim" -- tells you player is aiming and laser is drawn "laser.red", "laser.green", "laser.blue", "laser.alpha" Exported Functions: SetLaserEnabled(player, state) -- (element:player, bool:state) -- returns false if invalid params, true otherwise IsLaserEnabled(player) -- (element:player) -- returns true or false SetLaserColor(player, r,g,b,a) -- (element:player, int:r, int:g, int:b, int:a) -- returns true GetLaserColor(player) -- (element:player) -- returns r,g,b,a (int:) or false but shouldnt happen. IsPlayerWeaponValidForLaser(player) -- (element:player) -- returns true or false ]] local dots = {} -- store markers for each players laser pointer CMD_LASER = "laser" -- command to toggle laser on/off CMD_LASERCOLOR = "lasercolor" -- command to change laser color laserWidth = 2 -- width of the dx line dotSize = .05 -- size of the dot at the end of line localPlayer = getLocalPlayer() -- for colorpicker picklasercolor = 0 colorPickerInitialized = 0 oldcolors = {r=255,g=0,b=0,a=255} addEventHandler("onClientResourceStart", getRootElement(), function(res) if res == getThisResource() then outputChatBox("laserpointer by vick loaded", 245,0,0) SetLaserEnabled(localPlayer, true) SetLaserColor(localPlayer, oldcolors.r,oldcolors.g,oldcolors.b,oldcolors.a) if colorPickerInitialized == 0 then -- attempt to init colorpicker stuff initColorPicker() end elseif res == getResourceFromName("colorpicker") then if colorPickerInitialized == 0 then -- attempt to init colorpicker stuff initColorPicker() end end end ) addEventHandler("onClientResourceStop", getRootElement(), function(res) if res == getThisResource() then outputChatBox("unloaded laserpointer", 245,0,0) SetLaserEnabled(localPlayer, false) end end ) addEventHandler("onClientElementDataChange", localPlayer, function(dataName, oldValue) if getElementType(source) == "player" and source == localPlayer and dataName == "laser.on" then local newValue = getElementData(source, dataName) if oldValue == true and newValue == false then unbindKey("aim_weapon", "both", AimKeyPressed) elseif oldValue == false and newValue == true then bindKey("aim_weapon", "both", AimKeyPressed) end end end ) addEventHandler( "onClientRender", getRootElement(), function() local players = getElementsByType("player") for k,v in ipairs(players) do if getElementData(v, "laser.on") then DrawLaser(v) end end end ) addEventHandler( "onClientPreRender", getRootElement(), function() local players = getElementsByType("player") for k,v in ipairs(players) do if getElementData(v, "laser.on") then --DrawLaser(v) end end end ) function AimKeyPressed(key, state) -- attempt to sync when aiming with binds, getPedControlState seems weird... if state == "down" then setElementData(localPlayer, "laser.aim", true, true) elseif state == "up" then setElementData(localPlayer, "laser.aim", false, true) end --outputChatBox(key .. " " .. state) end function DrawLaser(player) if getElementData(player, "laser.on") then local targetself = getPedTarget(player) if targetself and targetself == player then targetself = true else targetself = false end if getElementData(player, "laser.aim") and IsPlayerWeaponValidForLaser(player) == true and targetself == false then local x,y,z = getPedWeaponMuzzlePosition(player) if not x then outputDebugString("getPedWeaponMuzzlePosition failed") x,y,z = getPedTargetStart(player) end local x2,y2,z2 = getPedTargetEnd(player) if not x2 then --outputDebugString("getPedTargetEnd failed") return end local x3,y3,z3 = getPedTargetCollision(player) local r,g,b,a = GetLaserColor(player) if x3 then -- collision detected, draw til collision and add a dot dxDrawLine3D(x,y,z,x3,y3,z3, tocolor(r,g,b,a), laserWidth) DrawLaserDot(player, x3,y3,z3) else -- no collision, draw til end of weapons range dxDrawLine3D(x,y,z,x2,y2,z2, tocolor(r,g,b,a), laserWidth) DestroyLaserDot(player) end else DestroyLaserDot(player) -- not aiming, remove dot, no laser end else DestroyLaserDot(player) end end function DrawLaserDot (player, x,y,z) if not dots[player] then dots[player] = createMarker(x,y,z, "corona", .05, GetLaserColor(player)) else setElementPosition(dots[player], x,y,z) end end function DestroyLaserDot(player) if dots[player] and isElement(dots[player]) then destroyElement(dots[player]) dots[player] = nil end end function SetLaserColor(player,r,g,b,a) setElementData(player, "laser.red", r) setElementData(player, "laser.green", g) setElementData(player, "laser.blue", b) setElementData(player, "laser.alpha", a) return true end function GetLaserColor(player) r = getElementData(player, "laser.red") g = getElementData(player, "laser.green") b = getElementData(player, "laser.blue") a = getElementData(player, "laser.alpha") return r,g,b,a end function IsPlayerWeaponValidForLaser(player) -- returns false for unarmed and awkward weapons local weapon = getPedWeapon(player) if weapon and weapon > 21 and weapon < 39 and weapon ~= 35 and weapon ~= 36 then return true end return false end function SetLaserEnabled(player, state) -- returns false if invalid params passed, true if successful changed laser enabled if not player or isElement(player) == false then return false end if getElementType(player) ~= "player" then return false end if state == nil then return false end if state == true then -- enable laser setElementData(player, "laser.on", true, true) setElementData(player, "laser.aim", false, true) --bindKey("aim_weapon", "both", AimKeyPressed) -- done in onClientElementDataChange return true elseif state == false then -- disable laser setElementData(player, "laser.on", false, true) setElementData(player, "laser.aim", false, true) --unbindKey("aim_weapon", "both", AimKeyPressed) -- done in onClientElementDataChange return true end return false end function IsLaserEnabled(player) -- returns true or false based on player elementdata "laser.on" if getElementData(player, "laser.on") == true then return true else return false end end function ToggleLaserEnabled(cmd) player = localPlayer if IsLaserEnabled(player) == false then SetLaserEnabled(player, true) outputChatBox("laser on", 245,0,0) else SetLaserEnabled(player, false) outputChatBox("laser off", 245,0,0) end end function ChangeLaserColor(cmd, r,g,b,a) local player = localPlayer if colorPickerInitialized == 1 and getResourceFromName("colorpicker") then oldcolors.r, oldcolors.g, oldcolors.b, oldcolors.a = GetLaserColor(player) picklasercolor = 1 if exports.colorpicker:requestPickColor(true,true,"Choose Laser Color",oldcolors.r,oldcolors.g,oldcolors.b,oldcolors.a) == false then exports.colorpicker:cancelPickColor() return false end return true else if r and g and b and a then r,g,b,a = tonumber(r), tonumber(g), tonumber(b), tonumber(a) if r and g and b and a then if r < 0 or g < 0 or b < 0 or a < 0 or r > 255 or g > 255 or b > 255 or a > 255 then outputChatBox("Invalid colors: (0-255) usage: /" ..CMD_LASERCOLOR.. " r g b a", 245,0,0) return false else outputChatBox("Changed Laser Color to: "..r.." "..g.." "..b.." ".. a, r,g,b) SetLaserColor(player,r,g,b,a) return true end end end end outputChatBox("Invalid colors: (0-255) usage: /" ..CMD_LASERCOLOR.. " r g b a", 245,0,0) return false end addCommandHandler(CMD_LASER, ToggleLaserEnabled) addCommandHandler(CMD_LASERCOLOR, ChangeLaserColor) -- if color picker resource running, initialize events for it function initColorPicker() if getResourceFromName("colorpicker") == false then return false end addEventHandler("onClientPickedColor", localPlayer, function(r,g,b,a) if picklasercolor == 1 then SetLaserColor(source,r,g,b,a) end end ) addEventHandler("onClientCancelColorPick", localPlayer, function() if picklasercolor == 1 then SetLaserColor
  10. تسلم ربي يعطيك الف عافيه
  11. حبيبي مركب هاك اتوقع او mx عندك مترفع الـ الله وعلم لاكن لو هاك حذفه مستحيل يشتغل في ذا الاصدار مالك في الطويله اذا هاك حذفه واذا مو هاك الله العالم
  12. اوك حبيبي اريد اذا شخص ضغط على زر يتوجه للبدايه ياريت فهمت
  13. انا اريد اعمل ساعدني في زر واحد
  14. وفي شي ثاني : ---------------------------buttons spawn---------------- tem5 = guiCreateButton(10,190,90,30,"tem5",false,SpawnPanel ) ---------------------------Link buttons spawn---------------- function onGuiClick (button, state, absoluteX, absoluteY) if source == tem5 then setElementPosition ( source, 0, 0, 0 ) setElementPosition ( source, true ) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick)
  15. بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاته انا ودي اصنع سكربت السباون التنقل عند ضغط زر انا بخليه كـ أول سكربت لي المهم الي عرفته انا : ---------------------------buttons spawn---------------- tem5 = guiCreateButton(10,190,90,30,"tem5",false,SpawnPanel ) ---------------------------Link buttons spawn---------------- function onGuiClick (button, state, absoluteX, absoluteY) if source == tem5 then "2192.2094726563" y="1676.8177490234" z="12.328513145447" rot="91.98" /> end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) شباب بنسبه لأول سكربت لي يعني ياريت تعدلونه وتشرحون لي بعض ألأشياء وشكرا Please help edit script first
  16. addEvent("openWindow",true) function open() guiSetVisible(theWindow, true) showCursor(true) end addEventHandler("OpenWindow", getRootElement(),open) theWindow = guiCreateWindow(170,50,530,510,"panel ",false, theWindow) guiSetVisible (theWindow, false) اروح لدايره ماتفتح النافذه للحين العطل
  17. تابل نفس الكلام شباب وضحولي شوي يعني لو تسوون صفحه بس a = guiCreateWindow(541,146,253,300,"panel",false) addEvent("OpenWindow", true) addEventHandler("OpenWindow", root, function () if not guiGetVisible(a) then guiSetVisible(a, true) showCursor(true) else guiSetVisible(a, false) showCursor(false) end end)
  18. واجهة مشكله اذا الصفحه تطلع حق الكل اول ماشغل المود :: شوف اعطيني مثال على نافذه فاضيه انا الس سويته : addEvent("openWindow",true) function open() guiSetVisible(theWindow, true) showCursor(true) end addEventHandler("OpenWindow", getRootElement(),open) theWindow = guiCreateWindow(170,50,530,510,"panel ",false, theWindow)
  19. مشكورين تعبتكم معاي عساكم بجنات الفردوس بتوفيق
  20. اوك تسلم وماقصرت لاكن الطلب الثاني ابغى يكون دائره صفره مثلا واذا دخلها الشرطه يفتحله الوحه واذا كان مكلف ومتع مو لازم تسويه وشكرا
  21. السلام عليكم ورحمة الله وبركاته ........... شباب انا ابغى كود لو سويت نافذه مايفتحها غير الا الشرطي يعني مثلا انا سويت لوحة تحكم لشرطه اريد يكونو الشرطه بس هم الي يفتحوها shr6h مثلا انا مسمي رتبت الشرطه في الاسل كيذا انا اريد مايفتحون النافذه الا الي معهم هاذي الرتبه ياريت وصلت لكم المعلومه ومشكورين مقدماً
×
×
  • Create New...