Hi. I have a problem. I did a panel but is not working as it should. How do you kill someone it is all in the display panel. How to do in order to display only to the player who killed?
Sorry for my English. I live in Poland;]
This is the code panel
--[[ ========================================================================================
FUNKCJA TWORZY PANEL KLIENT
======================================================================================== ]]
function CreatePanel()
Panel = guiCreateWindow ( 0.5, 0.01, 0.48, 0.085, "otherLife.pl", true ) -- create a window which has "Information" in the title bar.
guiWindowSetMovable ( Panel, true )
guiSetAlpha ( Panel, 255 )
--local myImage = guiCreateStaticImage ( 0, 0, 1,1, "panel.png", true ,Panel)
-- CZAS
local myLabel = guiCreateLabel(0.02,0.28,0.94,0.2,"Czas:",true,Panel)
guiLabelSetColor ( myLabel, 255, 255, 255 )
zegar = guiCreateLabel(0.1,0.28,0.94,0.2," 00:00",true,Panel)
guiLabelSetColor ( zegar, 255, 255, 128 )
-- KASA
local myLabel = guiCreateLabel(0.02,0.55,0.94,0.2,"Kasa:",true,Panel)
guiLabelSetColor ( myLabel, 255, 255, 255 )
kasa = guiCreateLabel(0.1,0.58,0.94,0.2," 0000000 $",true,Panel)
guiLabelSetColor ( kasa, 255, 255, 128 )
-- PRACA1
local myLabel = guiCreateLabel(0.30,0.28,0.94,0.2,"Praca:",true,Panel)
guiLabelSetColor ( myLabel, 255, 255, 255 )
praca1 = guiCreateLabel(0.4,0.28,0.94,0.2," brak pracy",true,Panel)
guiLabelSetColor ( praca1, 255, 255, 128 )
-- PRACA2
local myLabel = guiCreateLabel(0.30,0.58,0.94,0.2,"Frakcja:",true,Panel)
guiLabelSetColor ( myLabel, 255, 255, 255 )
praca2 = guiCreateLabel(0.4,0.58,0.94,0.2," brak",true,Panel)
guiLabelSetColor ( praca2, 255, 255, 128 )
-- KONTRAKT
local myLabel = guiCreateLabel(0.65,0.28,0.94,0.2,"kontrakt:",true,Panel)
guiLabelSetColor ( myLabel, 255, 255, 255 )
kontrakt = guiCreateLabel(0.76,0.28,0.94,0.2," 00",true,Panel)
guiLabelSetColor ( praca1, 255, 255, 128 )
if(minuty) then
guiSetText ( Etykieta_zegar, godziny..":"..minuty )
end
end
addEventHandler( "onClientResourceStart", getRootElement(), CreatePanel )
function ShowPanel()
guiSetVisible(Panel, true)
triggerEvent ( "onOdswierzPanel", rootElement )
end
addEvent( "onShowPanel", true )
addEventHandler( "onShowPanel", getRootElement(), ShowPanel )
--[[ ========================================================================================
FUNKCJA SYNCHRONIZUJACA CZAS KLIENT
======================================================================================== ]]
function SyncTime(g,m)
if (tonumber(m)<= 9) then
m = "0"..m
end
if (tonumber(g)<= 9) then
g = "0"..g
end
minuty = m
godziny = g
guiSetText ( zegar, g..":"..m )
end
addEvent( "onSyncTime", true )
addEventHandler( "onSyncTime", getRootElement(), SyncTime )
--[[ ========================================================================================
FUNKCJA ZEGARKA
======================================================================================== ]]
function zegarek ()
if (minuty>=60) then
minuty = 0
godziny = godziny + 1
end
if (godziny>=24) then
godziny = 0
minuty = 0
end
minuty = minuty + 1
if (minuty<= 9) then
minuty = "0"..minuty
end
if (godziny<= 9) then
godziny = "0"..godziny
end
guiSetText ( zegar, godziny..":"..minuty )
setTimer ( zegarek, 60000, 0)
end
setTimer ( zegarek, 60000, 0)
--[[ ========================================================================================
FUNKCJA ODSWIERZA DANE NA PANELU
======================================================================================== ]]
function refreshData(kasa_1,praca1_1,praca2_1,kontrakt_1)
outputChatBox(" [bIZNES] ok")
guiSetText ( kasa, kasa_1..' $' )
guiSetText ( praca1, praca1_1)
guiSetText ( praca2, praca2_1)
guiSetText ( kontrakt, kontrakt_1..' h')
end
addEvent( "onRefreshData", true )
addEventHandler( "onRefreshData", getRootElement(), refreshData )
if someone is able to help. Thank you very much