Jump to content

YourMind

Members
  • Posts

    347
  • Joined

  • Last visited

Everything posted by YourMind

  1. هابسطهالك بس يارب تفهم قصدي استخدم فنكشن setElementHealth لما تيجي تفتح القوسين في الفنكشن جيب دم الاعب بأستخدام getElementHealth و اجمع دمه الحالي اللي انت جبته ب 20 او اي رقم انت عايزه كدة اداله دم 20 علي دمه
  2. sql اعتقد دة مود العاجل بتاع جعفر فيه خاصية حفظ يعني اكيد بيتحفظوا لو مش بيتحفظوا افتح الديبج و قول اللي طلع اللي في كود الاس كيو لايت table غير التريجرات و المسج داتا و اسم ال
  3. guiSetInputEnabled منا قولتلك ضيف ضيفه في كودك guiSetInputEnabled(false) دة لو هاتقفل اللوحة guiSetInputEnabled(true) دة لو هاتفتح اللوحة
  4. بالنسبة للصورة حطها كدة images = guiCreateStaticImage(10, 58, 34, 34, "images/8.png", false, window1) و هنا addEventHandler('onClientMarkerHit',root, function (ss) if ( source == Marker ) and ( ss == localPlayer ) then elseif guiSetInputEnabled(Enabled) showCursor(true) guiSetVisible(window1,true) end end ) هو لاعب (ss) بأن اللي لمس الماركر getElementType لازم تحقق بأستخدام الفنكشن (localPlayer) هو الاعب المحلي (ss) و ان الاعب دة elseif مالهاش لازمة عندك امسحها guiSetInputEnabled(true شغال, false مطفي) -- @1XxCr{o}sS كودك مازال خطأ
  5. X alpha الشفافية هي ال يعني تحدد الماركر يكون ظاهر ولا لأ تدريجياً من صفر الي 255 لو صفر او مش موجودة او مش متعرفة يكون الماركر شفاف انما لو 100 مثلاً يكون ظاهر شوية و خفيف لو 200 يكون ظاهر اكتر لو 255 يكون ظاهر تماماً لازم تحدد للماركر شفافية عشان يكون ظاهر و تعرف مكانه بالنسبة لكودك هاعرفك غلطك addEventHandler("onClientMarkerHit", Root, function(ss) if ( source == Marker ) and ( ss == localPlayer ) then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end ) -- Root المفروض اول حرف يكون سمول *small* function (ss) -- للي لمس الماركر سواء كان لاعب او بيد او اي شئ parameter | ممكن تسميه اي حاجة انت عايزها if (source == Marker) -- دي تحقق بأن الماركر نفسه اللي اتلمس في الحدث هو الماركر اللي انت صانعه و مفيهاش مشكلة او اي ماركر انت عايز تضيفه لحدث اللمس و تريح نفسك Marker بـ root و ممكن تبدل and ( ss == localPlayer ) -- هنا عشان مايحصلش مشاكل للي لمس الماركر بأنه لاعب getElementType اعمل تحقق بفنكشن و ان الاعب دة هو الاعب المحلي لازم الاعب المحلي عشان لو من غيرها هايكون كودك يفتح النافذة للكل guiSetInputEnabled و ضيف لما تحطها علي الوحة binds ذي بتطفي او بتشغل الـ حقت الشات وانت فاتح الوحة مابيجيك الشات T بمعنى لو ضغطت على و لو مش فاهم حاجة سيب تعليق
  6. اللي فهمته منك ان عندك مودين نيوز و ادمن مسج و المودين اعتقد نفس الأكواد اؤمرنا نساعدك في ايه مثلاً مش عايز تكرار في المودين ؟
  7. سطر 24 و 26 مالهمش لازمة امسحهم mezo = guiCreateStaticImage(9, 86, 34, 34, "images/7.png", false, WindowAr) -- Marker = createMarker (215.71916,1911.35266,18.64063,"arrow",1,255,255,225,255) عرف الشفافية انا ردي مش شفاف فوق -- في الجزء دة addEventHandler("onClientMarkerHit", root, function (Marker) if ( source == Marker ) and ( Marker == localPlayer ) then showCursor(true) guiSetVisible(GUIEditor.window[1],true) end end ) الخطأ في function (Marker) و اللي تحتيه بدله بـ addEventHandler("onClientMarkerHit", Marker, function (plr) if getElementType (plr) == "player" and plr == localPlayer then showCursor(true) guiSetInputEnabled (true) guiSetVisible(GUIEditor.window[1],true) end end ) -- و في الجزء دة addEventHandler ("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then setElementHealth(localPlayer,20) elseif ( source == GUIEditor.button[3] ) then showCursor(false) guiSetVisible(GUIEditor.window[1],false) end end ) لو البوتون اللي انضغط عليه هو البوتون رقم 1 يديله دم بس الدم هايكون وهمي و كدة غلط بدله بـ addEventHandler ("onClientGUIClick", root, function() if ( source == GUIEditor.button[1] ) then triggerServerEvent ("Health20",localPlayer) elseif ( source == GUIEditor.button[3] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiSetInputEnabled (false) end end ) و في جزء السيرفر function getPedMaxHealth(ped) assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(ped) .. "]") local stat = getPedStat(ped, 24) local maxhealth = 100 + (stat - 569) / 4.31 return math.max(1, maxhealth) end addEvent ("Health20",true) addEventHandler ("Health20",root, function () if getPlayerMoney (source) >= 200 then if getElementHealth (source) < getPedMaxHealth(source) then takePlayerMoney (source,200) setElementHealth (source, getElementHealth (source) + 20) else outputChatBox ("Your health is full.",source,255,5,5) end else outputChatBox ("You don't have enough money.",source,255,5,5) end end )
  8. Marker = createMarker (216.00175,1920.79150,17.64063,"arrow",1,255,255,225,alpha ?) 216.00175,1920.79150,17.64063 = x , y , z "arrow" = theType 1 = size 255,255,225 = r , g , b alpha = ?? الشفافية مش متعرفة في كود صنع الماركر بتاعك عشان كدة الماركر مش ظاهر الساينتاكس الطبيعي كلينت marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) -- و بالنسبة لمشكلة الدم عندك طبعاً لازم تعمل تريجر سيرفر ايفينت لكل زر يعني زي كدة عشان الدم مايكونش وهمي addEventHandler ("onClientGUIClick", root, function() if ( source == buy1 ) then triggerServerEvent ("Health20",localPlayer) elseif ( source == buy2 ) then triggerServerEvent ("Health40",localPlayer) elseif ( source == buy3 ) then triggerServerEvent ("Health60",localPlayer) elseif (source == buy4) then triggerServerEvent .. -- كمل طريقك elseif ( source == buy7 ) then showCursor(false) guiSetVisible(window1,false) end end ) و في جزء السيرفر استخدم اليوسفل فنكشن function getPedMaxHealth(ped) assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(ped) .. "]") local stat = getPedStat(ped, 24) local maxhealth = 100 + (stat - 569) / 4.31 return math.max(1, maxhealth) end عشان يرجع لك دم الاعب الكامل -- addEvent ("Health20",true) addEventHandler ("Health20",root, -- تريجر السيرفر اللي مربوط بحدث الضغط علي الزر مش محتاج شرح function () -- بما انك مبتدأ و عايز تتعلم و تطبق if getPlayerMoney (source) >= 200 then -- هنا يتحقق بأن فلوسه اكبر من او تساوي 200 if getElementHealth (source) < getPedMaxHealth(source) then -- هنا يتحقق بأن دم الاعب اصغر من دمه الكامل -- يعني لو دمه 20 *مثلا* و دمه الكامل من 100 takePlayerMoney (source,200) -- ناخد منه التمن setElementHealth (source, getElementHealth (source) + 20) -- نديله 20 دم علي دمه -- و كدة بقينا اديناله دم 20 و اخدنا منه الفلوس -- و لو حصل حاجة تانية (أُخري) else -- لو مثلاً دمه العادي 100 *كامل* و دمه الكامل من 100 outputChatBox ("Your health is full.",source,255,5,5) -- نطلعله رسالة في الشات end else -- لو فلوسه اصغر من او لاتساوي 200 outputChatBox ("You don't have enough money.",source,255,5,5) -- نطلعله رسالة في الشات end end ) -- و طبعاً كمل طريقك علي الباقي
  9. createVehicle setVehicleDamageProof 'onVehicleStartEnter' getPlayerSerial cancelEvent
  10. عشان لو دمه الكامل اكتر من 100 مثلاً يديله دم 200 عشان دمه العادي يكون كامل
  11. -- client addEventHandler ("onClientGUIClick",yourbutton, function () triggerServerEvent ("HA",localPlayer) end ) -- server addEvent ("HA",true) addEventHandler ("HA",root, function () setElementHealth (source,200) setPedArmor (source,100) end )
  12. missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end end end,50,0) end startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) missionPlayer[source] = true local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) warpPedIntoVehicle (i,car[source]) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) addEventHandler ("onPlayerQuit",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isElementInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) else return end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler ("onMarkerHit",marker, function (plr) if getElementType (plr) == "player" and isPedInVehicle (plr) and missionPlayer [plr] and Pcount == 1 then if not isTimer (startTimer) then givePlayerMoney(plr,50000) -- killPed(plr) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox("! 50000$ من الديربي "..getPlayerName(plr).." فاز الاعب",root,5,255,5,true) for i , k in ipairs (missionPlayer) do killPed (i) missionPlayer [i] = nil if isElement (car[i]) then destroyElement (car[i]) end end else outputChatBox ("* المهمة لم تبدأ بعد",plr,255,5,5) killPed (plr) missionPlayer[plr] = nil if isElement (car[plr]) then destroyElement (car[plr]) end end end end )
  13. يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل جربت بنفسي و مفيش مشاكل و بدون تعديل علي الاكواد الفكرة هي يتاح ليك الدخول قبل بدأ المهمة بدقيقتين جميل ؟ بعد انتهاء الدقيقتين مش هاتقدر تدخل المهمة غير لما تبدأ تاني و بما انك عايزها ديربي تفضل missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end for i , player in ipairs (getElementsByType ("player")) do if getElementData (player,"PcountBugFix") then removeElementData (player,"PcountBugFix") end end end end,50,0) end function vv(plr) if missionPlayer [plr] then missionPlayer = nil end end addEventHandler ("onPlayerWasted",root,vv) addEventHandler ("onPlayerQuit",root,vv) startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) addEventHandler ("onPlayerQuit",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isPedInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and isPedInVehicle(player) and missionPlayer[player] and Pcount == 1 then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) for k , i in pairs (missionPlayer) do missionPlayer[k] = nil killPed (k) end if isElement (car[player]) then destroyElement (car[player]) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end else outputChatBox ("* تم آخذ الجائزة من قبل",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end end end end ) غير مجرب و اي خطأ او مشكلة كلمني
  14. انا مش فاهمك بالكامل اعذرني بس في كودك الاعب اللي دخل الماركر غير معرف و اي خطأ سيب تعليق local marker1 = createMarker (2246.54395,-2079.64966,12.54688, "cylinder", 1.5, 255, 255, 0, 170 ) local marker2 = createMarker (2238.59302,-2089.68872,12.54688, "cylinder", 1.5, 255, 0, 0, 170 ) local marker3 = createMarker (2232.19043,-2081.62744,12.54688, "cylinder", 1.5, 0, 255, 0, 170 ) local blip = createBlip(2232.19043,-2081.62744,12.54688,46) ------------------------------------------------ function openwindow(plr) if getElementType (plr) == "player" then triggerClientEvent(plr,"open",plr) end end addEventHandler("onMarkerHit",marker3,openwindow) addEventHandler("onMarkerHit",marker1, function(plr) if getElementType (plr) == "player" then if getElementData(plr,"job") then if getElementData(plr,"fff") == 0 then setPedAnimation(plr,"CARRY","liftup") setElementData(plr,"fff",(getElementData(plr,"fff") or 0 ) +1) end end end end ) addEventHandler("onMarkerHit",marker2, function(plr) if getElementType (plr) == "player" then if getElementData(plr,"job") and getElementData(plr,"fff") ~= 0 then setElementData(plr,"job2",(getElementData(plr,"job2") or 0) +1) setElementData(plr,"fff",getElementData(plr,"fff") -1) outputChatBox("You Have"..getElementData(plr,"job2").."/5",plr,255,255,0) setPedAnimation( plr, nil) end if getElementData(plr,"job2") == 5 then setPedAnimation( plr, nil) createVehicle( 456,2233.39063,-2094.22803,12.54688, 0, 0, 270 ) destroyElement(marker1) destroyElement(marker2) createBlip(1808.47900,-1434.74524,13.42969,41) local marker4 = createMarker(1808.47900,-1434.74524,12.42969, "cylinder", 1.5, 0, 0, 255, 170 ) end end end ) function win() setElementData(plr,"Money",(getElementData(plr,"Money") or 0) + 100000) destroyElement(marker4) end addEventHandler("onMarkerHit",marker4,win)
  15. انا مش فاهم انت عايز ايه بالظبط ممكن تقولي ايه هي فكرتك كاملة عشان اساعدك ؟
  16. تقصد لما شخص يدوس اف 10 يتحقق ان الفي اي بي بتاعه متفعل و لو متفعل يفتحله نافذة الفي اي بي ؟ لو مش متفعل يفتحله نافذة التفعيل ؟ ولا ايه بالظبط
  17. جرب bindKey("F10", "down", function () if guiGetVisible(awnd) then showCursor(false) guiSetVisible(awnd, false) guiSetInputEnabled (false) elseif not guiGetVisible (awnd) and getElementData(localPlayer, "VIP:Active") then executeCommandHandler ('vip') else return outputChatBox ("[VIP System] : Sorry, you have no vip.",255,5,5,true) end end )
  18. غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end )
  19. جرب --client addEventHandler ("onClientGUIClick",button, function () local accboxx = guiGetText(accBox) local activeboxx = guiGetText(activeBox) triggerServerEvent ("Active",localPlayer,accboxx,activeboxx) end ) --server addEvent("Active",true) addEventHandler ("Active",root, function (accbox,activebox) local data = getAccountData (getPlayerAccount(source),"ActivitionCode") if data then if activebox == data then if not getAccountData (getPlayerAccount(source),"VIP:Active") then setAccountData (getPlayerAccount(source),"VIP:Active",true) outputChatBox ("[VIP System] : successfuly activated !",source,5,255,5) else outputChatBox ("[VIP System] : VIP is already activated.",source,255,5,5) end else outputChatBox ("[VIP System] : Wrong activation code !",source,255,5,5) end else outputChatBox ("[VIP System] : You have no activation code, please call an admin.",source,255,5,5) end end ) و لما شخص يفتح النافذة ( نافذة الفي اي بي VIP:Active اعمل تحقيق بأنه معاه اكونت داتا بأسم لو معاه يفتحله النافذة لو مش معاه مايعملش حاجة
  20. استخدم guiSetVisible
  21. ايه هي اللوحة الاصلية ؟ تقصد اللعبة ؟
  22. ممكن توضح اكتر؟ تقصد عايز بوتن يغلق النافذة ؟
  23. كودك صح المشكلة عندك عشان الداتا مش رقم استخدم addEventHandler ("onPlayerJoin",root, function () setElementData (source,"GLA",0) end ) addEvent("gla", true) addEventHandler("gla",root, function (player,gla) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Console")) then for _,v in ipairs (getElementsByType("player")) do setElementData(v, "GLA",getElementData(v,"GLA") + tonumber(gla)) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 The Console #ffff00( " .. getPlayerName(player).. ") Give Players "..tonumber(gla).." Lanuhcer",v, 0, 150, 255, true) end else outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You do not have access to this.", player, 255, 0, 0,true) end end)
  24. اطرح اكواد التريجر و اتأكد ان الداتا رقم
×
×
  • Create New...