Jump to content

طلب تعديل


Recommended Posts

ابغى بدال الثلاثة الاسلحة

ابغى كل الاسلحة

abu = createColRectangle ( -590, -207, 175, 180) 
WeaponID = { 
    [31] = true, 
    [36] = true, 
    [38] = true, 
} 
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), 
    function ( previousWeaponID, currentWeaponID ) 
        if(isElementWithinColShape ( source, abu ))then 
            if ( WeaponID[currentWeaponID] ) then 
                toggleControl ( source, 'fire', false ) 
            else 
                toggleControl ( source, 'fire', true ) 
            end 
         end 
      end 
) 

Link to comment
سو لوب لكل الاسلحة
getElemntsByType 

مايصير يسوي لوب للاسلحة باستخدام هذا الفكشن

بس يقدر باستخدام ذي الطريقة حق اللوب

تعتبر اختصار بدل كتابة رقم رقم

  
  
for i = 1,40 do 
  
end 
  
  

Link to comment
ابغى بدال الثلاثة الاسلحة

ابغى كل الاسلحة

abu = createColRectangle ( -590, -207, 175, 180) 
WeaponID = { 
    [31] = true, 
    [36] = true, 
    [38] = true, 
} 
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), 
    function ( previousWeaponID, currentWeaponID ) 
        if(isElementWithinColShape ( source, abu ))then 
            if ( WeaponID[currentWeaponID] ) then 
                toggleControl ( source, 'fire', false ) 
            else 
                toggleControl ( source, 'fire', true ) 
            end 
         end 
      end 
) 

* Server Side:

abu = createColRectangle ( -590, -207, 175, 180 ) 
  
addEventHandler ( 'onPlayerWeaponSwitch', root, 
    function ( _, curWpID ) 
        if ( isElementWithinColShape ( source, abu ) ) then 
            if ( getSlotFromWeapon ( curWpID ) ~= 0 ) then 
                setPedWeaponSlot ( source, 0 ) 
            end 
            if ( isControlEnabled ( source, 'fire' ) ) then 
                toggleControl ( source, 'fire', false ) 
            end 
        else 
            if not ( isControlEnabled ( source, 'fire' ) ) then 
                toggleControl ( source, 'fire', true ) 
            end 
        end 
    end 
) 

. بدل ماتتحقق كل شوي إذا اللاعب بداخل الكول شيب او لا onColShapeHit + onColShapeLeave بالإضافة إلى انه يمكنكـ إستخدام

Link to comment
ابغى بدال الثلاثة الاسلحة

ابغى كل الاسلحة

abu = createColRectangle ( -590, -207, 175, 180) 
WeaponID = { 
    [31] = true, 
    [36] = true, 
    [38] = true, 
} 
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), 
    function ( previousWeaponID, currentWeaponID ) 
        if(isElementWithinColShape ( source, abu ))then 
            if ( WeaponID[currentWeaponID] ) then 
                toggleControl ( source, 'fire', false ) 
            else 
                toggleControl ( source, 'fire', true ) 
            end 
         end 
      end 
) 

ب اختصار شل كود التحقق من السلاح

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...