Jump to content

KhaledX

Members
  • Posts

    643
  • Joined

  • Last visited

  • Days Won

    28

KhaledX last won the day on September 20 2020

KhaledX had the most liked content!

Details

  • Gang
    ACM
  • Location
    ASSIR
  • Occupation
    SA
  • Interests
    ACM

Recent Profile Visitors

3,973 profile views

KhaledX's Achievements

Crime Partner

Crime Partner (30/54)

496

Reputation

  1. Sorry for late , Code ( Client Side ) : local player = getLocalPlayer() local animIndex = 1 local lastPress = 0 -- list of animations local animations = { {"DANCING", "dnce_M_a"}, {"DANCING", "dnce_M_b"}, {"DANCING", "dnce_M_c"}, {"DANCING", "dnce_M_d"}, {"DANCING", "dnce_M_e"}, {"DANCING", "dnce_M_f"}, {"DANCING", "dnce_M_g"}, {"DANCING", "dnce_M_h"}, {"DANCING", "dnce_M_i"}, {"DANCING", "dnce_M_j"} } function cycleAnimation() local currentTime = getTickCount() if currentTime - lastPress < 500 then setPedAnimation(player) triggerServerEvent("stopAnimation", player) else local anim = animations[animIndex] setPedAnimation(player, anim[1], anim[2]) triggerServerEvent("applyAnimation", player, anim[1], anim[2]) animIndex = animIndex % #animations + 1 end lastPress = currentTime end bindKey("x", "down", cycleAnimation) Code ( Server Side ) : addEvent("applyAnimation", true) addEventHandler("applyAnimation", root, function(block, anim) setPedAnimation(source, block, anim) end) addEvent("stopAnimation", true) addEventHandler("stopAnimation", root, function() setPedAnimation(source) end)
  2. Yes it Possible , and this a code for that .. local player = getLocalPlayer() local animIndex = 1 local lastPress = 0 -- list of animations local animations = { {"DANCING", "dnce_M_a"}, {"DANCING", "dnce_M_b"}, {"DANCING", "dnce_M_c"}, {"DANCING", "dnce_M_d"}, {"DANCING", "dnce_M_e"}, {"DANCING", "dnce_M_f"}, {"DANCING", "dnce_M_g"}, {"DANCING", "dnce_M_h"}, {"DANCING", "dnce_M_i"}, {"DANCING", "dnce_M_j"} } function cycleAnimation() local currentTime = getTickCount() if currentTime - lastPress < 500 then setPedAnimation(player) else local anim = animations[animIndex] setPedAnimation(player, anim[1], anim[2]) animIndex = animIndex % #animations + 1 end lastPress = currentTime end bindKey("x", "down", cycleAnimation) if you bind x it will change the Animation .. if you bind double x quickly it will stop the animation
  3. وعليكم السلام , جرب هالكود function findRotation( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) return t < 0 and t + 360 or t end -- المرجع الاصلي -- https://wiki.multitheftauto.com/wiki/SetPedAttack -- تم التعديل على الفنكشن ليتناسب مع الكود المطروح function setPedAttack(theElement, theTarget, thePedSlot) if theElement then local x, y, z = getElementPosition(theTarget) local ex, ey, ez = getElementPosition(theElement) -- حساب المسافة بين البيد واللاعب local distance = getDistanceBetweenPoints3D(x, y, z, ex, ey, ez) local rotation = findRotation(ex, ey, x, y) setPedRotation(theElement, rotation) setPedLookAt(theElement, x, y, z + 5) setPedAimTarget(theElement, x, y, z) givePedWeapon(theElement, 30, 30, true) -- إذا كانت المسافة أكبر من 30 if distance > 30 then setPedControlState(theElement, "forwards", true) setPedControlState(theElement, "fire", false) setPedWeaponSlot(theElement, 0) else setPedControlState(theElement, "fire", true) setPedControlState(theElement, "forwards", false) setPedWeaponSlot(theElement, thePedSlot) end setPedControlState(theElement, "fire", true) setPedWeaponSlot(theElement, thePedSlot) end end _setPedRotation = setPedRotation function setPedRotation(element, rot) return _setPedRotation(element, rot) end local thePlayer = getLocalPlayer() local x, y, z = getElementPosition(thePlayer) -- إنشاء شخصية بالقرب من موقع اللاعب local thePed = createPed(0, x + 2, y + 2, z) -- يمكنك تحديد موقع دائم للبيد if (thePed) then givePedWeapon(thePed, 30, 30, true) setTimer(function() if (isElement(thePed) and isElement(thePlayer)) then setPedAttack(thePed, thePlayer, 30, 30, 2) end end, 1000, 0) addEventHandler("onClientRender", root, function() if (isElement(thePed)) then local sx, sy, sz = getPedBonePosition(thePed, 8) local ex, ey = getScreenFromWorldPosition(sx, sy, sz + 0.5) local px, py, pz = getElementPosition(thePlayer) local distance = getDistanceBetweenPoints3D(px, py, pz, sx, sy, sz) if (ex and ey and distance <= 100) then local health = getElementHealth(thePed) dxDrawRectangle(ex - 50, ey, 100, 10, tocolor(0, 0, 0, 128)) dxDrawRectangle(ex - 50, ey, health, 10, tocolor(255 - health * 2.55, health * 2.55, 0, 128)) dxDrawText("خالد: " .. math.floor(health) .. "%", ex - 50, ey, ex + 50, ey + 20, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, false, true) end end end) -- اعادة البيد عند موته local function onPedWasted() local x, y, z = getElementPosition(source) createEffect("explosion_molotov", x, y, z) -- إنشاء تأثير الانفجار destroyElement(source) thePed = createPed(0, x, y, z) givePedWeapon(thePed, 30, 30, true) addEventHandler("onClientPedWasted", thePed, onPedWasted) end addEventHandler("onClientPedWasted", thePed, onPedWasted) end صور : اني اصور وانا اقتله اصعب شي الصدق
  4. وعليكم السلام , جرب هالكود local screenVisible = false -- حالة الصورة | False = Not Show | True = Show | local imageToShow = "path/to/image.png" -- مسار الصورة function toggleScreen() screenVisible = not screenVisible if screenVisible then -- عرض الصورة لكل الموجودين بالسيرفر for _, player in ipairs(getElementsByType("player")) do setElementData(player, "customImage", imageToShow) end setTimer(hideScreen, 3000, 1) -- مدة عرض الصورة ( 3 ثواني ) else -- اخفاء الصورة عن جميع اللي بالسيرفر for _, player in ipairs(getElementsByType("player")) do setElementData(player, "customImage", nil) end end end function hideScreen() toggleScreen() end addCommandHandler("showImage", toggleScreen)
  5. Only Discord , instagram , Snapchat Discord : KhaledX#5811 instagram : b4.iz snapchat : b4-iz
  6. اغلاق موقعنا الجميل فايف ستيشن والسبب يعود الى انه لايوجد اي فائدة او مكاسب خسران فوق الـ 3200 دولار ولا جبت يمكن 200 دولار مدري وش في الناس ماعاد يبون يعني ولا ايش لكن الله يعوضنا ويرزقنا من واسع فضله جميع الخدمات تعمل , ولطلب خدمة جديدة توجه الى الخاص طلب الخدمات الجديدة محصورة بين خدمات معينة #وداعا_فايف_ستيشن
  7. الموقع يعمل بشكل ممتاز الان وهناك تخفيضات على اغلب المنتجات .. طبعا احنا نوفر اي خدمة انت تبيها , لكن يكون الطلب في الديسكورد
  8. شكرا لك , اخيرا احد رد على الموضوع خلاص خلاص راحو الاساطير مابقى الا قلة فقط
  9. اتمنى لك كامل التوفيق , وحاب اقدم تحفيز بسيط اي شخص يشتري راح ياخذ سيرفر ام تي اي مجانا لمدة شهر كامل مع كل المميزات بعد موافقة @ALw7sH طبعا
  10. المنتدى ميت ومدري ليه اشارك فيه , لكن بس كذا < التحديث الجديد الخاص بالموقع انتهى .. لازال فيه بعض اللمسات نسويها ونخلص
×
×
  • Create New...