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

Wysłany: 2018-09-01, 16:13


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Niestety mam problem ze skryptem ot?? po prostu nie dzia?a w db3 nic kod


--]] Autor skryptuPatrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

bm createMarker(-2305.70557, -157.9933034.26875"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d createObject (5856, -2306.5, -155.3936.40000) -- podajesz koordy obiektu

local kategoria_animacji "CRIB"
local animacja "CRIB_Use_Switch"

function od thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,  -2306.5, -155.3932.20 ) -- Koordy otwartych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
        end
    end
end

function zd thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,-2306.5, -155.3936.40) -- koordy zamknietych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) 
        end
    end
end
addCommandHandler("756djgndng5r54gt7875t54t65bgy45g"od ) -- haslo otwartych drzwi
addCommandHandler("t5gnu4gu54ygvb54vgv45g76y45g6745"zd ) -- haslo zamknietych drzwi

addEventHandler("onPlayerJoin",root,function()
 bindKey("mouse_wheel_down","both","756djgndng5r54gt7875t54t65bgy45g") 
 bindKey("mouse_wheel_up","both","t5gnu4gu54ygvb54vgv45g76y45g6745")
end)
bool bindKey string keystring keyStatestring commandName, [ string arguments ] )

Dodam i? to jest skrypt podpisany pod map?.




ZA Podes?anie dzia?aj?cego skryptu R* i :piwo: za pomoc :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-01, 16:28


JakisPolak199

wieczny student






Wiek: 20
Na forum: 3510 dni
Posty: 131
Nick w MP: bover.

Piwa: 905

Respekt: 150
Respekt: 150Respekt: 150

na samym dole ci umkn??o, to ?e jest funkcja bez znacznika "--" chodzi mi o to:
bool bindKey string keystring keyStatestring commandName, [ string arguments ] )

Usu? to i wszystko b?dzie ?miga? :) licze na :piwo:

[ Dodano: 2018-09-01, 16:30 ]
Aha i jeszcze je?li nadal nie dzia?a to zmie? to:
--]] Autor skryptuPatrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

na to:

--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--


Podpis
Kontakt mailowo: [email protected]
Kontakt Discord: bover.

Portfolio: https://boversoneg.github.io/

socialproject.pl // discord.gg/socialproject
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Wysłany: 2018-09-01, 16:56


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
"JakisPolak199" napisał/a:

[ Dodano: 2018-09-01, 16:30 ]
Aha i jeszcze je?li nadal nie dzia?a to zmie? to:
--]]?Autor?skryptu:?Patrix
--W?bindach?pomaga?:?Atex
--W?animacji?pomaga?:?Emm
--Zakaz?zmiany?autora![[--

na to:


--[[
Autor?skryptu:?Patrix
W?bindach?pomaga?:?Atex
W?animacji?pomaga?:?Emm
Zakaz?zmiany?autora!
]]--



Co to zmieni? jest zakomentowane, wi?c nie ma znaczenia co tam jest w "?rodku". ;)

addEventHandler("onPlayerJoin",root,function()
 bindKey(source"mouse_wheel_down","both","756djgndng5r54gt7875t54t65bgy45g") 
 bindKey(source"mouse_wheel_up","both","t5gnu4gu54ygvb54vgv45g76y45g6745")
end)

Aby zadzia?a?o musisz dodatkowo zrobi? reconnect, aby Ci si? ustawi?y bindy.

Polecam dorzuci? to:
addEventHandler("onResourceStart",root,function()
for k,v in ipairs(getElementsByType("player")) do
 bindKey(v"mouse_wheel_down","both","756djgndng5r54gt7875t54t65bgy45g") 
 bindKey(v"mouse_wheel_up","both","t5gnu4gu54ygvb54vgv45g76y45g6745")
end
end)


Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Wysłany: 2018-09-03, 16:31


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Takie co? mam i nadal nie dzia?a

--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--

bm createMarker(-2305.70557, -157.9933034.26875"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d createObject (5856, -2306.5, -155.3936.40000) -- podajesz koordy obiektu

local kategoria_animacji "CRIB"
local animacja "CRIB_Use_Switch"

function od thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,  -2306.5, -155.3932.20 ) -- Koordy otwartych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
        end
    end
end

function zd thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,-2306.5, -155.3936.40) -- koordy zamknietych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) 
        end
    end
