Jump to content

تعديل


Le3bA

Recommended Posts

سلام عليكم بغيت اسوي اذا كتب في ايدت وضعط علي زرار

يروح الكلام الكتبو في الايدت للقريد لست يعني دا سبورت سيستم ^_^

م اشتغل الكود %_%
كلنت :

addEventHandler ( 'onClientGUIClick', root,
    function (    )
	     if source == GUIEditor.button[1] then
		 local message = guiGetText ( GUIEditor.edit[1] )
		 if message == "" then return end
	         guiSetEnabled( GUIEditor.button[1], false )
		 setTimer( guiSetEnabled, 1000, 1, GUIEditor.button[1], true )
		 triggerServerEvent ( 'Support;Send', localPlayer, message )
              end
         end
)


function GridList ( player, message )
      local aRow = guiGridListAddRow ( GUIEditor.gridlist[1] )
	  guiGridListSetItemText ( GUIEditor.gridlist[1], aRow, 1,' '..player..' '..message..' ', false, false )   	
end
addEvent ( 'Support;AddGridlist', true )
addEventHandler ( 'Support;AddGridList', root, GridList )

سرفر :

addEvent ( 'Support;Send', true )
addEventHandler ( 'Support;Send', root,
     function ( player, message )
	      local player = getPlayerName ( source )
		  triggerClientEvent ( 'Support;AddGridList', root, player, message )
	end
)

 

Link to comment
addEventHandler ( 'onClientGUIClick', root,
    function (    )
	     if source == GUIEditor.button[1] then
		 local message = guiGetText ( GUIEditor.edit[1] )
		 if message == "" then return end
	         guiSetEnabled( GUIEditor.button[1], false )
		 setTimer( guiSetEnabled, 1000, 1, GUIEditor.button[1], true )
		 triggerServerEvent ( 'Support;Send', localPlayer, message,getPlayerName(localPlayer) )
              end
         end
)


function GridList ( Name, message )
      local aRow = guiGridListAddRow ( GUIEditor.gridlist[1] )
	  guiGridListSetItemText ( GUIEditor.gridlist[1], aRow, 1,' '..Name..' : '..message..' ', false, false )   	
end
addEvent ( 'Support;AddGridlist', true )
addEventHandler ( 'Support;AddGridList', root, GridList )


addEvent ( 'Support;Send', true )
addEventHandler ( 'Support;Send', root,
     function ( Name, message )
		  triggerClientEvent ( 'Support;AddGridList', root, Name, message )
	end
)

 

Link to comment
addEvent ( 'Support;AddGridlist', true )
function GridList ( Name, message )
      local aRow = guiGridListAddRow ( GUIEditor.gridlist[1] )
	  guiGridListSetItemText ( GUIEditor.gridlist[1], aRow, 1,' '..Name..' : '..message..' ', false, false )   	
end
addEventHandler ( 'Support;AddGridList', root, GridList )

بدل هذا

واكتب باف 8 debugscript 3

وصوره لي

Link to comment

Client

addEventHandler ( 'onClientGUIClick', root,
    function (    )
	    if ( source == GUIEditor.button[1] ) then
			local message = guiGetText ( GUIEditor.edit[1] )
			local name = getPlayerName ( localPlayer )
			if ( message and message ~= "" ) then
				guiSetEnabled( GUIEditor.button[1], false )
				setTimer( guiSetEnabled, 1000, 1, GUIEditor.button[1], true )
				triggerServerEvent ( 'Support;Send', localPlayer, message, name )
			end
        end
	end
)


function GridList ( msg, name )
	if ( msg and name ) then
		local aRow = guiGridListAddRow ( GUIEditor.gridlist[1] )
		guiGridListSetItemText ( GUIEditor.gridlist[1], aRow, 1,' '..name..' : '..msg, false, false )   	
	end
end
addEvent ( 'Support;AddGridlist', true )
addEventHandler ( 'Support;AddGridList', root, GridList )

Server

addEvent ( 'Support;Send', true )
addEventHandler ( 'Support;Send', root,
    function ( msg, name )
		triggerClientEvent ( root, 'Support;AddGridList', root, msg, name )
	end
)

 

  • Like 1
Link to comment

انت تبي الكل يشوف الكلام ولا انت بس؟

-------- Client

addEventHandler("onClientGUIClick", SendBTN, ----- تغير اسم الزار
function ( )
    aZText = guiGetText(SendEdit) ------ تغير اسم الايديت
        if ( aZText == "" ) or ( aZText == " " ) then  outputChatBox("قم بكتابة اي شئ",255,255,0,true)return end
            triggerServerEvent ( 'Event' , localPlayer , aZText )
end , false )


addEvent('addText' , true )
addEventHandler('addText' , getRootElement ( ),
function ( )
    local aRow2 = guiGridListAddRow ( gridNews ) ---- تغير اسم القريد لست حقتك
        guiGridListSetItemText ( gridNews ,  aRow2 , 1 , aZText , false , false ) ---- GridNews غير هذي لـ اسم القريد لست حقك
        guiGridListSetItemColor ( gridNews , aRowz , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) ---- GridNews غير هذي لـ اسم القريد لست حقك
end )



------ Server

addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
    triggerClientEvent( getRootElement ( ) , 'addText', getRootElement ( ) , aText )
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...