Ameryk
Wiek: 25 Na forum: 2374 dni Posty: 3
Nick w MP: Ameryk
To jest c.lua
mojeW , mojeH = 1680 , 1050
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
GUIEditorq = {
button = {},
window = {},
radiobutton = {}
}
GUIEditorq . window [ 1 ] = guiCreateWindow ( 578 * width , 234 * height , 500 * width , 384 * height , "Szatnia i Magazyn" , false )
guiWindowSetSizable ( GUIEditorq . window [ 1 ], false )
GUIEditorq . button [ 1 ] = guiCreateButton ( 28 * width , 75 * height , 192 * width , 49 * height , "Pobierz Bro?" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditorq . button [ 2 ] = guiCreateButton ( 28 * width , 147 * height , 192 * width , 49 * height , "Pobierz Kamizelke" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditorq . button [ 3 ] = guiCreateButton ( 300 * width , 250 * height , 190 * width , 49 * height , "Rozpocznij S?u?b?" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditorq . radiobutton [ 1 ] = guiCreateRadioButton ( 267 * width , 50 * height , 171 * width , 25 * height , "LAPD" , false , GUIEditorq . window [ 1 ])
guiRadioButtonSetSelected ( GUIEditorq . radiobutton [ 1 ], true )
GUIEditorq . radiobutton [ 2 ] = guiCreateRadioButton ( 267 * width , 68 * height , 171 * width , 25 * height , "SFPD" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 3 ] = guiCreateRadioButton ( 267 * width , 86 * height , 171 * width , 25 * height , "Ubranie Szefa SAPD" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 4 ] = guiCreateRadioButton ( 267 * width , 104 * height , 171 * width , 25 * height , "LVPD" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 5 ] = guiCreateRadioButton ( 267 * width , 122 * height , 171 * width , 25 * height , "SOSA" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 6 ] = guiCreateRadioButton ( 267 * width , 140 * height , 171 * width , 25 * height , "SOSA2" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 7 ] = guiCreateRadioButton ( 267 * width , 158 * height , 171 * width , 25 * height , "Mary" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 8 ] = guiCreateRadioButton ( 267 * width , 176 * height , 171 * width , 25 * height , "S.W.A.T" , false , GUIEditorq . window [ 1 ]))
GUIEditorq . radiobutton [ 9 ] = guiCreateRadioButton ( 267 * width , 194 * height , 171 * width , 25 * height , "FIB" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 10 ] = guiCreateRadioButton ( 267 * width , 212 * height , 171 * width , 25 * height , "Stan Wojenny" , false , GUIEditorq . window [ 1 ])
GUIEditorq . button [ 5 ] = guiCreateButton ( 25 * width , 325 * height , 250 * width , 49 * height , "Zako?cz S?u?b?" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 5 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditorq . button [ 6 ] = guiCreateButton ( 449 * width , 23 * height , 41 * width , 36 * height , "X" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 6 ], "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( GUIEditorq . window [ 1 ], false )
addEvent ( "startGGPol" , true )
addEventHandler ( "startGGPol" , root ,
function( hitElement )
if hitElement == localPlayer then
guiSetVisible ( GUIEditorq . window [ 1 ], true )
showCursor ( true )
end
end
)
function onZamknij4 ()
guiSetVisible ( GUIEditorq . window [ 1 ], false )
showCursor ( false )
end
addEventHandler ( "onClientGUIClick" , GUIEditorq . button [ 6 ], onZamknij4 , false )
function przebierz ()
if guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 1 ]) then
triggerServerEvent ( "przebierzPol" , localPlayer , 280 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 2 ]) then
triggerServerEvent ( "przebierzPol" , localPlayer , 281 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 3 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 228 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 4 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 282 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 5 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 283 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 6 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 288 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 7 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 284 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 8 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 285 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 9 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 286 )
elseif guiRadioButtonGetSelected ( GUIEditorq . radiobutton [ 10 ]) then
triggerServerEvent ( "PrzebierzPol" , localPlayer , 287 )
else
outputChatBox ( "Wybierz skina do przebrania!" , 255 , 0 , 0 , true )
end
end
addEventHandler ( "onClientGUIClick" , GUIEditorq . button [ 3 ], przebierz , false )
function zakoncz ()
triggerServerEvent ( "zakonczPol" , localPlayer )
end
addEventHandler ( "onClientGUIClick" , GUIEditorq . button [ 5 ], zakoncz , false )
function bron ()
triggerServerEvent ( "bronPol" , localPlayer )
end
addEventHandler ( "onClientGUIClick" , GUIEditorq . button [ 1 ], bron , false )
function kam ()
triggerServerEvent ( "kamizelkaPol" , localPlayer )
end
addEventHandler ( "onClientGUIClick" , GUIEditorq . button [ 2 ], kam , false )
To jest s.lua
local mark = createPickup ( 254.2509765625 , 77.1572265625 , 1003.640625 , 3 , 1275 , 1 )
setElementInterior ( mark , 6 )
addEventHandler ( "onPickupHit" , mark ,
function( player )
local accName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "Policja" ) ) then
triggerClientEvent ( player , "startGGPol" , root , player )
end
end
)
addEvent ( "przebierzPol" , true )
addEventHandler ( "przebierzPol" , root ,
function( model )
local skin = getElementModel ( source )
local gracz = getPlayerName ( source )
local nick = getPlayerFromName ( gracz )
local acc = getPlayerAccount ( nick )
local accName = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "Policja" ) ) then
if getAccountData ( acc , "PracaPol" ) == false then
setAccountData ( acc , "starySkinPol" , skin )
setElementModel ( source , model )
setAccountData ( acc , "PracaPol" , true )
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Rozpoczynasz s?u?be" , source , 255 , 255 , 255 , true )
toggleControl ( source , "fire" , true )
toggleControl ( source , "aim_weapon" , true )
toggleControl ( source , "action" , true )
else
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Jeste? ju? na s?u?bie!" , source , 255 , 255 , 255 , true )
end
end
end
)
addEvent ( "bronPol" , true )
addEventHandler ( "bronPol" , root ,
function()
local gracz = getPlayerName ( source )
local nick = getPlayerFromName ( gracz )
local acc = getPlayerAccount ( nick )
if getAccountData ( acc , "PracaPol" ) == true then
giveWeapon ( source , 3 )
giveWeapon ( source , 22 , 200 )
giveWeapon ( source , 25 , 25 )
setWeaponAmmo ( source , 23 , 200 )
setWeaponAmmo ( source , 25 , 25 )
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Pobierasz bro? z magazynu" , source , 255 , 255 , 255 , true )
else
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Nie jeste? na s?u?bie!" , source , 255 , 255 , 255 , true )
end
end
)
addEvent ( "kamizelkaPol" , true )
addEventHandler ( "kamizelkaPol" , root ,
function()
local gracz = getPlayerName ( source )
local nick = getPlayerFromName ( gracz )
local acc = getPlayerAccount ( nick )
if getAccountData ( acc , "PracaPol" ) == true then
setPlayerArmor ( source , 100 )
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Pobierasz kamizelke z magazynu" , source , 255 , 255 , 255 , true )
else
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Nie jeste? na s?u?bie!" , source , 255 , 255 , 255 , true )
end
end
)
addEvent ( "zakonczPol" , true )
addEventHandler ( "zakonczPol" , root ,
function()
local gracz = getPlayerName ( source )
local nick = getPlayerFromName ( gracz )
local acc = getPlayerAccount ( nick )
local skin = getAccountData ( acc , "starySkinPol" )
if getAccountData ( acc , "PracaPol" ) == true then
setElementModel ( source , skin )
setAccountData ( acc , "PracaPol" , false )
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Ko?czysz s?u?be" , source , 255 , 255 , 255 , true )
toggleControl ( source , "fire" , false )
toggleControl ( source , "aim_weapon" , false )
toggleControl ( source , "action" , false )
takeWeapon ( source , 3 )
takeWeapon ( source , 22 )
takeWeapon ( source , 25 )
else
outputChatBox ( "#FF0036[#919191Policja#FF0036]#919191Nie jeste? na s?u?bie!" , source , 255 , 255 , 255 , true )
end
end
)
local function trzezwienie ()
local players = getElementsByType ( 'player' )
for i , v in pairs ( players ) do
local acc = getPlayerAccount ( v )
local accName = getAccountName ( acc )
if getAccountData ( acc , "PracaPol" ) == true or isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "ModeratorG" ) ) then
toggleControl ( v , "fire" , true )
toggleControl ( v , "aim_weapon" , true )
toggleControl ( v , "action" , true )
end
end
end
setTimer ( trzezwienie , 4000 , 0 )
Problem jest w tym, ?e jak chc? si? przepra? np w S.W.A.T to nie dzia?a, i nie pokazuje si? ?adna informacja, je?li by kto? pom?g? to dam piwo [Je?li zadzia?a]