end
addCommandHandler("756djgndng5r54gt7875t54t65bgy45g"od ) -- haslo otwartych drzwi
addCommandHandler("t5gnu4gu54ygvb54vgv45g76y45g6745"zd ) -- haslo zamknietych drzwi

addEventHandler("onResourceStart",root,function()
for k,v in ipairs(getElementsByType("player")) do
 bindKey(v"mouse_wheel_down","both","756djgndng5r54gt7875t54t65bgy45g") 
 bindKey(v"mouse_wheel_up","both","t5gnu4gu54ygvb54vgv45g76y45g6745")
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 17:17


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Marker by? zbyt nisko i nie wykrywa? gracza, kt?ry w niego wchodzi?.
Od siebie dorzuci?em bindowanie klawisza po wej?ciu i odbindowywanie po wyj?ciu z markera.

Gotowy kod:

--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--

bm createMarker(-2305.70557, -157.9933034.36875"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d createObject (5856, -2306.5, -155.3936.40000) -- podajesz koordy obiektu

local kategoria_animacji "CRIB"
local animacja "CRIB_Use_Switch"

function od thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,  -2306.5, -155.3932.20 ) -- Koordy otwartych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
        end
    end
end

function zd thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d10000,-2306.5, -155.3936.40) -- koordy zamknietych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) 
        end
    end
end
addCommandHandler("756djgndng5r54gt7875t54t65bgy45g"od ) -- haslo otwartych drzwi
addCommandHandler("t5gnu4gu54ygvb54vgv45g76y45g6745"zd ) -- haslo zamknietych drzwi

addEventHandler("onMarkerHit"bm, function(elmd)
    if not md then return end
        bindKey(el"mouse_wheel_down""down""756djgndng5r54gt7875t54t65bgy45g") 
        bindKey(el"mouse_wheel_up""down""t5gnu4gu54ygvb54vgv45g76y45g6745")
end)

addEventHandler("onMarkerLeave"bm, function(elmd)
    if not md then return end
        unbindKey(el"mouse_wheel_down""down""756djgndng5r54gt7875t54t65bgy45g") 
        unbindKey(el"mouse_wheel_up""down""t5gnu4gu54ygvb54vgv45g76y45g6745")
end)



PS. Je?li chcesz unikn?? zb?dnych komend (no chyba, ?e ich u?ywasz w innym skrypcie jeszcze) - mo?esz u?y? kodu poni?ej i b?dzie mia? on takie samo dzia?anie jak kod powy?ej:


--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--

local bm createMarker(-2305.70557, -157.9933034.36875"cylinder"1.0000255)
local d createObject (5856, -2306.5, -155.3936.40000)


function od(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,  -2306.5, -155.3932.20)
            setPedAnimation(thePlayer"CRIB""CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)            
        end
    end
end

function zd(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,-2306.5, -155.3936.40)
            setPedAnimation(thePlayer"CRIB","CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)            
        end
    end
end

addEventHandler("onMarkerHit"bm, function(elmd)
    if not md then return end
        bindKey(el"mouse_wheel_down""down"od) 
        bindKey(el"mouse_wheel_up""down"zd)
end)

addEventHandler("onMarkerLeave"bm, function(elmd)
    if not md then return end
        unbindKey(el"mouse_wheel_down""down"od) 
        unbindKey(el"mouse_wheel_up""down"zd)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 18:58


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Lipa bo nadal nic

--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--

local bm createMarker(-2305.70557, -157.9933034.5"cylinder"1.0000255)
local d createObject (5856, -2306.5, -155.3936.40000)


function od(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,  -2306.5, -155.3932.20)
            setPedAnimation(thePlayer"CRIB""CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)            
        end
    end
end

function zd(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,-2306.5, -155.3936.40)
            setPedAnimation(thePlayer"CRIB","CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)            
        end
    end
end

addEventHandler("onMarkerHit"bm, function(elmd)
    if not md then return end
        bindKey(el"mouse_wheel_down""down"od) 
        bindKey(el"mouse_wheel_up""down"zd)
end)

addEventHandler("onMarkerLeave"bm, function(elmd)
    if not md then return end
        unbindKey(el"mouse_wheel_down""down"od) 
        unbindKey(el"mouse_wheel_up""down"zd)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:10


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Aby rozwi?za? problem:

- upewnij si?, ?e jeste? zalogowany na konto
- upewnij si?, ?e konto, na kt?rym jeste? zalogowany jest dodane w ACL do grupy pod nazw? "PSP".
* https://wiki.multitheftauto.com/wiki/Access_Control_List *

Po za-komentowaniu blokady ACL kod dzia?a bez problemu.
(sprawd? to u siebie - ?eby si? upewni?)

Je?li Tw?j system frakcji dzia?a za pomoc? elementDaty - zmie? blokad? na odpowiedni? elementDat?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:13


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Oto chodzi w?a?nie ?e jestem w ACL PSP

[ Dodano: 2018-09-03, 20:17 ]
https://imgur.com/a/yFcStYS

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:17


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

"adisonboss" napisał/a:

Oto chodzi w?a?nie ?e jestem w ACL PSP


- Pode?lij sw?j plik acl.xml.
- Po jakiej stronie wpisa?e? ten skrypt?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:19


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

ACL

<!-- UWAGAWylacz serwer przed edycja tego pliku! -->
<!-- WARNINGStop the server before editing this file! -->
<acl>
    <group name="Everyone">
        <acl name="Default"></acl>
        <object name="user.*"></object>
        <object name="resource.*"></object>
    </group>
    <group name="Moderator">
        <acl name="Moderator"></acl>
        <object name="resource.mapcycler"></object>
        <object name="resource.mapmanager"></object>
        <object name="resource.resourcemanager"></object>
        <object name="resource.votemanager"></object>
    </group>
    <group name="SuperModerator">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
    </group>
    <group name="Admin">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="resource.admin"></object>
        <object name="resource.webadmin"></object>
        <object name="resource.acpanel"></object>
        <object name="user.adizygzak"></object>
    </group>
    <group name="Console">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="user.Console"></object>
    </group>
    <group name="RPC">
        <acl name="RPC"></acl>
    </group>
    <group name="MapEditor">
        <acl name="Default"></acl>
        <acl name="MapEditor"></acl>
        <object name="resource.editor_main"></object>
        <object name="resource.edf"></object>
    </group>
    <group name="raceACLGroup">
        <acl name="Default"></acl>
        <acl name="raceACL"></acl>
        <object name="resource.race"></object>
    </group>
    <group name="DevGroup">
        <acl name="DevACL"></acl>
    </group>
    <group name="zarzadPSP">
        <object name="user.adizygzak"></object>
    </group>
    <group name="PSP">
        <object name="user.adizygzak"></object>
        <object name="resource.podno?nikpsp"></object>
    </group>
    <group name="zarzadOSP">
        <object name="user.MajorGames"></object>
    </group>
    <group name="OSP">
        <object name="user.MajorGames"></object>
    </group>
    <group name="Policja">
        <object name="user.robert88985"></object>
        <object name="user.adizygzak"></object>
    </group>
    <group name="ZarzadKGP">
        <object name="user.adizygzak"></object>
    </group>
    <group name="PD"></group>
    <group name="zarzadPD"></group>
    <group name="PR">
        <object name="user.adizygzak"></object>
    </group>
    <group name="zarzadPR">
        <object name="user.adizygzak"></object>
    </group>
    <acl name="Default">


[ Dodano: 2018-09-03, 20:20 ]
META

<meta>
    <script src="brama1.lua" type="client"></script>
    <script src="brama2.lua" />
    <script src="brama3.lua" />
    <script src="brama4.lua" />
    <script src="brama5.lua" />
    <script src="brama6.lua" />
    <script src="brama7.lua" />
    <script src="brama8.lua" />
    <script src="brama9.lua" />
    <script src="brama11.lua" />
    <script src="brama12.lua" />
    <script src="blip3.lua" />
    <script src="brama0.lua" />
    <info type="map" version="1.0.0"></info>
    <map src="jrg1sf.map" dimension="0"></map>
    <settings>
        <setting name="#maxplayers" value="[ 128 ]"></setting>
        <setting name="#useLODs" value="[ false ]"></setting>
        <setting name="#gamespeed" value="[ 1 ]"></setting>
        <setting name="#minplayers" value="[ 0 ]"></setting>
        <setting name="#gravity" value="[ 0.008 ]"></setting>
        <setting name="#waveheight" value="[ 0 ]"></setting>
        <setting name="#locked_time" value="[ false ]"></setting>
        <setting name="#weather" value="[ 0 ]"></setting>
        <setting name="#time" value="12:0"></setting>
    </settings>
    <script src="mapEditorScriptingExtension_s.lua" type="server"></script>
    <script src="mapEditorScriptingExtension_c.lua" type="client" validate="false"></script>
</meta>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:23


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Rozumiem, ?e plik, na kt?rym operujemy w tym w?tku nazywa si? brama1.lua. Je?li tak - musi on by? po stronie servera.

<script src="brama1.lua" type="server" />


Je?li nie - podaj nazw? tego pliku.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Wysłany: 2018-09-03, 20:24


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Jezus Maria po stronie serwera trzeba by?o. Dzi?ki wielkie respekcik i piwo zas?u?one dzi?ki wielkie

[ Dodano: 2018-09-03, 20:32 ]
WR?C JESZCZE JEDNA SPRAWA

[ Dodano: 2018-09-03, 20:32 ]
Wilq, A jak chce zrobi? jeszcze jedn? bram? to dlaczego ta pierwsza nie dzia?a ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:46


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Najprawdopodobniej zmienne z bramy pierwszej oraz bramy drugiej koliduj? ze sob?.
Tworz?c drug? bram? mo?na u?y? zmiennej z poprzedniej bramy z dopiskiem '2' lub wykorzysta? nast?puj?ce tabele:

local bramy = {}
bramy[1] = *kod*
bramy[2] = *kod*

local markerybram = {}
markerybram[1] = *kod*
markerybram[2] = *kod*


oraz odpowiednio zrobiony skrypt na zmienne bram i marker?w.

Przyk?adowy kod pierwszego sposobu:

--[[
Autor skryptuPatrix
W bindach pomaga?: Atex
W animacji pomaga?: Emm
Zakaz zmiany autora!
]]--

-- BRAMA PIERWSZA

local bm createMarker(-2305.70557, -157.9933034.5"cylinder"1.0000255)
local d createObject (5856, -2306.5, -155.3936.40000)


function od(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,  -2306.5, -155.3932.20)
            setPedAnimation(thePlayer"CRIB""CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)   
        end
    end
end

function zd(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d10000,-2306.5, -155.3936.40)
            setPedAnimation(thePlayer"CRIB","CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)  
        end
    end
end

addEventHandler("onMarkerHit"bm, function(elmd)
    if not md then return end
        bindKey(el"mouse_wheel_down""down"od) 
        bindKey(el"mouse_wheel_up""down"zd)
end)

addEventHandler("onMarkerLeave"bm, function(elmd)
    if not md then return end
        unbindKey(el"mouse_wheel_down""down"od) 
        unbindKey(el"mouse_wheel_up""down"zd)
end)

-- BRAMA DRUGA

local bm2 createMarker(xyz"cylinder"1.0000255)
local d2 createObject (5856xyz000)


function odbrama2(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbm2then
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d210000,  -2306.5, -155.3932.20)
            setPedAnimation(thePlayer"CRIB""CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)   
        end
    end
end

function zdbrama2(thePlayerkeystate)
    if isElementWithinMarker(thePlayerbm2then
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
            moveObject(d210000,-2306.5, -155.3936.40)
            setPedAnimation(thePlayer"CRIB","CRIB_Use_Switch"truefalsefalse)
            setTimer(setPedAnimation1066.661thePlayer)  
        end
    end
end

addEventHandler("onMarkerHit"bm2, function(elmd)
    if not md then return end
        bindKey(el"mouse_wheel_down""down"odbrama2) 
        bindKey(el"mouse_wheel_up""down"zdbrama2)
end)

addEventHandler("onMarkerLeave"bm2, function(elmd)
    if not md then return end
        unbindKey(el"mouse_wheel_down""down"odbrama2) 
        unbindKey(el"mouse_wheel_up""down"zdbrama2)
end)


W powy?szym kodzie zmie? oczywi?cie koordynaty markera oraz obiektu bramy drugiej. ; )

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-03, 20:54


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Na prawde dzi?ki wielki. Dobrej nocy !

Postaw piwo autorowi tego posta
 

 
Tagi: brama :: marker
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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