I teraz t?umaczymy:
Gdy wejdziesz w marker pobierasz konto gracza i sprawdzasz czy jest w acl. Jezeli tak triggerujesz otwarcie gui po str client'a, jezeli nie jest to po prostu konczysz funkcj?.
local skiny = {280,285,286,300,298,72}
local ubrania = createMarker(-176.31,1112.27,19.74, "corona", 2, 0, 255, 255)
setElementData(ubrania, "marker_opis", "Wyb?r skina")
setElementInterior(ubrania, 0)
setElementDimension(ubrania, 0)
okno = guiCreateWindow(997, 179, 262, 381, "Przebieralnia", false)
gridlist = guiCreateGridList(9, 27, 243, 344, false, okno)
guiGridListAddColumn(gridlist, "ID", 0.9)
guiWindowSetSizable(okno, false)
guiSetVisible(okno, false)
for i,v in ipairs(skiny) do
local row = guiGridListAddRow(gridlist)
guiGridListSetItemText(gridlist, row, 1, v, false,false)
end
addEventHandler("onClientGUIClick", gridlist, function()
local model = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist))
if model then
triggerServerEvent("onPlayerEditSkin", getLocalPlayer(), model)
end
end)
addEventHandler("onClientMarkerHit", ubrania, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el == localPlayer then
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" )
guiSetVisible(okno, true)
showCursor(true, false)
else
outputChatBox ( "Nie jeste? VIP'EM" )
end
end
addEventHandler("onClientMarkerLeave", ubrania, function(el, md)
guiSetVisible(okno, false)
showCursor(false)
end
end)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach