local frakcjamarker = createMarker(-2013.81,761.32,44.60, "cylinder", 5, 25, 111,25,25)
okno = guiCreateWindow(381, 296, 515, 144, "PANEL LOGOWANIA FRAKCJI", false)
sfpd = guiCreateButton(9, 26, 161, 48, "SFPD", false, okno)
sfmc = guiCreateButton(176, 26, 161, 48, "SFMC", false, okno)
sffd = guiCreateButton(345, 26, 160, 48, "SFFD", false, okno)
wyloguj = guiCreateButton(345, 84, 160, 47, "WYLOGUJ", false, okno)
zamknij = guiCreateButton(10, 87, 160, 47, "ZAMKNIJ", false, okno)
guiSetVisible(sfpd, false)
guiSetVisible(sfmc, false)
guiSetVisible(sffd, false)
guiSetVisible(wyloguj, false)
guiSetVisible(zamknij, false)
guiSetVisible(okno, false)
addEventHandler("onClientGUIClick", zamknij,
function(el, md)
if el ~= localPlayer then return end
if guiGetVisible(okno) == true then
guiSetVisible(sfpd, false)
guiSetVisible(sfmc, false)
guiSetVisible(sffd, false)
guiSetVisible(wyloguj, false)
showCursor(false)
end
end
)
addEventHandler('onClientMarkerHit', frakcjamarker, function()
guiSetVisible(sffd, true)
guiSetVisible(sfmc, true)
guiSetVisible(sfpd, true)
guiSetVisible(wyloguj, true)
showCursor(true)
guiSetVisible(zamknij, true)
guiSetVisible(okno, true)
end)
function Policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer, politeamx )
giveWeapon ( thePlayer, 22, 5000 )
setElementModel ( thePlayer, 282 )
setElementPosition ( thePlayer, -2014.43,780.85,45.45)
else
outputChatBox( "Nie jestes pracownikiem SFPD", thePlayer, 0, 100, 255, false)
end
end
addEventHandler("onClientGUIClick",sfpd,Policja)
function Pogotowie ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer, pogoteamx )
setElementModel ( thePlayer, 275 )
setElementPosition ( thePlayer, -318.97,1048.24,20.34)
else
outputChatBox( "Nie jestes pracownikiem SFMC", thePlayer, 0, 100, 255, false)
end
end
addCommandHandler ( "loginfcmc", Pogotowie )
function Straz ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Straz" ) ) then
setPlayerTeam ( thePlayer, strazteamx )
setElementModel ( thePlayer, 277 )
giveWeapon ( thePlayer, 42)
setElementPosition ( thePlayer, 22.87,1370.73,9.25)
else
outputChatBox( "Nie jestes pracownikiem SFFD", thePlayer, 0, 100, 255, false)
end
end
addCommandHandler ( "loginfcfd", Straz )