αвυ-wαleed Posted April 6, 2014 Share Posted April 6, 2014 ابغى بدال الثلاثة الاسلحة ابغى كل الاسلحة 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
ALw7sH Posted April 6, 2014 Share Posted April 6, 2014 https://wiki.multitheftauto.com/wiki/Weapon ^ خذ الايديات من هنا وضيفها للجدول الي فوق Link to comment
al-Kobra Posted April 6, 2014 Share Posted April 6, 2014 سو لوب لكل الاسلحة getElemntsByType Link to comment
H25 Posted April 6, 2014 Share Posted April 6, 2014 سو لوب لكل الاسلحة getElemntsByType مايصير يسوي لوب للاسلحة باستخدام هذا الفكشن بس يقدر باستخدام ذي الطريقة حق اللوب تعتبر اختصار بدل كتابة رقم رقم for i = 1,40 do end Link to comment
K1NG Posted April 6, 2014 Share Posted April 6, 2014 ابغى بدال الثلاثة الاسلحة ابغى كل الاسلحة 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
abu5lf Posted April 6, 2014 Share Posted April 6, 2014 ابغى بدال الثلاثة الاسلحة ابغى كل الاسلحة 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
H25 Posted April 7, 2014 Share Posted April 7, 2014 لو يستخدم "onColshapeHit" افضل لأن ممكن يظهر السلاح ويدخل المنطقة ولايبدله ف بصير بق Link to comment
AboShanab Posted April 7, 2014 Share Posted April 7, 2014 لو يستخدم"onColshapeHit" افضل لأن ممكن يظهر السلاح ويدخل المنطقة ولايبدله ف بصير بق toggleControl ( source, 'fire', false ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now