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

Wysłany: 2018-10-06, 17:51


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Witam mam dziwny problem. Ot?? mam dwa ca?kiem inne skrypty w ca?kiem innej mecie, a dzieje si? takie co? https://imgur.com/a/VplnM1W


DWA KODY

Client w syrenie OSP !

x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Syrene"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Syrena OSP Fort Carson"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"getRootElement(), function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(truefalse)
end)

addEvent("hideGUI"true)
addEventHandler("hideGUI"getRootElement(), function()
    guiSetVisible(buttonfalse)
    removeEventHandler("onClientRender"getRootElement(), drawSyrena)
    showCursor(false)
    panel=false
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_s"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

addEventHandler("onClientClick"getRootElement(), CloseguiaddEvent("playSyrena_c"true)
addEventHandler("playSyrena_c"getRootElement(), function()
local syrena playSound3D("syrena.wav",-146.909881039.6346427.25537truesetSoundMaxDistance(syrena1800)
setTimer(stopSound,103*10002.5syrena)
end)


Server r?wnie? w syrenie

local marker createMarker( -2303, -174.341.5"cylinder"1.0000170) 

function markerOSP(elmd) 
 if getElementType(el)~="player" then return end
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(el)),aclGetGroup("PSP")) then 
   triggerClientEvent(el"showGUI"el)
 end 
end
addEventHandler ("onMarkerHit"markermarkerOSP)

addEventHandler("onMarkerLeave"marker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEventHandler("onMarkerLeave"muker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEvent("playSyrena_s"true)
addEventHandler("playSyrena_s"getRootElement(), function()
triggerClientEvent("playSyrena_c"getRootElement())
    for k,v in ipairs(getElementsByType("player")) do
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("OSP")) then
        outputChatBox("Syrena OSP, stra?acy do remizy !"plr255 255255 )
        end
    end
end)

addEventHandler("playSyrena_s"resourceRoot, function(plr,seat)
if seat == 0 then
local accountName=getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accountNameaclGetGroup("OSP")) then return end
outputChatBox("Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej"plr25500)
cancelEvent()
return
end
end)


DZWONKI

CLIENT

x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Dzwonki"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Dzwonki"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"getRootElement(), function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(truefalse)
end)

addEvent("hideGUI"true)
addEventHandler("hideGUI"getRootElement(), function()
    guiSetVisible(buttonfalse)
    removeEventHandler("onClientRender"getRootElement(), drawSyrena)
    showCursor(false)
    panel=false
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_sc"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

addEvent("playSyrena_cc"true)
addEventHandler("playSyrena_cc"getRootElement(), function()
local syrena playSound3D("pik.wav",-2305, -17442.5truesetSoundMaxDistance(syrena150)
setTimer(stopSound,25*10001syrena)
end)


SERVER

local mukercreateMarker( -2304, -17841.5"cylinder"1.0000170) 

function marker(elmd) 
 if getElementType(el)~="player" then return end
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(el)),aclGetGroup("PSP")) then 
   triggerClientEvent(el"showGUI"el)
 end 
end
addEventHandler ("onMarkerHit"mukermarker)

addEventHandler("onMarkerLeave"marker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEventHandler("onMarkerLeave"muker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEvent("playSyrena_sc"true)
addEventHandler("playSyrena_sc"getRootElement(), function()
triggerClientEvent("playSyrena_cc"getRootElement())
    for k,v in ipairs(getElementsByType("player")) do
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("OSP")) then
        outputChatBox(".")
        end
    end
end)

addEventHandler("playSyrena_sc"resourceRoot, function(plr,seat)
if seat == 0 then
local accountName=getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accountNameaclGetGroup("PSP")) then return end
outputChatBox("Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej"plr25500)
cancelEvent()
return
end
end)



ZA POMOC R* , :piwo: oraz dopisanie do autora skryptu

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-06, 17:52


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Po stronie servera w obu zsobach masz createMarker, jeden z nich przenie?

Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-06, 17:55


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

W jakim sensie przenie?? Chodzi o zmian? po?o?enia ?
Je?li tak to s? dwa oddzielne markery.

[ Dodano: 2018-10-06, 17:58 ]
https://imgur.com/a/wbGc0O5

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-06, 18:11


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Tak, musisz zmieni? po?o?enie ich

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-06, 18:18


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

No dobra

[ Dodano: 2018-10-06, 18:21 ]
To samo

DZWONKI

local mukercreateMarker( -2305.27954, -176.3477841.4"cylinder"1.0000170) 

function marker(elmd) 
 if getElementType(el)~="player" then return end
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(el)),aclGetGroup("PSP")) then 
   triggerClientEvent(el"showGUI"el)
 end 
end
addEventHandler ("onMarkerHit"mukermarker)

