function tank_data()
GUIEditor = {
label = { } ,
staticimage = { }
}
if show == true then
tank = getPedOccupiedVehicle(localPlayer) -- definicja obiektu tank
hp = getElementHealth(tank) -- hp obiektu tank
speed = getElementSpeed(tank,"km/h") -- pr?dko?? obiektu tank
GUIEditor.staticimage[1] = guiCreateStaticImage( 15, 880, hp, 20, "hp.png", false) -- tworzenie paska hp
GUIEditor.label[3] = guiCreateLabel(15, 920, 94, 15, speed .."km/h", false) -- tworzenie linijki z pr?dko?ci? pojazdu
guiSetFont(GUIEditor.label[3], "default-bold-small")
end
end
addEventHandler("onClientRender", root, tank_data)