Outlaw Posted September 3, 2019 Share Posted September 3, 2019 شباب بدي أخلي البيد لما يكون عليه داتا nodm يقدر يغير الأسلحة بس الموجودة بالتيبل allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } function disablenodm (p) if getPedWeapon(localPlayer, #allowedwps) then return end if getElementData(localPlayer,"nodm",true) then toggleControl("next_weapon",false) toggleControl("previous_weapon",false) else toggleControl("next_weapon",true) toggleControl("previous_weapon",true) end end addEventHandler("onClientRender",root,disablenodm) function changeNodmCheck(bool) guiCheckBoxSetSelected(getControl(wndMain, 'No deathmatch'), bool) end Link to comment
Bechi_)!! Posted September 3, 2019 Share Posted September 3, 2019 On 03/09/2019 at 21:06, Outlaw said: شفت الجول ذا؟ allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } Expand allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true } -- خليه مثل هيك Link to comment
N3xT Posted September 3, 2019 Share Posted September 3, 2019 On 03/09/2019 at 21:52, Bechi_)!! said: allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true } -- خليه مثل هيك Expand مالها دخل, ولصاحب الموضوع اكوادك ملخبطة وغير واضحة وفكرتك غير واضحة ايضاً Link to comment
Outlaw Posted September 4, 2019 Author Share Posted September 4, 2019 On 03/09/2019 at 23:10, N3xT said: مالها دخل, ولصاحب الموضوع اكوادك ملخبطة وغير واضحة وفكرتك غير واضحة ايضاً Expand allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } function disablenodm (p) if getPedWeapon(localPlayer, #allowedwps) then return end if getElementData(localPlayer,"nodm",true) then toggleControl("next_weapon",false) toggleControl("previous_weapon",false) else toggleControl("next_weapon",true) toggleControl("previous_weapon",true) end end بدي اخلي اللاعب يستطيع أن يغير السلاح عندما يكون معه سلاح من الأسلحة الموجودة بالجدول Link to comment
PaiN^ Posted September 8, 2019 Share Posted September 8, 2019 (edited) allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } addEventHandler( "onClientPlayerWeaponSwitch", root, function(previous_weapon, next_weapon) if getElementData(localPlayer, "nodm") == true then local current_weapon = getPedWeapon(localPlayer, next_weapon) for i, weapon in ipairs(allowedwps) do if current_weapon ~= weapon then cancelEvent() break end end end end ) Edited September 8, 2019 by PaiN^ Link to comment
Abdul KariM Posted September 9, 2019 Share Posted September 9, 2019 @PaiN^ وعندك القيمة باللوب ترجع ترو getPedWeapon لو تلاحظ الوظيفة ترجع رقم Link to comment
PaiN^ Posted September 9, 2019 Share Posted September 9, 2019 On 09/09/2019 at 03:22, Abdul KariM said: @PaiN^ وعندك القيمة باللوب ترجع ترو getPedWeapon لو تلاحظ الوظيفة ترجع رقم Expand باسماء الاسلحة true أنا افترضت ان هذا الجدول مجرد مثال و انه راح يستبدل Link to comment
Abdul KariM Posted September 9, 2019 Share Posted September 9, 2019 @PaiN^ * دامه بيحط ارقام الاسلحة طريقة الجدول بتكون غير مايحتاج الاندكس Link to comment
PaiN^ Posted September 9, 2019 Share Posted September 9, 2019 @Abdul KariM صحيح و لكن انا سويتها بنفس طريقته بس عشان لا اغير عليه Link to comment
Outlaw Posted September 10, 2019 Author Share Posted September 10, 2019 On 08/09/2019 at 23:11, PaiN^ said: allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } addEventHandler( "onClientPlayerWeaponSwitch", root, function(previous_weapon, next_weapon) if getElementData(localPlayer, "nodm") == true then local current_weapon = getPedWeapon(localPlayer, next_weapon) for i, weapon in ipairs(allowedwps) do if current_weapon ~= weapon then cancelEvent() break end end end end ) Expand كودك مو شغال و بدون اخطاء ديبق Link to comment
Rockyz Posted September 10, 2019 Share Posted September 10, 2019 اتوقع هذا الي تبيه, جرب : allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } addEventHandler("onClientPlayerWeaponSwitch", root, function(previous_weapon, next_weapon) if getElementData(localPlayer, "nodm") == true then if not allowedwps[next_weapon] then cancelEvent() local current_weapon = (next_weapon+1)%13 while current_weapon ~= next_weapon do if allowedwps[current_weapon] then setPedWeaponSlot(localPlayer, current_weapon) break end current_weapon = (current_weapon+1)%13 end end end end) Link to comment
PaiN^ Posted September 16, 2019 Share Posted September 16, 2019 On 10/09/2019 at 04:46, Outlaw said: كودك مو شغال و بدون اخطاء ديبق Expand ممكن انك ما عدلت التيبل ؟ جرب دا: allowedwps = { [0] = true, [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } addEventHandler( "onClientPlayerWeaponSwitch", root, function(previous_weapon, next_weapon) if getElementData(localPlayer, "nodm") == true then local current_weapon = getPedWeapon(localPlayer, next_weapon) for i, weapon in ipairs(allowedwps) do if current_weapon ~= i then cancelEvent() break end end end end ) 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