Outlaw Posted September 3, 2019 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
Bechi_)!! Posted September 3, 2019 Posted September 3, 2019 43 minutes ago, Outlaw said: شفت الجول ذا؟ allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true, } allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true } -- خليه مثل هيك
N3xT Posted September 3, 2019 Posted September 3, 2019 1 hour ago, Bechi_)!! said: allowedwps = { [1] = true, [2] = true, [3] = true, [5] = true, [6] = true, [7] = true, [8] = true } -- خليه مثل هيك مالها دخل, ولصاحب الموضوع اكوادك ملخبطة وغير واضحة وفكرتك غير واضحة ايضاً
Outlaw Posted September 4, 2019 Author Posted September 4, 2019 16 hours ago, N3xT said: مالها دخل, ولصاحب الموضوع اكوادك ملخبطة وغير واضحة وفكرتك غير واضحة ايضاً 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 بدي اخلي اللاعب يستطيع أن يغير السلاح عندما يكون معه سلاح من الأسلحة الموجودة بالجدول
PaiN^ Posted September 8, 2019 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^
Abdul KariM Posted September 9, 2019 Posted September 9, 2019 @PaiN^ وعندك القيمة باللوب ترجع ترو getPedWeapon لو تلاحظ الوظيفة ترجع رقم
PaiN^ Posted September 9, 2019 Posted September 9, 2019 6 hours ago, Abdul KariM said: @PaiN^ وعندك القيمة باللوب ترجع ترو getPedWeapon لو تلاحظ الوظيفة ترجع رقم باسماء الاسلحة true أنا افترضت ان هذا الجدول مجرد مثال و انه راح يستبدل
Abdul KariM Posted September 9, 2019 Posted September 9, 2019 @PaiN^ * دامه بيحط ارقام الاسلحة طريقة الجدول بتكون غير مايحتاج الاندكس
PaiN^ Posted September 9, 2019 Posted September 9, 2019 @Abdul KariM صحيح و لكن انا سويتها بنفس طريقته بس عشان لا اغير عليه
Outlaw Posted September 10, 2019 Author Posted September 10, 2019 On 09/09/2019 at 01: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 ) كودك مو شغال و بدون اخطاء ديبق
Rockyz Posted September 10, 2019 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)
PaiN^ Posted September 16, 2019 Posted September 16, 2019 On 10/09/2019 at 07:46, Outlaw said: كودك مو شغال و بدون اخطاء ديبق ممكن انك ما عدلت التيبل ؟ جرب دا: 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 )
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