Wysłany: 2015-08-16, 21:25
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4329 dni Posty: 698
Piwa : 2080
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 ( ubrania , 3 )
setElementDimension ( ubrania , 5353 )
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
guiSetVisible ( okno , true )
showCursor ( true , false )
end
end )
addEventHandler ( "onClientMarkerLeave" , ubrania , function( el , md )
guiSetVisible ( okno , false )
showCursor ( false )
end
end )
Wysłany: 2015-08-17, 14:55
MikeY
Wiek: 24 Na forum: 3968 dni Posty: 3
Nick w MP: Retro
u?yj funkcji isObjectInACLGroup
Wysłany: 2015-08-17, 20:39
sebik2303
Mapper :)
Wiek: 25 Na forum: 4160 dni Posty: 298
Nick w MP: sebik2303
Piwa : 899
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 ( ubrania , 3 )
setElementDimension ( ubrania , 5353 )
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
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
guiSetVisible ( okno , true )
showCursor ( true , false )
end
end )
addEventHandler ( "onClientMarkerLeave" , ubrania , function( el , md )
guiSetVisible ( okno , false )
showCursor ( false )
end
end )
Wysłany: 2015-08-17, 21:12
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
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
Wysłany: 2015-08-17, 21:18
sebik2303
Mapper :)
Wiek: 25 Na forum: 4160 dni Posty: 298
Nick w MP: sebik2303
Piwa : 899
AstroStudio , Co? z tym pokombinuj
local ubrania = createMarker ( x , y , z , 'cylinder' , 2.0 , 255 , 0 , 0 , 0 )
setElementInterior ( ubrania , 3 )
setElementDimension ( ubrania , 5353 )
function MarkerHit ( hitElement , matchingDimension )
if matchingDimension then
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( hitElement )), aclGetGroup ( "Fc-Straz" ) ) then
triggerClientEvent ( hitElement , "nazwa" , hitElement )
end
end
end
addEventHandler ( "onMarkerHit" , ubrania , MarkerHit )
[ Dodano : 2015-08-18, 00:23 ]
oczywi?cie server
Tagi: skiny
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: