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

Wysłany: 2018-08-17, 23:29


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

nie wiem jak to zrobi? pom??cie pliska
client

GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[6] = guiCreateWindow(496, 279, 383, 270, "Suszarka", false)
        guiSetVisible(GUIEditor.window[6], false)
        guiWindowSetSizable(GUIEditor.window[6], false)
        guiSetAlpha(GUIEditor.window[6], 1.00)

        GUIEditor.button[1] = guiCreateButton(99, 66, 166, 133, "We?\nsuszarke", false, GUIEditor.window[6])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")    
    end
)


marker = createMarker( 1568.36243, -1690.81848, 4.89063, "cylinder", 1, 0, 0, 255, 170 )


function hit(ele)
    if source == marker then else return end
    if getElementType( ele ) == "player" then else return end
    if ele == getLocalPlayer() then else return end
    if isElementWithinMarker ( ele, marker ) then else return end
    guiSetVisible(GUIEditor.window[6], true)
    showCursor(true)
end
addEventHandler("onClientMarkerHit", marker, hit)

function wezsuszare()
if source ~= GUIEditor.button[1] then return end
    triggerServerEvent("wezsuszare2", localPlayer)
    guiSetVisible(GUIEditor.window[6], false)
    showCursor(false)
end
addEventHandler("onClientGUIClick", root, wezsuszare)



server
addEvent("wezsuszare2", true)
addEventHandler("wezsuszare2", root, function()
    outputChatBox("Wzi??e? suszarke policyjn?", source,true)
    giveWeapon ( source, 23, 99999 )
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-18, 00:10


amited







Wiek: 26
Na forum: 3855 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

policje masz na elementDate, skina, grupe acl czy?

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-18, 00:11


santex







Wiek: 31
Na forum: 3127 dni
Posty: 21
Nick w MP: santex

Piwa: 186

Respekt: 50

 
GUIEditor = {
    button = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[6] = guiCreateWindow(496, 279, 383, 270, "Suszarka", false)
        guiSetVisible(GUIEditor.window[6], false)
        guiWindowSetSizable(GUIEditor.window[6], false)
        guiSetAlpha(GUIEditor.window[6], 1.00)

        GUIEditor.button[1] = guiCreateButton(99, 66, 166, 133, "We?\nsuszarke", false, GUIEditor.window[6])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")    
    end
)


marker = createMarker( 1568.36243, -1690.81848, 4.89063, "cylinder", 1, 0, 0, 255, 170 )


function hit(ele)
    if source == marker then else return end
    if getElementType( ele ) == "player" then else return end
    if ele == getLocalPlayer() then else return end
    if isElementWithinMarker ( ele, marker ) then else return end
    guiSetVisible(GUIEditor.window[6], true)
    showCursor(true)
end
addEventHandler("onClientMarkerHit", marker, hit)

function wezsuszare()
if source ~= GUIEditor.button[1] then return end
If getElementData(localPlayer, 'frakcja') == 'SAPD' then 
    triggerServerEvent("wezsuszare2", localPlayer)
    guiSetVisible(GUIEditor.window[6], false)
    showCursor(false)
else
    outputChatBox(' Nie jeste? we frakcji.',  255,255,255, true) 
end
end
addEventHandler("onClientGUIClick", root, wezsuszare)


Nie testowane, sprawd? i zamie? element dat? na swoj?.

Podpis

:-)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-18, 07:11


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

Na grupe acl mam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-18, 10:54


Gpla

Loading...






Wiek: 26
Na forum: 3994 dni
Posty: 84
Nick w MP: Loading...

Piwa: 174

Respekt: 55,3


addEvent("wezsuszare2", true)
addEventHandler("wezsuszare2", root, function()
local accName = getAccountName ( getPlayerAccount ( source ) )
if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then return end
    outputChatBox("Wzi??e? suszarke policyjn?", source,true)
    giveWeapon ( source, 23, 99999 )
end
end)


Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobić :: żeby :: tylko :: policja :: mogła :: używać :: suszarki
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » jak zrobić żeby tylko policja mogła używać suszarki 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