Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-08-16, 21:25


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam jak dorobi? do tego ?e tylko gracz kt?ry jest w ACL Fc-Straz moze wybrac skina ;?

local skiny = {278,277,279,35,77,87,266,309}


local playerName getAccountName getPlayerAccount thePlayer ) ) 
setElementData(ubrania"marker_opis""Wyb?r skina")
setElementInterior(ubrania3)
setElementDimension(ubrania5353)

okno guiCreateWindow(997179262381"Przebieralnia"false)
gridlist guiCreateGridList(927243344falseokno)
guiGridListAddColumn(gridlist"ID"0.9)
guiWindowSetSizable(oknofalse)
guiSetVisible(oknofalse)

for i,v in ipairs(skiny) do
    local row guiGridListAddRow(gridlist)
    guiGridListSetItemText(gridlistrow1vfalse,false)
end

addEventHandler("onClientGUIClick"gridlist, function()
    local model guiGridListGetItemText(gridlistguiGridListGetSelectedItem(gridlist))
    
    if model then
        triggerServerEvent("onPlayerEditSkin"getLocalPlayer(), model)
    end
end)

addEventHandler("onClientMarkerHit"ubrania, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
    if el == localPlayer then
        guiSetVisible(oknotrue)
        showCursor(truefalse)
    end
end)

addEventHandler("onClientMarkerLeave"ubrania, function(elmd)
    guiSetVisible(oknofalse)
    showCursor(false)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 14:55


MikeY







Wiek: 24
Na forum: 3968 dni
Posty: 3
Nick w MP: Retro



Respekt: 50

u?yj funkcji isObjectInACLGroup

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 20:39


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

Spr?buj

local skiny = {278,277,279,35,77,87,266,309}


local playerName getAccountName getPlayerAccount thePlayer ) ) 
 if isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup "Fc-Straz" ) ) then
setElementData(ubrania"marker_opis""Wyb?r skina")
setElementInterior(ubrania3)
setElementDimension(ubrania5353)

okno guiCreateWindow(997179262381"Przebieralnia"false)
gridlist guiCreateGridList(927243344falseokno)
guiGridListAddColumn(gridlist"ID"0.9)
guiWindowSetSizable(oknofalse)
guiSetVisible(oknofalse)

for i,v in ipairs(skiny) do
    local row guiGridListAddRow(gridlist)
    guiGridListSetItemText(gridlistrow1vfalse,false)
end
end

addEventHandler("onClientGUIClick"gridlist, function()
    local model guiGridListGetItemText(gridlistguiGridListGetSelectedItem(gridlist))
    
    if model then
        triggerServerEvent("onPlayerEditSkin"getLocalPlayer(), model)
    end
end)

addEventHandler("onClientMarkerHit"ubrania, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
    if el == localPlayer then
        guiSetVisible(oknotrue)
        showCursor(truefalse)
    end
end)

addEventHandler("onClientMarkerLeave"ubrania, function(elmd)
    guiSetVisible(oknofalse)
    showCursor(false)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 21:12


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

sebik, ja ju? mu to da?em w jego drugim temacie.

ps. acl na c-side?

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-08-17, 21:18


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

AstroStudio, Co? z tym pokombinuj :)

local ubrania createMarker(xyz'cylinder'2.0255000)
setElementInterior(ubrania3)
setElementDimension(ubrania5353)
 
function MarkerHithitElementmatchingDimension )
    if matchingDimension then
        if isObjectInACLGroup "user." .. getAccountName(getPlayerAccount(hitElement)), aclGetGroup "Fc-Straz") ) then
            triggerClientEvent(hitElement"nazwa"hitElement)
        end
    end
end
addEventHandler"onMarkerHit"ubraniaMarkerHit)


[ Dodano: 2015-08-18, 00:23 ]
oczywi?cie server

Postaw piwo autorowi tego posta
 

 
Tagi: skiny
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Skiny Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku