جربتة ضبط بس اذا ضغطت الزر ما يعطيك الشخصية , الكود هذا اللي سسويتة لي :
Skins = {
{ 'Name', ID },
{ 'Name', ID },
{ 'Name', ID }
}
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Label = {}
GUIEditor_Grid = {}
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false)
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1])
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1])
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1])
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1])
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 )
local Column = guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.2 )
guiSetVisible ( GUIEditor_Window[1], false )
for k,v in ipairs( Skins ) do
local Row = guiGridListAddRow( GUIEditor_Grid[1] )
guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, tostring(v[1]), false, false )
guiGridListSetItemData( GUIEditor_Grid[1],Row,Column, tostring(v[2]))
end
addEventHandler('onClientGUIClick',root,
function()
if source == GUIEditor_Button[1] then local r,c = guiGridListGetSelectedItem( GUIEditor_Grid[1] )
if r and c and r ~= '' and c ~= '' then
local Set = tonumber( guiGridListGetItemData( GUIEditor_Grid[1], r, c ) )
setElementModel( localPlayer, Set )
triggerServerEvent('onHave',localPlayer)
elseif source == GUIEditor_Button[1] then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false )
end
end
end
)
addEvent( "onHit", true )
addEventHandler( "onHit",root,
function ()
guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true )
end
)
ابغى احط وظيفة اذا الاعب حدد على الجريد لست قبل لا يظغط الرز, كيف؟