Jump to content

#FeldMan

Members
  • Posts

    47
  • Joined

Everything posted by #FeldMan

  1. أيش المشكلة في الكود ذأ ؟ -- كلينت "||: function mahdi() local level = getLevelInfo() local xp = getXPInfo() -----Level System dxDrawText("Level : "..level, 14, 695, 102, 710, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) dxDrawText("XP : "..xp.." / "..(level*100).."", 13, 714, 101, 729, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, true, false, false) end end ) addEventHandler("onClientRender", root, mahdi)
  2. وظيفة تسوي Ped مع حدث عند ضرب أل Ped Ped = createPed( id skin , ألأ حدأثيات ألي تبي فيها ال Ped يرسبن فيها ) function أسم الفنكشن أي أسم تبيه() local sound = playSound("أسم الأغنية او الصرخة الي حطيتها ب الملف حق المود.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientPedDamage", root, أسم الفنكشن الي حطيته فوق) مثأل Ped = createPed(12,-2391.20850, -613.10767, 132.75192 ) function mahdi1() local sound = playSound("Mahdi.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientPedDamage", root, mahdi1) كود بسيط (: وظيفة عندما ألأعب يتحرك يحدث حدث ولما يوقف يصير حدث ------------------------------------------ ألكود -------------------------------- addEvent("onLocalPlayerStartsMoving") addEvent("onLocalPlayerStopsMoving") local localPlayerMoving = false local deadSpeed = 0.01 setTimer(function () local vx, vy, vz = getElementVelocity(localPlayer) local speed = (vx^2 + vy^2 + vz^2)^0.5 if not localPlayerMoving and speed > deadSpeed then -- if starts moving localPlayerMoving = true triggerEvent("onLocalPlayerStartsMoving", localPlayer) elseif localPlayerMoving and speed <= deadSpeed then -- if stops moving localPlayerMoving = false triggerEvent("onLocalPlayerStopsMoving", localPlayer) end end, 8000, 0) addEventHandler("onLocalPlayerStartsMoving", localPlayer, function() -------------- هنأ تحط الحدث ألي تبيه يصير لمأ الأعب يبدأ الحركة end) addEventHandler("onLocalPlayerStopsMoving", localPlayer, function() ----------- هنأ تحط الحدث الي تبيه يضهر لمأ الأعب يوقف عن الحركة end) ------------------------------------مثأل-------------------------------------- addEvent("onLocalPlayerStartsMoving") addEvent("onLocalPlayerStopsMoving") local localPlayerMoving = false local deadSpeed = 0.01 setTimer(function () local vx, vy, vz = getElementVelocity(localPlayer) local speed = (vx^2 + vy^2 + vz^2)^0.5 if not localPlayerMoving and speed > deadSpeed then -- if starts moving localPlayerMoving = true triggerEvent("onLocalPlayerStartsMoving", localPlayer) elseif localPlayerMoving and speed <= deadSpeed then -- if stops moving localPlayerMoving = false triggerEvent("onLocalPlayerStopsMoving", localPlayer) end end, 8000, 0) addEventHandler("onLocalPlayerStartsMoving", localPlayer, function() dxDrawRectangle(473, 109, 92, 27, tocolor(0, 0, 0, 150)) end) addEventHandler("onLocalPlayerStopsMoving", localPlayer, function() dxDrawRectangle(473, 109, 92, 27, tocolor(0, 0, 0, 150)) end) بألتوفيق (:
  3. سلأم عليكم أبي لما ينتهي الشريط يجي أنميشن ذأ الي توصلت له من الويكي Client: local screenWidth, screenHeight = guiGetScreenSize () -- Get the screen resolution (width and height) function isElementMoving(theElement) if isElement (theElement) then return Vector3( getElementVelocity(theElement) ).length ~= 0 end return false end local screenWidth, screenHeight = guiGetScreenSize () local x,y = guiGetScreenSize() local show = true setElementData(localPlayer, "thirsty", 60) function drawHud() if (show==true) then local thirsty = getElementData(localPlayer, "thirsty") dxDrawRectangle(683, 107, 196, 30, tocolor(0, 0, 0, 150)) dxDrawRectangle(x-326, 34+80, thirsty*3, 17, tocolor(1, 96, 253, 255)) dxDrawText("Fatigue", 745, 115, 825, 140, tocolor(255, 255, 255), 1, "default-bold", "center") end end addEventHandler("onClientRender", root, drawHud) addEvent("onLocalPlayerStartsMoving") addEvent("onLocalPlayerStopsMoving") local localPlayerMoving = false local deadSpeed = 0.01 setTimer(function () local vx, vy, vz = getElementVelocity(localPlayer) local speed = (vx^2 + vy^2 + vz^2)^0.5 if not localPlayerMoving and speed > deadSpeed then -- if starts moving localPlayerMoving = true triggerEvent("onLocalPlayerStartsMoving", localPlayer) elseif localPlayerMoving and speed <= deadSpeed then -- if stops moving localPlayerMoving = false triggerEvent("onLocalPlayerStopsMoving", localPlayer) end end, 100, 0) -- Usage example: addEventHandler("onLocalPlayerStartsMoving", localPlayer, function() ---------------dxDrawRectangle(473, 109, 92, 27, tocolor(0, 0, 0, 150)) end) addEventHandler("onLocalPlayerStopsMoving", localPlayer, function() -----------------setElementData(localPlayer, "thirsty", 60) end) setTimer(function() -------if not isElementMoving(localPlayer) then return end local under1 = getElementData(localPlayer, "thirsty") setElementData(localPlayer, "thirsty", under1-1) end, 900, 0) addEventHandler("onClientRender", root, setTimer) function die() local piageci = getElementData(localPlayer, "thirsty") if (piageci==0) then setElementData(localPlayer, "thirsty", 60) triggerServerEvent ("san1", localPlayer) end end addEventHandler("onClientElementDataChange", root, die) -- Hide the hud when the resource is started local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end) function fixhud() setPlayerHudComponentVisible( component, false ) end addCommandHandler("fixhud", fixhud) Server: addEvent("san1", true) addEventHandler ("san1",root, function ( ) if not getElementData(thePlayer, "sitting") then setPedAnimation(thePlayer, "ped", "seat_down", -1, false, false, false, false) setElementData(thePlayer, "sitting", true) else setPedAnimation(thePlayer) removeElementData(thePlayer, "sitting") end end)
  4. أبي كود لمأ الاعب يتوقف عن الحركة يصير شي يعني تضهر لوحة يجيه شي ب الشات وكذأ لو تعرف تقدر تسأعدني
  5. سلأم عليكم أحتاج حد يعلمني البرمجة يفهمني ع ألأقل لو تقدر يعني اعرف كم كود مثل takemoney givemoney وفيه كثير فاهمهم بس بعضهم مو فأهم ي ليت تفهمني اي وحده او بس فهمني elmnts
  6. تقدر تركبه على ذأ الكود لأني مبتدأ في البرمجة *RayaN-Alharbi.
  7. *RayaN-Alharbi. أبيه لل dxDrawRectangle \ مش لل تيكست
  8. طبعأ أنأ لي زمان أدور ذأ الكود وأتمنى تسأعدوني isElementMoving ذا موجود بيه الكود ذأ dxDrawText أنأ ابي الكود ل dxDrawRectangle أتمنا تسأعدني لو تعرف
  9. @[T]|O|[P]George تقدر تسأعدني ؟
  10. أبي الكود لل dxDrawRectangle لو معك
  11. local x,y = guiGetScreenSize() local show = true setElementData(localPlayer, "thirsty", 30) function drawHud() if (show==true) then local thirsty = getElementData(localPlayer, "thirsty") dxDrawRectangle(473, 109, 92, 27, tocolor(0, 0, 0, 150)) dxDrawRectangle(x-326, 34+80, thirsty*3, 17, tocolor(1, 96, 253, 255)) dxDrawText("Fatigue", 499, 114, 563, 131, tocolor(255, 255, 255), 1, "default-bold", "center") end end addEventHandler("onClientRender", root, drawHud) setTimer(function() local under1 = getElementData(localPlayer, "thirsty") setElementData(localPlayer, "thirsty", under1-1) end, 2000, 0) addEventHandler("onClientPlayerWeaponFire", root, setTimer) function die() local piageci = getElementData(localPlayer, "thirsty") if (piageci==0) then setElementData(localPlayer, "thirsty", 10) setElementData(localPlayer, "thirsty", 20) setElementData(localPlayer, "thirsty", 30) setPedAnimation(thePed, "thirsty", "WOMAN_walknorm") end end addEventHandler("onClientPlayerWeaponFire", root, die) -- Hide the hud when the resource is started local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end end) function fixhud() setPlayerHudComponentVisible( component, false ) end addCommandHandler("fixhud", fixhud) أبي اخليه لما ألأعب يمشي ينقص الشريط وبس يوقف يرجع يعبي ممكن مسأعدة لو حأبب
  12. سلام عليكم , ابي ايفينت لما الأعب يتحرك يصير حدث يعني لو تحرك ألأعب يضهر شيء مثل قائمة
  13. صح الباب تقدر تمر منه زي كذا ابيه يصير مثل السيارة العاديه يعني مو شفاف م اقدر امر منه يعني يكون في شي اصدم بيه
  14. لا يخوي انت فاهم غلط انا اقصد انه يصير م اقدر امر من الباب كذا
  15. هذه الصورة سوف توضح كل شيء
  16. يعني م تقدر تمر من داخل م تصدم فيه هو الحين تقدر تمر منه وم تصدم بيه ابيه م يمر من داخل يصير يصدم
  17. سلام عليكم , ابي كود يخلي باب السيارة موب شفاف يعني م تقدر تدخل منه وهو مفتوح اتمنى انكم تردو ب اسرع وقت
  18. سلام عليكم , ابي كود يخلي باب السيارة موب شفاف يعني م تقدر تدخل منه وهو مفتوح اتمنى انكم تردو ب اسرع وقت @MrKAREEM @#_iMr,[E]coo
  19. السلام عليكم احتاج كود يخلي الاعب يطلق من الطيارة

     

×
×
  • Create New...