Now problem is can't add clothes
Client side :
addEventHandler("onClientGUIClick",Clothes_Window,
function (beer)
if b == "left" then
if source == BuyClothes then
guiSetVisible(Clothes_Window,false)
local Selected = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 1 )
local Selected2 = guiGridListGetItemText ( NameClothes_Grid, guiGridListGetSelectedItem ( NameClothes_Grid ), 2 )
triggerServerEvent("getClothes",localPlayer,Selected,Selected2)
outputChatBox("You Selected"..Selected.."for 0$")
guiSetVisible(Clothes_Window,false)
showCursor(false)
end
end
end)
Server Side:
function get_Clothes ( Selected, Selected2 )
addPedClothes (source,""..tostring(Selected2).."", "hoodyamerc", tonumber(Selected) )
end
addEvent("getClothes",true)
addEventHandler("getClothes",getRootElement(),get_Clothes)