Jump to content

مساعدة


Outlaw

Recommended Posts

شباب بدي أخلي البيد لما يكون عليه داتا 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
  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
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 by PaiN^
Link to comment
  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

اتوقع هذا الي تبيه, جرب :

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
  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

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...