Jump to content

' فكشنات '


Adham

Recommended Posts

سلام عليكم ابي فكشنات .

لما يحدد اسم الاعب من القريد ليست

ويكتب في الايديت اي دي الشخصيه

ويدوس علي الزرار 

يعطي الاعب المحدد شخصيه والاي دي المحدد في الايديت .

Link to comment
الخطأ هنا ؟

addEventHandler ( 'onClientGUIClick', root,
    if ( source == GUIEditor.button[2] ) then
               local Name = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )
               local ID = guiGetText ( GUIEditor.edit[2] )
               triggerServerEvent ( 'CheakPlayer;skin', localPlayer, Name, ID )
            end
        end
)
 
 
 --server
 addEvent( 'CheakPlayer;skin', true )
addEventHandler( 'CheakPlayer;skin', root, 
    function( player, ID )
          local player = getPlayerFromName( player )
          setElementModel ( player, ID )
end )

-- دي بق
setElementModel ( player, ID )  -- في الكود هنا

 

Edited by Le3bA
Link to comment

-- Client

addEventHandler("onClientGUIClick",root,
function ( )
if ( source == Button ) then
if ( guiGridListGetSelectedItem(List ) ~= -1 ) then
local plr = guiGridListGetItemText(List ,guiGridListGetSelectedItem(List ),1)

local player = getPlayerFromName ( plr )

local ID = guiGetText ( GUIEditor.edit[2] )

triggerServerEvent ( "skin", localPlayer , plr , ID ) 
end
end 
end ) 

-- Server


addEvent ( "skin", true)
 addEventHandler ( "skin", root,
 function ( plr , ID )
 
setElementModel ( plr, ID )

 end
 end )

 

جرب

Link to comment
47 minutes ago, Le3bA said:

الخطأ هنا ؟

addEventHandler ( 'onClientGUIClick', root,
    if ( source == GUIEditor.button[2] ) then
               local Name = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )
               local ID = guiGetText ( GUIEditor.edit[2] )
               triggerServerEvent ( 'CheakPlayer;skin', localPlayer, Name, ID )
            end
        end
)
 
 
 --server
 addEvent( 'CheakPlayer;skin', true )
addEventHandler( 'CheakPlayer;skin', root, 
    function( player, ID )
          local player = getPlayerFromName( player )
          setElementModel ( player, ID )
end )

-- دي بق
setElementModel ( player, ID )  -- في الكود هنا

 

؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟

Link to comment
addEventHandler ( 'onClientGUIClick', root,
	function ( )
		if source == GUIEditor.button[2] then
			if guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 then
               local Name = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )
               local ID = guiGetText ( GUIEditor.edit[2] )
               triggerServerEvent ( 'CheakPlayer;skin', localPlayer, Name, ID )
			end
		end
	end
)

-- Server

 addEvent( 'CheakPlayer;skin', true )
addEventHandler( 'CheakPlayer;skin', root, 
    function( player, ID )
          local player = getPlayerFromName( player )
		  if player then
			setElementModel ( player, ID )
	  end
end )

 

Link to comment
addEventHandler ( 'onClientGUIClick', root,
	function ( )
		if source == GUIEditor.button[2] then
			if guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 then
               local Name = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 )
               local ID = guiGetText (GUIEditor.edit[2])
			   if ID ~= "" then 
               triggerServerEvent ( 'CheakPlayer;skin', localPlayer,Name,ID )
			end
		end
	end
end
)

-- Server

 addEvent( 'CheakPlayer;skin', true )
addEventHandler( 'CheakPlayer;skin', root, 
    function(Name,ID)
          local player = getPlayerFromName(Name)
			setElementModel(player,ID)
	  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...