Remix110
Pewna osóbka :3
Wiek: 40 Na forum: 3663 dni Posty: 291
Nick w MP: GoodNight
Piwa : 15
Cze??, mam problem z pewnym skryptem, odpalam i marker si? nie pojawia w og?le nie dzia?a.
Server:
local mark = createPickup ( 1540.06873 , - 1674.80566 , 9838.55469 , 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 , 23 , 150 )
setWeaponAmmo ( source , 23 , 150 )
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 , 23 )
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 )
Client:
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 , "Przebieralnia Policji" , 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 , 196 * height , 190 * width , 49 * height , "Rozpocznij Prace" , false , GUIEditorq . window [ 1 ])
guiSetProperty ( GUIEditorq . button [ 3 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditorq . radiobutton [ 1 ] = guiCreateRadioButton ( 267 * width , 69 * height , 171 * width , 25 * height , "Skin 280" , false , GUIEditorq . window [ 1 ])
guiRadioButtonSetSelected ( GUIEditorq . radiobutton [ 1 ], true )
GUIEditorq . radiobutton [ 2 ] = guiCreateRadioButton ( 267 * width , 99 * height , 171 * width , 25 * height , "Skin 281" , false , GUIEditorq . window [ 1 ])
GUIEditorq . radiobutton [ 3 ] = guiCreateRadioButton ( 267 * width , 134 * height , 171 * width , 25 * height , "Policjant w cywilu" , false , GUIEditorq . window [ 1 ])
GUIEditorq . button [ 5 ] = guiCreateButton ( 25 * width , 325 * height , 185 * width , 49 * height , "Zako?cz Prace" , 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
outputChatBox ( "Opcja nie dost?pna!" , 255 , 255 , 255 , true )
else
outputChatBox ( "Wybierz skina do przebrania!" , 255 , 255 , 255 , 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 )
Debug: Warning: SAPD5/p_przebieralnia/s2.lua:97: Bad argument @ 'isObjectInACLGroup' [Expected acl -group at argument 2, got boolean]
Za pomoc i
Podpis
[you]
pomogłem?
Możesz dać piwko, przyda się na imprezę