addEventHandler("onMarkerLeave"marker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEventHandler("onMarkerLeave"muker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEvent("playSyrena_sc"true)
addEventHandler("playSyrena_sc"getRootElement(), function()
triggerClientEvent("playSyrena_cc"getRootElement())
    for k,v in ipairs(getElementsByType("player")) do
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("OSP")) then
        outputChatBox(".")
        end
    end
end)

addEventHandler("playSyrena_sc"resourceRoot, function(plr,seat)
if seat == 0 then
local accountName=getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accountNameaclGetGroup("PSP")) then return end
outputChatBox("Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej"plr25500)
cancelEvent()
return
end
end)




SYRENA

local marker createMarker( -2302.66138, -179.0056841.4"cylinder"1.0000170) 

function markerOSP(elmd) 
 if getElementType(el)~="player" then return end
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(el)),aclGetGroup("PSP")) then 
   triggerClientEvent(el"showGUI"el)
 end 
end
addEventHandler ("onMarkerHit"markermarkerOSP)

addEventHandler("onMarkerLeave"marker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEventHandler("onMarkerLeave"muker, function(el,md)
    if getElementType(el) ~= "player" then return end
    triggerClientEvent(el"hideGUI"el)
end)

addEvent("playSyrena_s"true)
addEventHandler("playSyrena_s"getRootElement(), function()
triggerClientEvent("playSyrena_c"getRootElement())
    for k,v in ipairs(getElementsByType("player")) do
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("OSP")) then
        outputChatBox("Syrena OSP, stra?acy do remizy !"plr255 255255 )
        end
    end
end)

addEventHandler("playSyrena_s"resourceRoot, function(plr,seat)
if seat == 0 then
local accountName=getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..accountNameaclGetGroup("OSP")) then return end
outputChatBox("Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej"plr25500)
cancelEvent()
return
end
end)


[ Dodano: 2018-10-06, 18:23 ]
Debugscript3 https://imgur.com/a/jUt0wPy

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-07, 20:53


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

Zignoruj poprzedni? wypowied?. Zmie? nazwy event?w (showGUI, hideGUI) na r??ne, lub zmie?
addEventHandler("showGUI"getRootElement(), function()
na
addEventHandler("showGUI"resourceRoot, function()


oraz
addEventHandler("hideGUI"getRootElement(), function()
na
addEventHandler("hideGUI"resourceRoot, function()
w powy?szych skryptach.

Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-07, 21:05


adisonboss







Wiek: 23
Na forum: 3331 dni
Posty: 237

Piwa: 6

Respekt: 50

Niestety nie dzia?a w DB3 wyskakuje takie co? https://imgur.com/a/qtq0G7I

[ Dodano: 2018-10-07, 21:07 ]
1.

x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Syrene"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Syrena OSP Fort Carson"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"resourceRoot, function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(truefalse)
end)

addEvent("hideGUI"true)
addEventHandler("hideGUI"resourceRoot, function()
    guiSetVisible(buttonfalse)
    removeEventHandler("onClientRender"getRootElement(), drawSyrena)
    showCursor(false)
    panel=false
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_s"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

addEventHandler("onClientClick"getRootElement(), CloseguiaddEvent("playSyrena_c"true)
addEventHandler("playSyrena_c"getRootElement(), function()
local syrena playSound3D("syrena.wav",-146.909881039.6346427.25537truesetSoundMaxDistance(syrena1800)
setTimer(stopSound,103*10002.5syrena)
end)


2.

x,guiGetScreenSize()
button guiCreateButton(627/1440*x510/900*y209/1440*x123/900*y"Uruchom Dzwonki"false)
guiSetProperty(button"NormalTextColour""FFAAAAAA")
guiSetVisible(buttonfalse)

function drawSyrena()
dxDrawRectangle(600/1440*x278/900*y261/1440*x372/900*ytocolor(0033184), false)
dxDrawRectangle(590/1440*x265/900*y289/1440*x16/900*ytocolor(18700255), false)
dxDrawText("Dzwonki"616/1440*x346/900*y851/1440*x445/900*ytocolor(255255255255), 3.00"default""center""center"falsefalsefalsefalsefalse)
end

addEvent("showGUI"true)
addEventHandler("showGUI"resourceRoot, function()
guiSetVisible(buttontrue)
addEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(truefalse)
end)

addEvent("hideGUI"true)
addEventHandler("hideGUI"resourceRoot, function()
    guiSetVisible(buttonfalse)
    removeEventHandler("onClientRender"getRootElement(), drawSyrena)
    showCursor(false)
    panel=false
end)

addEventHandler("onClientGUIClick"button, function()
triggerServerEvent("playSyrena_sc"getLocalPlayer())
guiSetVisible(buttonfalse)
removeEventHandler("onClientRender"getRootElement(), drawSyrena)
showCursor(false)
endfalse)

addEvent("playSyrena_cc"true)
addEventHandler("playSyrena_cc"getRootElement(), function()
local syrena playSound3D("pik.wav",-2305, -17442.5truesetSoundMaxDistance(syrena150)
setTimer(stopSound,25*10001syrena)
end)


[ Dodano: 2018-10-07, 21:14 ]
Dobra uda?o mi si? naprawi? samemu do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: dwa :: różne :: skrypty :: jednym :: markerze
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Dwa różne skrypty w jednym markerze 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