local screenX, screenY = guiGetScreenSize()
local width, height = 250, 300
local x = (screenX/1.15) - (width/2)
local y = (screenY/2) - (height/2)
PlateWnd = guiCreateWindow(x,y,width,height,"Panel Zmiany Rejestracji",false)
guiWindowSetSizable(PlateWnd,false)
guiWindowSetMovable(PlateWnd, false)
guiSetVisible(PlateWnd, false)
guiSetInputMode("no_binds_when_editing")
editPlate = guiCreateEdit(20, 65, 210, 30, "", false, PlateWnd)
guiEditSetMaxLength(editPlate, 8)
button1Plate = guiCreateButton(13, 257, 110, 30, "OK", false, PlateWnd)
button2Plate = guiCreateButton(127, 257, 110, 30, "Zamknij", false, PlateWnd)
lbl1Plate = guiCreateLabel(45, 21, 188, 17, "Wcisni OK Aby Zmienic Tablice", false, PlateWnd)
ldl2Plate = guiCreateLabel(75, 41, 117, 17, "(Max. 8 Symboli)", false, PlateWnd)
lbl3Plate = guiCreateLabel(40,110,250,17,"Skrypt W Fazie Testow/Poprawek",false,PlateWnd)
guiLabelSetColor(lbl3Plate, 128, 128, 128)
addCommandHandler( "plate", function()
if isPedInVehicle(getLocalPlayer()) then
if (guiGetVisible(PlateWnd) == true) then
guiSetVisible(PlateWnd, false)
showCursor(false)
else
guiSetVisible(PlateWnd, true)
showCursor (true)
end
else
outputChatBox("Musisz Byc W Pojezdzie Jesli Chczesz Zmienic Tablice",getLocalPlayer(),255,0,0)
end
end)
function setButton()
local veh = getPedOccupiedVehicle(getLocalPlayer())
local number = guiGetText(editPlate)
setVehiclePlateText( veh, number )
guiSetVisible(PlateWnd,false)
showCursor(false)
end
addEventHandler ( "onClientGUIClick", button1Plate, setButton )
function closeButton()
guiSetVisible(PlateWnd, false)
showCursor(false)
end
addEventHandler ( "onClientGUIClick", button2Plate, closeButton )