Wysłany: 2018-10-06, 17:51
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
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 , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Syrene" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Syrena OSP Fort Carson" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , getRootElement (), function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_s" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEventHandler ( "onClientClick" , getRootElement (), Closegui )
addEvent ( "playSyrena_c" , true )
addEventHandler ( "playSyrena_c" , getRootElement (), function()
local syrena = playSound3D ( "syrena.wav" ,- 146.90988 , 1039.63464 , 27.25537 , true )
setSoundMaxDistance ( syrena , 1800 )
setTimer ( stopSound , 103 * 1000 , 2.5 , syrena )
end )
Server r?wnie? w syrenie
local marker = createMarker ( - 2303 , - 174.3 , 41.5 , "cylinder" , 1.0 , 0 , 0 , 0 , 170 )
function markerOSP ( el , md )
if getElementType ( el )~= "player" then return end
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( el )), aclGetGroup ( "PSP" )) then
triggerClientEvent ( el , "showGUI" , el )
end
end
addEventHandler ( "onMarkerHit" , marker , markerOSP )
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 !" , plr , 255 , 255 , 255 )
end
end
end )
addEventHandler ( "playSyrena_s" , resourceRoot , function( plr , seat )
if seat == 0 then
local accountName = getAccountName ( getPlayerAccount ( plr ))
if isObjectInACLGroup ( "user." .. accountName , aclGetGroup ( "OSP" )) then return end
outputChatBox ( "Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej" , plr , 255 , 0 , 0 )
cancelEvent ()
return
end
end )
DZWONKI
CLIENT
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Dzwonki" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Dzwonki" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , getRootElement (), function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_sc" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEvent ( "playSyrena_cc" , true )
addEventHandler ( "playSyrena_cc" , getRootElement (), function()
local syrena = playSound3D ( "pik.wav" ,- 2305 , - 174 , 42.5 , true )
setSoundMaxDistance ( syrena , 150 )
setTimer ( stopSound , 25 * 1000 , 1 , syrena )
end )
SERVER
local muker = createMarker ( - 2304 , - 178 , 41.5 , "cylinder" , 1.0 , 0 , 0 , 0 , 170 )
function marker ( el , md )
if getElementType ( el )~= "player" then return end
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( el )), aclGetGroup ( "PSP" )) then
triggerClientEvent ( el , "showGUI" , el )
end
end
addEventHandler ( "onMarkerHit" , muker , marker )
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." .. accountName , aclGetGroup ( "PSP" )) then return end
outputChatBox ( "Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej" , plr , 255 , 0 , 0 )
cancelEvent ()
return
end
end )
ZA POMOC , oraz dopisanie do autora skryptu
Wysłany: 2018-10-06, 17:52
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
Po stronie servera w obu zsobach masz createMarker, jeden z nich przenie?
Podpis
Kontakt
Discord: Qwertick#1210
Wysłany: 2018-10-06, 17:55
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
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
Wysłany: 2018-10-06, 18:11
Qwertick
Coming soon...
Wiek: 23 Na forum: 3577 dni Posty: 472
Nick w MP: Qwertick
Piwa : 2726
Tak, musisz zmieni? po?o?enie ich
Wysłany: 2018-10-06, 18:18
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
No dobra
[ Dodano : 2018-10-06, 18:21 ]
To samo
DZWONKI
local muker = createMarker ( - 2305.27954 , - 176.34778 , 41.4 , "cylinder" , 1.0 , 0 , 0 , 0 , 170 )
function marker ( el , md )
if getElementType ( el )~= "player" then return end
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( el )), aclGetGroup ( "PSP" )) then
triggerClientEvent ( el , "showGUI" , el )
end
end
addEventHandler ( "onMarkerHit" , muker , marker )
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." .. accountName , aclGetGroup ( "PSP" )) then return end
outputChatBox ( "Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej" , plr , 255 , 0 , 0 )
cancelEvent ()
return
end
end )
SYRENA
local marker = createMarker ( - 2302.66138 , - 179.00568 , 41.4 , "cylinder" , 1.0 , 0 , 0 , 0 , 170 )
function markerOSP ( el , md )
if getElementType ( el )~= "player" then return end
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( el )), aclGetGroup ( "PSP" )) then
triggerClientEvent ( el , "showGUI" , el )
end
end
addEventHandler ( "onMarkerHit" , marker , markerOSP )
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 !" , plr , 255 , 255 , 255 )
end
end
end )
addEventHandler ( "playSyrena_s" , resourceRoot , function( plr , seat )
if seat == 0 then
local accountName = getAccountName ( getPlayerAccount ( plr ))
if isObjectInACLGroup ( "user." .. accountName , aclGetGroup ( "OSP" )) then return end
outputChatBox ( "Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej" , plr , 255 , 0 , 0 )
cancelEvent ()
return
end
end )
[ Dodano : 2018-10-06, 18:23 ]
Debugscript3 https://imgur.com/a/jUt0wPy
Wysłany: 2018-10-07, 20:53
Eitho
Wiek: 24 Na forum: 3489 dni Posty: 330
Nick w MP: Eitho
Piwa : 746
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.
Wysłany: 2018-10-07, 21:05
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
Niestety nie dzia?a w DB3 wyskakuje takie co? https://imgur.com/a/qtq0G7I
[ Dodano : 2018-10-07, 21:07 ]
1.
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Syrene" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Syrena OSP Fort Carson" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , resourceRoot , function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , resourceRoot , function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_s" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEventHandler ( "onClientClick" , getRootElement (), Closegui )
addEvent ( "playSyrena_c" , true )
addEventHandler ( "playSyrena_c" , getRootElement (), function()
local syrena = playSound3D ( "syrena.wav" ,- 146.90988 , 1039.63464 , 27.25537 , true )
setSoundMaxDistance ( syrena , 1800 )
setTimer ( stopSound , 103 * 1000 , 2.5 , syrena )
end )
2.
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Dzwonki" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Dzwonki" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , resourceRoot , function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , resourceRoot , function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_sc" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEvent ( "playSyrena_cc" , true )
addEventHandler ( "playSyrena_cc" , getRootElement (), function()
local syrena = playSound3D ( "pik.wav" ,- 2305 , - 174 , 42.5 , true )
setSoundMaxDistance ( syrena , 150 )
setTimer ( stopSound , 25 * 1000 , 1 , syrena )
end )
[ Dodano : 2018-10-07, 21:14 ]
Dobra uda?o mi si? naprawi? samemu do zamkni?cia
Tagi: dwa :: różne :: skrypty :: jednym :: markerze
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: