αвυ-wαleed Posted April 6, 2014 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 )
ALw7sH Posted April 6, 2014 Posted April 6, 2014 https://wiki.multitheftauto.com/wiki/Weapon ^ خذ الايديات من هنا وضيفها للجدول الي فوق
H25 Posted April 6, 2014 Posted April 6, 2014 سو لوب لكل الاسلحة getElemntsByType مايصير يسوي لوب للاسلحة باستخدام هذا الفكشن بس يقدر باستخدام ذي الطريقة حق اللوب تعتبر اختصار بدل كتابة رقم رقم for i = 1,40 do end
K1NG Posted April 6, 2014 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 بالإضافة إلى انه يمكنكـ إستخدام
abu5lf Posted April 6, 2014 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 ) ب اختصار شل كود التحقق من السلاح ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
H25 Posted April 7, 2014 Posted April 7, 2014 لو يستخدم "onColshapeHit" افضل لأن ممكن يظهر السلاح ويدخل المنطقة ولايبدله ف بصير بق
AboShanab Posted April 7, 2014 Posted April 7, 2014 لو يستخدم"onColshapeHit" افضل لأن ممكن يظهر السلاح ويدخل المنطقة ولايبدله ف بصير بق toggleControl ( source, 'fire', false ) Skype : aboshanab_
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