Jump to content

اواجه مشكله


Recommended Posts

ما اشتغل

الكود

ملف سيرفر

addEvent("weapon", true)
addEventHandler("weapon", root,
	function( action, ID, ammo )
		if ( action == "wpp" ) then
			giveWeapon( source, ID, ammo, true )
		end
	end
)

 

ملف كلنت

local wep = { -- { Weapon / ID / Ammo / Money } --
	{"M4", "31", "1000", "9000"},
	{"Minigun", "38", "1000", "9000"},
}

function refreesh ()
	guiGridListClear( wpgrd )
	for i, v in ipairs ( wep ) do
	local rowwp = guiGridListAddRow( wpgrd )
	guiGridListSetItemText( wpgrd, rowwp, 1, tostring( v[1] ), false, false )
	guiGridListSetItemData( wpgrd, rowwp, 1,{ ID = v[2] , ammo = v[3] , money = v[4] } )
end
end

bindKey( "f7", "down",
	function()
		if guiGetVisible( GUIEditor.window[1] ) then
			guiSetVisible( GUIEditor.window[1], false )
			showCursor(false)
		else
			guiSetVisible( GUIEditor.window[1], true )
			showCursor(true)
			refreesh ()
		end
	end
)

		
addEventHandler("onClientGUIClick", wshroot, 
	function()
	local ss = guiGridListGetSelectedItem( wpgrd )
	local tt = guiGridListGetItemText( wpgrd, ss, 1 )
		if ( source == GUIEditor.button[1] ) then
			if ( ss ~= -1 ) then
				triggerServerEvent ( "weapon" , localPlayer , "wpp" )
			end
		end
	end
)

 

Edited by A7MEDENO
Link to comment
33 minutes ago, Deativated said:

triggerServerEvent ( "weapon" , localPlayer , "wpp" )

تعال هنا كلنت

وهنا سيرفر


function( action, ID, ammo )

ID ammo = مو معرفين بالتريقر

وبعدين مسوي داتا علي الجدول

ومو جايبها بكود الإرسال

وكيف اعرفهم بتريقر؟؟؟

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