local klient = guiGridListGetItemText (ammo_Grid[1], guiGridListGetSelectedItem (ammo_Grid[1]), 1)
local ammo = guiGridListGetItemText (ammo_Grid[3], guiGridListGetSelectedItem (ammo_Grid[3]), kolumnaammo1)
function zapytajSprzedarz2 (klient, auto, player)
local klient = guiGridListGetItemText (ammo_Grid[1], guiGridListGetSelectedItem (ammo_Grid[1]), 1)
local ammo = guiGridListGetItemText (ammo_Grid[3], guiGridListGetSelectedItem (ammo_Grid[3]), kolumnaammo1)
local kasa = guiGridListGetItemText (ammo_Grid[3], guiGridListGetSelectedItem (ammo_Grid[3]), kolumnaammo2)
zapytajOkno2 = guiCreateWindow(329, 176, 406, 188, "Kupowanie broni | Ammo", false)
labelZapytanie2 = guiCreateLabel(10, 33, 387, 69, "Grzacz chce ci przeda? ammo do broni "..ammo.." za "..kasa..", czy wyra?asz na to zgode?", false, zapytajOkno2)
buttonTak2 = guiCreateButton(10, 112, 169, 62, "Tak", false, zapytajOkno2)
buttonNie2 = guiCreateButton(228, 112, 169, 62, "Nie", false, zapytajOkno2)
addEventHandler("onClientGUIClick", buttonTak2, wybraneTak2)
addEventHandler("onClientGUIClick", buttonNie2, wybraneNie2)
end
addEventHandler("onClientGUIClick", ammo_Button[6], zapytajSprzedarz2)
addEvent("onZapytajSprzedarz", true)
addEventHandler("onZapytajSprzedarz", getRootElement(), zapytajSprzedarz2)
2.Panel mandat policji problem z ifem
function (mandat, score, gracz)
local daj = getPlayerFromName(gracz)
if (daj) then
local money = getPlayerMoney(daj)
local pkt = getElementData(daj,"Score")
if (tonumber(money) > tonumber(mandat)) and (tonumber(score) < tonumber(pkt)) then
bJacob, nr 1 otwiera si? gui sprzedaj?cemu bron zamiast klientowi a co do nr 2 to ci dam
addEvent("wystawM", true)
addEventHandler("wystawM", getRootElement(),
function (mandat, score, gracz)
local daj = getPlayerFromName(gracz)
if (daj) then
local money = getPlayerMoney(daj)
local pkt = getElementData(daj,"Score")
if ( tonumber(money) > tonumber(mandat)) and (tonumber(score) < tonumber(pkt)) then
outputChatBox("Dany gracz posiada tylko #FF0000"..money.."$,#FFFFFF. Nie starczy mu na mandat!", getRootElement(), 255, 255, 255, true)
else
takePlayerMoney(daj, mandat)
setElementData(daj,"Score", pkt - score)
outputChatBox("Wystawi?e? "..gracz.." mandat w wysoko?ci #00FF00"..mandat.."$#FFFFFF.", getRootElement(), 255, 255, 255, true)
outputChatBox("Otrzyma?e? mandat w wysoko?ci #00FF00"..mandat.."$#FFFFFF.", daj, 255, 255, 255, true)
triggerClientEvent("closeM", getRootElement())
end
end
end)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach