Jump to content

موشكلة في مود


Recommended Posts

لما احدد اللاعب واوزع ما يوزع

ملف سيرفر

addEvent("moneyforp", true)
addEventHandler("moneyforp", root,
	function(mtxt, player)
	local player = getPlayerFromName(player)
		if ( player ) then
			givePlayerMoney( player, mtxt )
		end
	end
)

 

ملف كلنت

addEventHandler("onClientGUIClick", mma7,
	function()
	local slctd = guiGridListGetSelectedItem( grid )
	local txt = guiGridListGetItemText( grid, slctd, 1 )
	local mtxt = guiGetText(GUIEditor.edit[1])
		if ( source == GUIEditor.button[2] ) then
			if ( slctd ~= -1 ) then
				if mtxt == "" then
				outputChatBox( " #00ffff[ Gave Money ] #ff0000 الرجاء كتابة مبلغ للتوزيع ", 255, 0, 0, true )
				return end
				triggerServerEvent( "moneyforp",localPlayer, txt, mtxt )
			else
				outputChatBox( " #00ffff[ Gave Money ] #ff0000 الرجاء إخـتيار لاعـب ", 255, 0, 0, true )
			end
		end
	end
)

 

Edited by A7MEDENO
Link to comment
addEventHandler("onClientGUIClick", mma7,

mma7 = ?

جرب

addEventHandler ( "onClientGUIClick", resourceRoot,
	function ( )
		if source == button then
			local name = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 )
			local number = guiGetText ( edit )
			if name == "" or number == "" then return end
			triggerServerEvent ( "onSendMoney", localPlayer, name, number )
		end
	end
)

-- Server

addEvent ( "onSendMoney", true )
addEventHandler ( "onSendMoney", root,
	function(name,number)
		if name and number then
			local player = getPlayerFromName(name)
			if player then
				givePlayerMoney(player,tonumber(number))
			end
		end
	end
)

 

Edited by Deativated
Link to comment
2 hours ago, Deativated said:

addEventHandler("onClientGUIClick", mma7,

mma7 = ?

جرب


addEventHandler ( "onClientGUIClick", resourceRoot,
	function ( )
		if source == button then
			local name = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 )
			local number = guiGetText ( edit )
			if name == "" or number == "" then return end
			triggerServerEvent ( "onSendMoney", localPlayer, name, number )
		end
	end
)

-- Server

addEvent ( "onSendMoney", true )
addEventHandler ( "onSendMoney", root,
	function(name,number)
		if name and number then
			local player = getPlayerFromName(name)
			if player then
				givePlayerMoney(player,tonumber(number))
			end
		end
	end
)

 

 

شوف يالطيب

mma7 = getResourceRootElemen()

 

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