Jump to content

xLive

Scripting Moderators
  • Posts

    458
  • Joined

  • Days Won

    21

Everything posted by xLive

  1. Use onClientMarkerHit along with guiCreateLabel or dxDrawText to display a text, and onClientMarkerLeave to remove it.
  2. Yes, it's possible, but there is no function to directly replace the GTA sounds. You need to disable the current sound using the setWorldSoundEnabled function. After that, you can use the onClientPedStep event to play your custom one using the playSound function.
  3. تقدر تسوي كول شيب لنقطة أ و ب onClientColShapeHit وإذا لمسها راح تعرف من ايفنت setElementRotation وتقدر تغير إتجاه البيد من خلال findRotation وراح تفيدك هذي الوظيفة تقدر تستخدمها بتايمر .عشان تعرف وين يكون إتجاه البيد، تعطيها إحداثيات البيد والنهاية وبتقولك الإتجاه الصحيح
  4. .مرحبًا بك بالمنتدى @Leo..1، تم نقل موضوعك للقسم الرئيسي. قسم البرمجة خاص للبرمجة فقط وغير مخصص للإعلانات
  5. .مرحبًا بك بالمنتدى @Gamma_TM، تم نقل موضوعك إلى القسم العام بالعربية. استخدم هذا القسم للمنشورات العربية ؟Worms هل تقصد سلسلة ممكن بعض الاشياء ما تتطابق مع يلي ذكرته، لكن ممكن انت ناسي بعض التفاصيل
  6. .مرحبًا بك بالمنتدى @NoTEnD، تم نقل موضوعك للقسم العربي، استخدم هذا القسم للمنشورات باللغة العربية
  7. Use attachElements function to attach the marker to the player.
  8. You should attach the hunter to theObject, not the other way around. attachElements(hunter,theObject)
  9. The easiest way is to create an invisible object that has no collisions and attach the vehicle to it. That way, when you use the moveObject function, the vehicle will move along with it. Here are the functions you will need: createObject setElementCollisionsEnabled setElementAlpha attachElements moveObject
  10. @ucanttouchme I've moved your thread to the Resources section.
  11. Oh, right! I totally forgot about the collision. You need to use setElementFrozen to freeze the vehicle, so it doesn't fall. Then, you can use setElementCollisionsEnabled to disable the collision of the vehicle.
  12. You can achieve this using createVehicle and setElementAlpha functions.
  13. xLive

    Help me

    This is useless. Why are you using floor on the hour? The getTime function will return an integer, not a float.
  14. Welcome to the forums @Monteiro. Your thread has been moved to the Portuguese section. Please use this section in the future.
  15. As far as I know, it's not currently possible. There's already a GitHub issue about this.
  16. onClientGUIClick حدث إذا ضغط زر triggerServerEvent takePlayerMoney يخصم فلوس، راح يرجع ترو إذا انخصمت الفلوس وفولس إذا لا(ماعنده) تقدر تتحقق بالشكل هذا على سبيل المثال if takePlayerMoney(client,5000) then -- عنده فلوس else -- ماعنده end giveWeapon يعطي سلاح وذخيرة outputChatBox يخرج رسالة في لشات
  17. تم نقل الموضوع للقسم العربي، الرجاء إستعمال هذا القسم عند إستخدام اللغة العربية وعليكم السلام صاحبها موجود بالمنتدى تقدر تجرب تتواصل معه @Al3grab أو تقدر تتعلم برمجة وتصنع مودات بنفسك
  18. تم نقل الموضوع للقسم الرئيسي الرجاء استعمال هذا القسم بالمستقبل عند طلب المساعدة الأفضل توضح أكثر، انت حطيت رسالة لكن ما وضحت هل هي بسيرفر معين؟ أو كل السيرفرات وهل هذي مشكلة سيرفر انت تملكه؟ لكن الواضح إن الاتصال عندك بطيئ جدًا أو ممكن البطئ من الخادم
  19. xLive

    GUI Creating

    For best performance, create the CEGUI elements only when they are needed, and destroy them when they are no longer being used. Keeping unused elements in memory can lead to performance issues, especially if the player is likely to use them a few times only. However, if you have a lot of CEGUI elements in your window that the player would frequently use. In such cases, it's more efficient to hide/unhide the elements instead of creating and destroying them each time.
  20. bindKey will bind the player's key to a function. When executed, the function will get the target player (assuming you already have a way to get the target), then use getElementPosition to retrieve the coordinates of both players, then use setElementPosition to switch them.
  21. setWorldSoundEnabled
  22. بدون توضيح كافي لا أعتقد راح تحصل على إجابة
  23. ممكن صورة للتوضيح؟ عشان نعرف وين المشكلة ظاهرة لك؟
  24. You're not storing them in any table? Anyway, you don't need to use tables here. Instead, you can set the other elements (object and blip) as children of the collision shape using setElementParent. This will cause them to be automatically destroyed when the parent (colshape) is destroyed. You can use getElementChildren to retrieve the children of an element. Here's an example: addEventHandler("onClientResourceStart",resourceRoot, function() for index, position in ipairs(table_pos) do local x, y, z = unpack(position) -- Create a collision shape local colshape = createColSqaure(x, y, z, 1.5) -- Create an object and set its parent to the collision shape local object = createObject(2424, x, y, z) setElementParent(object, colshape) addEventHandler("onClientColShapeHit", colshape, onHit) end end) function onHit(hitElement) if hitElement == localPlayer then -- The source of this event is the colshape that was hit -- Retrieve the object that is a child of the collision shape local object = getElementChildren(source, "object")[1] -- The [1] here is used to get the first element of the table. if isElement(object) then -- Check if the object still exists ... end destroyElement(source) -- Destroy the collision shape -- The children of the collision shape will be destroyed automatically end end There is no need to use getLocalPlayer here, localPlayer is a predefined variable that refers to the local player. You should simply use the variable localPlayer directly.
×
×
  • Create New...