Witam chcia?bym Przerobi? Owy skrypt Aby By?a Syrena Dla PSP pod Mysqol a nie ACL i
chc? ?eby mia?a jaki? d?wi?k
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 Strazy Po?arnej", 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)
end)
addEventHandler("onClientGUIClick", button, function()
triggerServerEvent("playSyrena_s", getLocalPlayer())
guiSetVisible(button, false)
removeEventHandler("onClientRender", getRootElement(), drawSyrena)
showCursor(false)
end, false)
addEvent("playSyrena_c", true)
addEventHandler("playSyrena_c", getRootElement(), function()
local syrena = playSound3D("AsA.ogg", -2123.45,-12.66,46.50, true)
setSoundMaxDistance(syrena, 50)
setTimer(stopSound, 25*1000, 1, syrena)
2 kod
marker = createMarker(1931.39,-2009.92,17.35, "cylinder", 1, 0, 0, 0, 170)
addEventHandler("onMarkerHit", marker, function(he)
if getElementType(he) == "player" then
triggerClientEvent(he, "showGUI", he)
end
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("Straz Pozarna")) then
outputChatBox(" ",v)
outputChatBox(" ",v)
outputChatBox("* #FF0000Niedaleko Ciebie rozlega si? d?wi?k #14FF00SYRENY #FF0000alarmowej stra?y #006E03PO?ARNEJ, #FF0000jeste? stra?akiem Jedz do #6500FFREMIZY!*",v, 255, 255, 255, true)
outputChatBox(" ",v)
outputChatBox(" ",v)
end
end
end)
|