يب تخبيص كبير
-- #Client
GUIEditor = {
gridlist = {},
window = {},
button = {}
}
GUIEditor.window[1] = guiCreateWindow(360, 173, 516, 391, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 1.00)
GUIEditor.gridlist[1] = guiCreateGridList(102, 57, 289, 247, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Skin", 0.9)
GUIEditor.button[1] = guiCreateButton(179, 320, 128, 44, "Select", false, GUIEditor.window[1])
local Skins = {
{ "#Skin1", 280 },
}
--
for _,ami in ipairs(Skins) do
local row = guiGridListAddRow(GUIEditor.gridlist[1] )
guiGridListSetItemText(GUIEditor.gridlist[1] ,row,1,ami[1],false,false)
guiGridListSetItemData(GUIEditor.gridlist[1], row, 1, ami[2])
end
--
function open( )
guiSetVisible ( GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]) )
showCursor ( guiGetVisible(GUIEditor.window[1]) )
end
bindKey( 'F7', 'down', open )
--
addEventHandler("OnClientGUIClick",GUIEditor.button[1],
function ()
if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then
local skinID = tonumber ( guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) )
triggerServerEvent ( "GetSkin", localPlayer, skinID )
else
outputChatBox ("#cc0000* 彡 [ Server ]:#d6d6d4Please Choose Your Skin.",255,255,0,true)
end
end
);
-- # Server
addEvent("GetSkin",true)
addEventHandler("GetSkin",root,
function (id)
local Money = getPlayerMoney(source)
if ( Money >= 0 ) then
takePlayerMoney( source , 0 )
setElementModel( source, id )
outputChatBox("#ffffff* #c1c1c1You got #0055ffSkin", source,0,255,0,true)
end
end
);
انا قلت لك حاول مو تروح تجيب اكواد من مود ثاني وانت مو فاهمها
جربه وقول ماني مركز