function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end
-- Settings
function pobierzDate(type,time)
realTime=getRealTime()
type=tostring(type)
time=tonumber(time)
if time < 0 then return end
if type == "m" then
if time > 59 then return end
value1=realTime.minute+time
value3 = realTime.monthday
else
value1=realTime.minute
value3 = realTime.monthday
end
if type == "h" then
if time > 23 then return end
value2=realTime.hour+time
else
value2=realTime.hour
end
if type == "d" then if time > 31 then return end value3=realTime.monthday+time else value3=realTime.monthday end
if type == "w" then if time > 11 then return end value4=realTime.month+time else value4=realTime.month end
if value1 >= 60 then value1 = value1-60; value2=value2+1 end
if value2 >= 24 then value2 = value2-24; value3=value3+1 end
if value3 >= 31 then value3 = value3-31; value4=value4+1 end
date=string.format("%04d-%02d-%02d ", realTime.year+1900, value4+1, value3)
time=string.format("%02d:%02d:%02d", value2, value1, realTime.second)
return date..time
end
addCommandHandler("pobierz.kolor", function(plr)
if getAdmin(plr, 4) then
local veh = getPedOccupiedVehicle(plr)
local c1, c2, c3, c4, c5, c6, c7, c8, c9 = getVehicleColor(veh, true)
local l1, l2, l3 = getVehicleHeadLightColor(veh)
outputChatBox("Kolor podstawowy: #007aff"..c1..", "..c2..", "..c3.."", plr, 255, 255, 255, true)
outputChatBox("Kolor dodatkowy: #007aff"..c4..", "..c5..", "..c6.."", plr, 255, 255, 255, true)
outputChatBox("Kolor felg: #007aff"..c7..", "..c8..", "..c9.."", plr, 255, 255, 255, true)
outputChatBox("Kolor świateł: #007aff"..l1..", "..l2..", "..l3.."", plr, 255, 255, 255, true)
end
end)
--[[
addCommandHandler("sprawdz.pojazdy", function(player)
pojazdow = 0
for key, value in pairs(getElementsByType('vehicle')) do
if getElementData(value, 'vehicle:id') then
pojazdow = pojazdow+1
end
end
outputChatBox('* Pojazdów na mapie: '..pojazdow, player)
end)
]]
addCommandHandler("ranga", function(plr,cmd,target,numer)
if getAdmin(plr, 4) or getAdmin(plr, 8) or getAdmin(plr, 7) then
if not target or not numer or not tonumber(numer) then
outputChatBox("?Użycie: /ranga <id> <numer>", plr, 255, 255, 255) outputChatBox("0 - DEGRAD | 1 - Mod | 2 - Admin | 3 - root | 4 - zalozyciel | 5 - opiekun\n| 6 - tmod | 7 - ViceZ | 8 - Emeryt", plr, 255, 255, 255)
return end
if tonumber(numer) > 8 or tonumber(numer) < 0 then
outputChatBox("✔Użycie: /ranga <id> <numer>", plr, 255, 255, 255) outputChatBox("0 - DEGRAD | 1 - Mod | 2 - Admin | 3 - root | 4 - zalozyciel | 5 - opiekun\n| 6 - tmod | 7 - ViceZ | 8 - Emeryt", plr, 255, 255, 255)
return end
local gracz=exports["pystories-core"]:findPlayer(plr,target)
if not gracz then outputChatBox("(?)Nie ma takiego gracza!", plr, 255, 255, 255) end
local serial=getPlayerSerial(gracz)
--
local sel=exports["pystories-db"]:dbGet("SELECT * FROM pystories_admins WHERE serial=?", serial)
if sel and #sel > 0 then
if tonumber(numer) == 0 then
exports['pystories-db']:dbSet("DELETE from pystories_admins where serial=?",serial)
setElementData(gracz,"player:admin",false)
setElementData(gracz,"player:level",false)
triggerEvent("save:player",root,gracz)
triggerEvent("load:player",root,gracz)
setPlayerName(gracz,getPlayerName(gracz):gsub("#%x%x%x%x%x%x",""))
outputChatBox(("* Zabrałeś %s rangę administracyjną!"):format(getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."("..getElementData(gracz,"id")..")"),plr,255, 255, 255)
return end
exports['pystories-db']:dbSet("UPDATE pystories_admins set level=? where serial=?",numer,serial)
--outputChatBox(("%s awansował Cię na range %s!"):format(getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."("..getElementData(plr,"id")..")",tekst_rangi[tonumber(numer)]),gracz,255, 255, 255)
--outputChatBox(("?Nadałeś %s rangę %s!"):format(getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."("..getElementData(gracz,"id")..")",tekst_rangi[tonumber(numer)]),plr,255, 255, 255)
else
--if tonumber(numer) == 0 then outputChatBox("* Ten gracz nie mial rangi!",plr,255,0,0) return end
exports["pystories-db"]:dbSet("INSERT INTO pystories_admins (serial,date,level,added) VALUES (?,?,?,NOW())",serial,getPlayerName(gracz):gsub("#%x%x%x%x%x%x",""),numer)
outputChatBox(("%s awansował Cię na range %s!"):format(getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."("..getElementData(plr,"id")..")",tekst_rangi[tonumber(numer)]),gracz,25,153,255)
outputChatBox(("?Nadałeś %s rangę %s!"):format(getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."("..getElementData(gracz,"id")..")",tekst_rangi[tonumber(numer)]),plr,255,153,255)
end
end
end)
addCommandHandler ( "schowaj", function(plr,cmd,id )
if getAdmin(plr, 6) or getAdmin(plr, 5) or getAdmin(plr, 4) or getAdmin(plr, 3) or getAdmin(plr, 2) or getAdmin(plr, 1) or getAdmin(plr, 7) then
if not id or not tonumber(id) then
outputChatBox("✘ Podaj id pojazdu!", plr, 255, 0, 0)
return
end
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking = 1,tp_to_parking = ? WHERE id = ?",getElementData(plr, "player:nickname"), id)
for i,v in ipairs(getElementsByType("vehicle")) do
if getElementData(v,"vehicle:id") == tonumber(id) then
exports["pystories-vehicles"]:onSaveVehicle(v)
destroyElement(v)
triggerClientEvent(plr,"onClientAddNotification",plr, "Pojazd został przeniesiony do przechowywalni!", "success")
end
end
end
end)
addCommandHandler ( "schowajall", function(plr,cmd )
if getAdmin(plr, 4) then
for i,v in ipairs(getElementsByType("vehicle")) do
if getElementData(v,"vehicle:id") then
exports["pystories-vehicles"]:onSaveVehicle(v)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking = 1,tp_to_parking = ? WHERE id = ?",getElementData(plr, "player:nickname"), getElementData(v,"vehicle:id") )
destroyElement(v)
triggerClientEvent(plr,"onClientAddNotification",plr, "Wszystkie pojazdy zostały przeniesione do przechowywalni!", "success")
end
end
end
end)
addCommandHandler("tppos", function(plr,cmd,x,y,z)
if getAdmin(plr, 6) or getAdmin(plr, 5) or getAdmin(plr, 4) or getAdmin(plr, 3) or getAdmin(plr, 2) or getAdmin(plr, 7) or getAdmin(plr,8) then
x,y,z = tonumber(x),tonumber(y),tonumber(z)
if not x or not y or not z then
outputChatBox("Podaj pozycje x y z!", plr, 255, 255, 255)
return
end
setElementPosition(plr,x,y,z)
outputChatBox("Przeniesiono!", plr, 255, 255, 255)
end
end)
addCommandHandler('ac', function(plr,cmd, ...)
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
if not getElementData(plr,"player:admin") then return end
if getElementData(plr,"player:admin") then
local ranga = test
local msg=table.concat({...}, " ")
if (getAdmin(plr,4)) then
ranga = "#800080Zalozyciel"
end
if (getAdmin(plr,5)) then
ranga = "#99bee5Opiekun"
end
if (getAdmin(plr,3)) then
ranga = "#591411ROOT"
end
if (getAdmin(plr,2)) then
ranga = "#f20000Administrator"
end
if (getAdmin(plr,1)) then
ranga = "#2c6016Moderator"
end
if (getAdmin(plr,6)) then
ranga = "#00ff0cSupport"
end
if (getAdmin(plr,7)) then
ranga = "#CC66FFVice Zalozyciel"
end
if (getAdmin(plr,8)) then
ranga = "#00FFFFEmeryt"
end
for _, p in pairs(getElementsByType('player')) do
if getAdmin(p) then
if not getAdmin(p) then return end
outputChatBox("#FFFFFFAC » #FFFFFF(#ff6600"..getElementData(plr,"id").."#FFFFFF) #ff6600"..name.." #FFFFFF(#FFFFFF"..ranga.."#FFFFFF) #bf0101»#FFFFFF "..msg:gsub("#%x%x%x%x%x%x","").."",p,60,172,120,true)
end
end
local desc = "|Czat| |"..getElementData(plr,"id").."|"..name.." |"..ranga.."|: "..msg:gsub("#%x%x%x%x%x%x","")..""
--triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
outputServerLog(desc:gsub("#%x%x%x%x%x%x",""))
end
end)
-- Teksty
function setPremiumDay(plr,days)
if getPremiumDate(plr) then
local queryA=exports['pystories-db']:dbSet(string.format("UPDATE pystories_users SET premiumdate = DATE(premiumdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:sid")))
return end
local queryA=exports['pystories-db']:dbSet(string.format("UPDATE pystories_users SET premiumdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:sid")))
end
function getPremiumDate(plr)
local queryA=exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=? AND premiumdate>NOW() LIMIT 1", getElementData(plr,"player:sid"))
if (queryA and #queryA > 0) then
return queryA[1].premiumdate
end
return false
end
addCommandHandler("star.vip",function(plr,cmd,cel,dni)
if getAdmin(plr,4) or getAdmin(plr, 5) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then outputChatBox("/crazy.vip [gracz] [dni]",plr) return end
if not dni then outputChatBox("/crazy.vip [gracz] [dni]",plr) return end
if not tonumber(dni) then outputChatBox("/dajpremium [gracz] [dni]",plr) return end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setPremiumDay(target,dni)
outputChatBox("Nadano konto PREMIUM na "..dni.." dni!", plr, 255, 128, 64)
outputChatBox("Otrzymales konto PREMIUM na "..dni.." dni!", target, 255, 128, 64)
setElementData(plr,"player:premium",true)
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
end
end)
addCommandHandler("star.vipplus",function(plr,cmd,cel,dni)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then outputChatBox("/crazy.vipplus [gracz] [dni]",plr) return end
if not dni then outputChatBox("/crazy.vipplus [gracz] [dni]",plr) return end
if not tonumber(dni) then outputChatBox("/dajpremium [gracz] [dni]",plr) return end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setsPremiumDay(target,dni)
outputChatBox("Nadano konto PREMIUM+ na "..dni.." dni!", plr, 255, 128, 64)
outputChatBox("Otrzymales konto PREMIUM+ na "..dni.." dni!", target, 255, 128, 64)
setElementData(plr,"player:premiumplus",true)
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
setPlayerName(plr,"#ff6600"..getPlayerName(plr))
setPlayerNametagColor(plr, 255, 200, 0)
setElementData(plr,"premium:level",2)
end
end)
function setsPremiumDay(plr,days)
if getsPremiumDate(plr) then
local queryA=exports['pystories-db']:dbSet(string.format("UPDATE pystories_users SET premiumplusdate = DATE(premiumplusdate) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:sid")))
return end
local queryA=exports['pystories-db']:dbSet(string.format("UPDATE pystories_users SET premiumplusdate = DATE(curdate()) + INTERVAL %d DAY WHERE id=%d",days,getElementData(plr,"player:sid")))
end
function getsPremiumDate(plr)
local queryA=exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=? AND premiumplusdate>NOW() LIMIT 1", getElementData(plr,"player:sid"))
if (queryA and #queryA > 0) then
return queryA[1].premiumplusdate
end
return false
end
addCommandHandler("vopis", function(plr,cmd,...)
if getAdmin(plr,4) or getAdmin(plr, 5) or getAdmin(plr, 2) or getAdmin(plr, 1) or getAdmin(plr, 6) or getAdmin(plr, 3) or getAdmin(plr, 7) or getAdmin(plr,8) then
local desc=table.concat(arg, " ")
local veh=getPedOccupiedVehicle(plr)
if not veh then
triggerClientEvent(plr,"onClientAddNotification",plr, "* Musisz znajdować się w pojeździe aby dodać opis!", "error")
return
end
if getElementData(veh, "vehicle:desc") then
setElementData(veh, "vehicle:desc", false)
return end
if string.len(desc) < 2 then
triggerClientEvent(plr,"onClientAddNotification",plr, " * Poprawne użycie: #007aff/vopis#FFFFFF <opis musi wynosić min. 2 znaki>", "info")
return
end
descc=string.format("%s", desc)
setElementData(veh,"vehicle:desc",descc)
else
triggerClientEvent(plr,"onClientAddNotification",plr, "* Nie posiadasz uprawnień, aby użyć tej komendy!", "error")
end
end)
-- Komendy rconów
addCommandHandler("przepisz.gracz", function(plr,cmd,value)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("#bf0101(✖) #FFFFFFNie siedzisz w pojeździe.", plr, 255,255,255, true)
return
end
setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
outputChatBox("#06B200(✔) #FFFFFFPrzepisałeś(aś) pojazd do gracza: "..value, plr, 255,255,255, true)
end
end)
-- Teksty
addCommandHandler("o", function(plr,cmd,...)
if getAdmin(plr,4) or getAdmin(plr, 3) or getAdmin(plr, 2) or getAdmin(plr, 1) or getAdmin(plr, 6) or getAdmin(plr, 8) then
local text=table.concat({...}, " ")
ranga = getElementData(plr, "player:level")
if ranga == 4 then
ranga = "#800080Założyciel#ffffff"
end
if ranga == 5 then
ranga = "#99bee5Opiekun#ffffff"
end
if ranga == 3 then
ranga = "#591411RCON#ffffff"
end
if ranga == 2 then
ranga = "#f20000Administrator#ffffff"
end
if ranga == 1 then
ranga = "#2c6016Moderator#ffffff"
end
if ranga == 6 then
ranga = "#00ff0cSupport#ffffff"
end
if ranga == 7 then
ranga = "#CC66FFvZalozyciel#ffffff"
end
if ranga == 8 then
ranga = "#00FFFFEmery#ffffff"
end
outputChatBox(">> "..text.." #ffffff- ["..ranga.."] "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 255, 255, 255,true)
outputServerLog('Chat /o> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
end
end)
addCommandHandler("daj.plnall", function(plr,cmd,pinion)
if not pinion then return end
if not tonumber(pinion) then return end
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
givePlayerMoney(v,pinion)
end
end
outputChatBox("#ff6600(ⓘ) #FFFFFFZalozyciel dodał każdemu graczowi #06B200"..pinion.." #FFFFFFPLN", root, 255,255,255,true)
end
end)
addCommandHandler("daj.rpall", function(plr,cmd,pinion)
if not pinion then return end
if not tonumber(pinion) then return end
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
setElementData(v, "player:srp", ((getElementData(v, "player:srp") or 0) + pinion))
end
end
outputChatBox("#ff6600(ⓘ) #FFFFFFZalozyciel dodał każdemu graczowi #06B200"..pinion.." #FFFFFFRP", root, 255,255,255,true)
end
end)
function pobierzOrga (plr,cmd,cel,nazwa)
if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 3 or getElementData(plr,"player:sid") == 433 then
if not cel or not nazwa then outputChatBox("* Użyj /stworz.organizacje <id/nick lidera> <nazwa>", plr) return end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
outputChatBox("#06B200(✔) #FFFFFFZałożono organizacja dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." o nazwie "..nazwa.."",plr, 255,255,255, true)
outputChatBox("#06B200(✔) #FFFFFFOtrzymałeś organizacje "..nazwa.." od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..".",target, 255,255,255, true)
local name = getPlayerName(target):gsub("#%x%x%x%x%x%x","")
exports["pystories-db"]:dbSet("INSERT INTO ms_organizacje (code,uid,login,rank) VALUES (?,?,?,4)", nazwa, getElementData(target,"player:sid"), name)
setElementData(target,"player:organization",nazwa)
end
end
addCommandHandler("stworz.organizacje",pobierzOrga)
function pobierzDomki (plr,cmd,id,nazwa)
if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 4 or getElementData(plr,"player:sid") == 295 then
if not id or not nazwa then outputChatBox("* Użyj /dom <id> <nazwa>", plr) return end
local x,y,z=getElementPosition(plr)
kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,221,15000)", id, nazwa, id, kordy, kordy)
end
end
addCommandHandler("dom",pobierzDomki)
function pobierzDomki (plr,cmd,id,nazwa)
if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 295 or getElementData(plr, "player:sid") == 6 then
if not id or not nazwa then outputChatBox("* Użyj /dom.1 <id> <nazwa>", plr) return end
local x,y,z=getElementPosition(plr)
kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,31,25000)", id, nazwa, id, kordy, kordy)
end
end
addCommandHandler("dom.1",pobierzDomki)
addCommandHandler("daj.pln", function(plr,cmd,cel,value)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel or not tonumber(value) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /daj.pln <nick/ID> <koszt>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
givePlayerMoney(target, value)
outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) od systemu "..value.." PLN", target, 255,255,255, true)
outputChatBox ("#06B200(✔) #FFFFFFNadałeś(aś) "..value.." PLN dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
end
end)
addCommandHandler("daj.rp", function(plr,cmd,cel,value,...)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
local reason = table.concat({...}, " ")
if not cel or not tonumber(value) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /daj.rp <nick/ID> <ilosc>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
exports["pystories-db"]:dbSet("UPDATE pystories_users SET srp=? WHERE id=?", getElementData(target,"player:srp")+value, getElementData(target, "player:sid"))
setElementData(target,"player:srp", getElementData(target,"player:srp")+value)
outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) "..value.." REP!", target, 255,255,255, true)
outputChatBox ("#06B200(✔) #FFFFFFNadałeś(aś) #007aff"..value.." REP #FFFFFF dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
end
end)
-- Komendy adminów
addCommandHandler("jp", function(plr,cmd)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if isPedInVehicle(plr) then
removePedFromVehicle(plr)
end
if doesPedHaveJetPack(plr) then
removePedJetPack(plr)
outputChatBox ("#bf0101(✖) #FFFFFFZabrałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
else
givePedJetPack(plr)
outputChatBox ("#007aff(ⓘ) #FFFFFFOtrzymałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
end
end
end)
addCommandHandler("vanish", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr, 5) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not getElementData(plr, "p:inv") then
setElementData(plr, "p:inv", true)
outputChatBox("* Włączyłeś system niewidki, nikt Cię nie widzi !", plr, 255,255,255)
else
setElementData(plr, "p:inv", false)
outputChatBox("* Wyłączyłeś system niewidki, każdy Cię widzi !", plr, 255,255,255)
end
end
end)
addCommandHandler("tune", function(plr,cmd,cel,value)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel or not tonumber(value) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /tune <nick/ID> <id>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255,255,255, true)
return
end
local veh=getPedOccupiedVehicle(target)
addVehicleUpgrade(veh,value)
outputChatBox("#ff6600(ⓘ) #FFFFFFDo twojego pojazdu dodano tuning, o id: "..value.."", target, 255,255,255, true)
outputChatBox("#06B200(✔) #FFFFFFDodałeś(aś) tuning ID "..value.." do pojazdu gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
end
end)
addCommandHandler("przeladuj", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /przeladuj <nick/ID>", plr,255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
outputChatBox("#06B200(✔) #FFFFFFPrzeładowano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr,255,255,255, true)
end
end)
addCommandHandler("zapisz.all", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
triggerEvent("save:player",root,v)
end
end
outputChatBox("#06B200(✔) #FFFFFFAdministrator zapisał wszystkim statystyki.", root, 255,255,255, true)
end
end)
addCommandHandler("przeladuj.all", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,5) then
for i,v in ipairs(getElementsByType("player")) do
if isElement(v) then
triggerEvent("save:player",root,v)
triggerEvent("load:player",root,v)
end
end
outputChatBox("* Administrator przeładował wszystkim statystyki.", root, 21,0,170,true)
end
end)
addCommandHandler("wczytaj", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /wczytaj <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
triggerEvent("load:player",root,target)
outputChatBox("* Wczytano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr)
end
end)
addCommandHandler("zapisz", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zapisz <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
triggerEvent("save:player",root,target)
outputChatBox("#ff6600(ⓘ) #FFFFFFZapisano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr, 255,255,255, true)
end
end)
addCommandHandler("fix", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr, 2) or getAdmin(plr,3) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr, 7) or getAdmin(plr, 8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /fix <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local veh=getPedOccupiedVehicle(target)
if not veh then
outputChatBox("#bf0101(✖) #FFFFFF"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..", nie znajduje się w pojeździe !", plr, 255,255,255, true)
return
end
outputChatBox("#06B200(✔) #FFFFFFNaprawiłeś(aś) pojazd "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
setElementHealth(veh, 1000)
fixVehicle(veh)
end
end)
addCommandHandler("flip", function(plr,cmd,cel)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,6) or getAdmin(plr,5) or getAdmin(plr, 7) or getAdmin(plr, 8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /flip <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local veh=getPedOccupiedVehicle(target)
if not veh then
outputChatBox("#bf0101(✖) #FFFFFF"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..", nie znajduje się w pojeździe !", plr, 255,255,255, true)
return
end
local x,y,z = getElementRotation(veh)
outputChatBox("#06B200(✔) #FFFFFFObróciłeś(aś) pojazd "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
setElementRotation(veh, 0, 0, z)
end
end)
addCommandHandler("kolor", function(plr,cmd,cel,value,value2,value3)
if getAdmin(plr,4) or getAdmin(plr, 7) then
if not cel or not tonumber(value) or not tonumber(value2) or not tonumber(value3) then
outputChatBox("* Użycie: /kolor <nick/ID> <r g b>", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
local veh=getPedOccupiedVehicle(target)
setVehicleColor(veh,value,value2,value3,value,value2,value3)
outputChatBox("* Twojemu pojazdowi zmieniono kolor.", target)
outputChatBox("* Zmieniłeś(aś) kolor pojazdu graczu: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
end
end)
-- reszta komend
function cmd_pkick(plr, cmd, target, ...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not target or not ... then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj /k [ID/Nazwa gracza] [Powód]", plr, 255, 255, 255, true)
return
end
local player = exports["pystories-core"]:findPlayer(plr,target)
local text = table.concat({...}, " ")
if player then
triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(player):gsub("#%x%x%x%x%x%x","").." zostaje wykopany/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..text, text)
outputConsole(" ", player)
outputConsole("Zostałeś wykopany z serwera!", player)
outputConsole("Osoba wyrzucająca: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), player)
outputConsole("Powód: "..text, player)
outputConsole(" ", player)
kickPlayer(player, getPlayerName(plr), "Sprawdź swoją konsolę (~)")
end
end
end
addCommandHandler("k", cmd_pkick)
addCommandHandler("tt", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr, 8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /tt <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if isPedInVehicle(plr) then
removePedFromVehicle(plr)
end
outputChatBox("#06B200(✔) #FFFFFFPrzeteleportowano do gracza o nicku #06B200"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." ", plr, 255,255,255, true)
--triggerClientEvent(plr,"onClientAddNotification",plr, " * Pomyślnie przeteleportowano do gracza:\n#339933"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." ", "esssucc")
local x,y,z=getElementPosition(target)
setElementInterior(plr,getElementInterior(target))
setElementDimension(plr,getElementDimension(target))
setElementPosition(plr,x+math.random(1,2),y+math.random(1,2),z)
end
end)
addCommandHandler("th", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr, 8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /th <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
outputChatBox("#06B200(✔) #FFFFFFPrzeteleportowano gracza o nicku #06B200"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." #FFFFFFdo Siebie ", plr, 255,255,255, true)
--triggerClientEvent(plr,"onClientAddNotification",plr, " * Pomyślnie przeteleportowano gracza:\n#339933"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." #FFFFFFdo siebie.", "success")
local x,y,z=getElementPosition(plr)
setElementInterior(target,getElementInterior(plr))
setElementDimension(target,getElementDimension(plr))
setElementPosition(target,x+math.random(1,2),y+math.random(1,2),z)
end
end)
addCommandHandler("dim", function(plr, cmd, value)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) or getAdmin(plr,8) then
if (not value) then
outputChatBox("* Użyj: /dim <ilość>", plr)
return
end
setElementDimension(plr, value)
end
end)
function make_warn(gracz, cmd, toGracz, ...)
if getAdmin(gracz,4) or getAdmin(gracz,3) or getAdmin(gracz,2) or getAdmin(gracz, 7) or getAdmin(gracz,1) or getAdmin(gracz,5) or getAdmin(gracz,6) then
if toGracz and ... then
local toGracz=exports["pystories-core"]:findPlayer(gracz,toGracz)
if not toGracz then
outputChatBox("Nie znaleziono podanego gracza.", gracz)
return
end
local tresc = table.concat({...}, " ")
local txt = getPlayerName(toGracz):gsub("#%x%x%x%x%x%x","").." otrzymał ostrzeżenie od "..getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").." z powodu: "..tresc
outputChatBox(" ", toGracz, 0, 122, 255, true)
outputChatBox("Otrzymałeś(aś) ostrzeżenie od "..getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."", toGracz, 255, 79, 10, true)
outputChatBox(" ", toGracz, 0, 122, 255, true)
outputChatBox("Powód: "..tresc, toGracz, 255, 255, 255)
outputChatBox(" ", toGracz, 0, 122, 255, true)
outputChatBox("Nie stosowanie się do ostrzeżenia, może skutkować kickiem lub banem.", toGracz, 255, 79, 10, true)
outputConsole(txt)
triggerClientEvent(root, "prawko_noti", root, txt)
else
outputChatBox("Poprawne użycie: /warn <id/nick> <powód>", gracz)
end
end
end
addCommandHandler("warn", make_warn)
addCommandHandler("zpj", function(plr,cmd,cel,time,type, ...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr, 8) then
local text = table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not text then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zpj <nick/ID> <czas> <jednostka: m/h/y/w> <powód>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
local czas_tabela=pobierzDate(type,time)
triggerClientEvent(getRootElement(), "prawko_noti", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzymał zakaz prowadzenia pojazdów od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ("..time .. type ..") powód: "..text, text)
if type == "m" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "A")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "B")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "C")
elseif type == "h" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "A")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "B")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "C")
elseif type == "d" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "A")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "B")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "C")
elseif type == "w" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "A")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "B")
exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "C")
end
print(czas_tabela)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) zakaz prowadzenia pojazdów od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFPowód: "..text:gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFCzas: "..time .. type .."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
end
end)
addCommandHandler('gmute', function(plr,cmd,cel,time,type, ...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
local text = table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not text then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /mute <nick/ID> <czas> <jednostka: m/h/y/w> <powód>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local czas_tabela=pobierzDate(type,time)
triggerClientEvent(getRootElement(), "prawko_noti", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzymał karę wyciszenia od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ("..time .. type ..") z powodem: "..text, text)
if type == "m" then
exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? minute)",getPlayerSerial(target),text,time)
elseif type == "h" then
exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? hour)", getPlayerSerial(target),text, time)
elseif type == "d" then
exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? day)", getPlayerSerial(target),text, time)
elseif type == "w" then
exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? week)", getPlayerSerial(target),text, time)
end
setElementData(target,'player:mute',true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) karę wyciszenia od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFPowód: "..text:gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFCzas: "..time .. type .."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
end
end)
addCommandHandler('gunmute', function(plr,cmd,cel)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,1) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /unmute <nick/ID>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
triggerClientEvent(getRootElement(), "prawko_noti", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." został odciszony przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""))
setElementData(target,'player:mute',false)
exports['pystories-db']:dbSet('delete from n_mute where serial=?',getPlayerSerial(target))
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox("#ff6600(ⓘ) #FFFFFFZostałeś odciszony przez: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
outputChatBox(" ", target, 255, 0, 0)
outputChatBox(" ", target, 255, 0, 0)
end
end)
addCommandHandler("zpl", function(plr,cmd,cel,time,rodzaj,...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(time) or not rodzaj or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zpl <nick/ID> <czas> <jednostka: m/h/d/w> <powód>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local query=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L", getPlayerSerial(target))
local result=exports["DB2"]:pobierzWyniki(query)
if (result) then
return outputChatBox("#ff6600(ⓘ) #FFFFFFGracz Posiada zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr, 255, 255, 255, true)
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "L", getPlayerSerial(plr))
end
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
if tonumber(time) <= 0 then return end
local result = "DATE()"
if rodzaj == "m" then
result = string.format('DATE_ADD(NOW(), INTERVAL %d MINUTE)',time)
elseif rodzaj == "h" then
result = string.format('DATE_ADD(NOW(), INTERVAL %d HOUR)',time)
elseif rodzaj == "d" then
result = string.format('DATE_ADD(NOW(), INTERVAL %d DAY)',time)
elseif rodzaj == "w" then
result = string.format('DATE_ADD(NOW(), INTERVAL %d WEEK)',time)
end
reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
triggerClientEvent(getRootElement(), "prawko_noti", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." otrzymał zakaz prowadzenia pojazdów powietrznych od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." ("..time .. rodzaj ..") powód: "..reason, reason)
local query = string.format("INSERT INTO pystories_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')", getPlayerSerial(target), reason, result, "L")
exports["pystories-db"]:dbSet(query)
end
end)
addCommandHandler("skin", function(plr,cmd,cel,id)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr, 7) or getAdmin(plr, 8) then
local id = tonumber(id)
if not cel or not id then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /skin <nick/ID> <id skinu> ", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if id < 0 or id > 311 then outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /skin <nick/ID> <id skinu>", plr, 255,255,255, true) return end
if id == 22 then outputChatBox("#bf0101(✖) #FFFFFFSkin został zablokowany z powodu buga!",plr, 255,255,255, true) return end
setElementModel(target,id)
local query = exports['pystories-db']:dbSet("UPDATE pystories_users SET skin=? WHERE id=?",id,getElementData(target,"player:sid"))
outputChatBox("#06B200(✔) #FFFFFFZmieniono skin graczu "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." na id "..id,plr, 255,255,255, true)
end
end)
addCommandHandler("opj", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,5) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /opj <nick/ID> ", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local query=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","A", getPlayerSerial(target))
local query32=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","B", getPlayerSerial(target))
local query=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","C", getPlayerSerial(target))
local result=exports["DB2"]:pobierzWyniki(query)
local result2=exports["DB2"]:pobierzWyniki(query2)
local result3=exports["DB2"]:pobierzWyniki(query3)
if (result) or (result2) or (result3) then
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "A", getPlayerSerial(target))
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "B", getPlayerSerial(target))
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "C", getPlayerSerial(target))
outputChatBox("#06B200(✔) #FFFFFFGracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoje prawo jazdy!", plr, 255, 255, 255, true)
outputChatBox("#007aff(ⓘ) #FFFFFF "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoje prawo jazdy!", target, 255, 255, 255, true)
else
outputChatBox("#007aff(ⓘ) #FFFFFFGracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranego prawka!", plr, 255, 255, 255, true)
end
end
end)
addCommandHandler("opl", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr, 7) then
if not cel then
outputChatBox("* Użycie: /opl <nick/ID> ", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
local query=string.format("SELECT * FROM pystories_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L", getPlayerSerial(target))
local result=exports["DB2"]:pobierzWyniki(query)
if (result) then
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "L", getPlayerSerial(target))
outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoja Licencje!", plr, 0, 255, 0)
outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoja Licencje!", target, 0, 255, 0)
else
outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranej Licencji!", plr, 0, 255, 0)
end
exports["pystories-db"]:dbSet("INSERT INTO pystories_prawka_logs (komu_oddali,kto_oddal,typ) VALUES (?,?,?)", getPlayerName(target):gsub("#%x%x%x%x%x%x",""), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), "licencja lotnicza")
end
end)
addCommandHandler("b", function(plr,cmd,cel,x,bantype,...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr, 8) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(x) or not bantype or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /b <nick/ID> <ilość> <m/h/d> <powód>", plr, 255,255,255, true)
outputChatBox("m - minuty/h - godziny/d - dni", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if (getAdmin(plr,4) == false) and getAdmin(target,4) then return end
reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
if bantype=="m" or bantype=="h" or bantype=="d" then
if bantype=="m" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),reason, x, "ban")
end
if bantype=="h" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),reason, x, "ban")
end
if bantype=="d" then
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),reason, x, "ban")
end
end
triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zostaje zbanowany/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..reason.." na "..x.." "..bantype, text)
kickPlayer(target,plr,"Zostałeś(aś) zbanowany(a), połącz się ponownie.")
end
end)
addCommandHandler("pb", function(plr,cmd,cel,...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr, 8) then
local reason=table.concat({...}, " ")
if not cel or not reason then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /pb <nick/ID> <powód>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
if (getAdmin(plr,4) == false) and getAdmin(target,4) then return end
local query=string.format("SELECT * FROM pystories_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban", getPlayerSerial(target))
local result=exports["DB2"]:pobierzWyniki(query)
if (result) then
return outputChatBox("* Gracz Posiada Bana do "..result["time"]..", za: "..result["reason"], plr, 255, 0, 0)
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?", "ban", getPlayerSerial(target))
end
reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
triggerClientEvent(getRootElement(), "notiBig", getRootElement(), "Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." zostaje zbanowany permanentnie/a przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").. " z powodu: "..reason, reason)
exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason,"2030-12-31 23:59:59", "ban")
kickPlayer(target,reason)
end
end)
addCommandHandler("ub", function(plr,cmd,cel)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /ub <serial>", plr, 255,255,255, true)
return
end
local query=string.format("SELECT * FROM pystories_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban", cel)
local result=exports["DB2"]:pobierzWyniki(query)
if (result) then
exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?", "ban", cel)
outputChatBox("#06B200(✔) #FFFFFFUsunieto bana o serialu ("..cel..")!", plr, 255, 255, 255, true)
else
outputChatBox("#bf0101(✖) #FFFFFFNie wykryto bana o serialu ("..cel..")!", plr, 255, 255, 255, true)
end
end
end)
addCommandHandler("vtt", function(plr,cmd,vid)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not vid or not tonumber(vid) then return end
vid=tonumber(vid)
for i,v in ipairs(getElementsByType("vehicle")) do
local dbid=getElementData(v,"vehicle:id")
if dbid and tonumber(dbid) == vid then
local x,y,z=getElementPosition(v)
setElementPosition(plr,x,y,z+4)
setElementInterior(plr, getElementInterior(v))
setElementDimension(plr, getElementDimension(v))
warpPedIntoVehicle(plr,v)
end
end
local query=exports["pystories-db"]:dbGet("SELECT 1 FROM pystories_vehicles WHERE id=? AND parking>0", vid)
if query then
outputChatBox("#ff6600(ⓘ) #FFFFFFPojazd znajduje sie na parkingu/w przechowalni.", plr, 255, 255, 255, true)
else
outputChatBox("#ff6600(ⓘ) #FFFFFFNie znaleziono podanego pojazdu na mapie.", plr, 255, 255, 255, true)
end
end
end)
addCommandHandler("vth", function(plr,cmd,vid)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not vid or not tonumber(vid) then return end
vid=tonumber(vid)
for i,v in ipairs(getElementsByType("vehicle")) do
local dbid=getElementData(v,"vehicle:id")
if dbid and tonumber(dbid) == vid then
if getElementData(v,"vehicle_id:faction") then outputChatBox("* Auto znajduje się na parkingu policyjnym !",plr,255,0,0) return end
local x,y,z=getElementPosition(plr)
setElementPosition(v,x,y,z+0.1)
setElementInterior(v, getElementInterior(plr))
setElementDimension(v, getElementDimension(plr))
warpPedIntoVehicle(plr,v)
end
end
local query=exports["pystories-db"]:dbGet("SELECT 1 FROM pystories_vehicles WHERE id=? AND parking>0", vid)
if query then
outputChatBox("#ff6600(ⓘ) #FFFFFFPojazd znajduje sie na parkingu/w przechowalni.", plr, 255, 255, 255, true)
else
outputChatBox("#ff6600(ⓘ) #FFFFFFNie znaleziono podanego pojazdu na mapie.", plr, 255, 255, 255, true)
end
end
end)
addCommandHandler("heal", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then
outputChatBox("* Użyj: /heal <id/nick>", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setElementHealth(target, 100)
outputChatBox("* Uleczyłeś(aś) gracza " ..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
outputChatBox("* Zostałeś(aś) uleczony(a) przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), target)
end
end)
addCommandHandler("spec", function(plr,cmd,cel)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUzyj: /spec <id/nick>", plr,255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
return
end
local x,y,z=getElementPosition(plr)
removePedFromVehicle(plr)
setElementInterior(plr, getElementInterior(target))
setElementDimension(plr, getElementDimension(target))
setCameraTarget(plr, target)
setElementData(plr,"spec:pos",{x,y,z})
end
end)
addCommandHandler("specoff", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
local spec=getElementData(plr,"spec:pos")
if not spec then return end
setElementPosition(plr, spec[1], spec[2], spec[3])
setCameraTarget(plr, plr)
end
end)
function destroyBlipsAttachedTo(player)
local attached = getAttachedElements ( player )
if ( attached ) then
for k,element in ipairs(attached) do
if getElementType ( element ) == "blip" then
destroyElement ( element )
end
end
end
end
addCommandHandler("inv", function(plr)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) or getAdmin(plr,8) then
if getElementAlpha(plr) > 0 then
setElementAlpha(plr,0)
setElementData(plr, "player:inv", true)
destroyBlipsAttachedTo ( plr )
else
setElementAlpha(plr,255)
setElementData(plr, "player:inv", false)
local newValue = getElementData(plr,"player:admin") -- find the new value
if newValue == true then
destroyBlipsAttachedTo (plr)
createBlipAttachedTo ( plr, 0, 2, 255, 255, 255 )
else
destroyBlipsAttachedTo ( plr )
createBlipAttachedTo ( plr, 0, 2, 255, 255, 255 )
end
end
end
end)
addCommandHandler("invveh", function(plr)
if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
local plr=getPedOccupiedVehicle(plr)
if not plr then return end
if getElementAlpha(plr) > 0 then
setElementAlpha(plr,0)
else
setElementAlpha(plr,255)
end
end
end)
local dopicia = {}
local player_alc = {}
local pije = {}
function stopAnimacja(plr)
setPedAnimation(plr, false)
unbindKey(plr, "ENTER", "down", stopAnimacja)
end
function pij(plr)
if pije[plr] then return end
pije[plr] = true
setPedAnimation ( plr, "BAR", "dnk_stndM_loop", 1200, false, false )
setTimer(function () setPedAnimation(plr,false);pije[plr] = nil; triggerClientEvent(plr,"onDrinkAlcohol",root) end,1200,1)
setPedWalkingStyle(plr,126)
dopicia[plr] = dopicia[plr] -1
if dopicia[plr] == 0 then
destroyElement(player_alc[plr])
player_alc[plr] = nil
unbindKey(plr, "fire", "down", pij)
end
end
addCommandHandler("sex1",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "sex", "sex_1_cum_p", -1, true, false )
end)
addCommandHandler("sex2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "sex", "sex_1_cum_w", -1, true, false )
end)
addCommandHandler("dzwonisz",function(plr,cmd)
setPedAnimation( plr, "ped", "phone_in", -1, false, false, false, true)
end)
addCommandHandler("rece",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "handsup", -1, false, false )
end)
addCommandHandler("taichi",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "PARK", "Tai_Chi_Loop", -1, true, false )
end)
addCommandHandler("predator",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BSKTBALL", "BBALL_def_loop", -1, true, false )
end)
addCommandHandler("podkrecasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BAR", "Barserve_glass", -1, false, false )
end)
addCommandHandler("dab",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BAR", "BD_Panic_01", -1, false, false )
end)
addCommandHandler("podsluchujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BAR", "Barserve_order", -1, false, false )
end)
addCommandHandler("podaj",function(plr,cmd,targ)
if getAdmin(plr,3) or getAdmin(plr,4) then
if not targ then
outputChatBox("Uzyj: /podaj <id/nick>", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,targ)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
if player_alc[target] then outputChatBox("* Gracz ma juz alkochol!", plr) return end
if (isPedInVehicle(target)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
local alc = createObject(1484,0,0,0)
player_alc[target] = alc
dopicia[target] = 3
exports.bone_attach:attachElementToBone(alc,target,12,0,0,0,0,0,0)
bindKey(target, "fire", "down", pij)
end
end)
addCommandHandler("pijesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BAR", "dnk_stndM_loop", -1, true, false )
end)
addCommandHandler("taniec",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CHAINSAW", "CSAW_Hit_2", -1, true, true )
end)
addCommandHandler("taniec2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SKATE", "skate_idle", -1, true, false )
end)
addCommandHandler("taniec3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "strip_B", -1, true, false )
end)
addCommandHandler("taniec4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "dance_loop", -1, true, false )
end)
addCommandHandler("taniec5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "DAN_Down_A", -1, true, false )
end)
addCommandHandler("taniec6",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "strip_G", -1, true, false )
end)
addCommandHandler("taniec7",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "STR_C2", -1, true, false )
end)
addCommandHandler("taniec8",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "dnce_M_b", -1, true, false )
end)
addCommandHandler("taniec9",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "DAN_Loop_A", -1, true, false )
end)
addCommandHandler("taniec10",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "dnce_M_d", -1, true, false )
end)
addCommandHandler("taniec11",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "strip_D", -1, true, false )
end)
addCommandHandler("taniec12",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "strip_E", -1, true, false )
end)
addCommandHandler("taniec13",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "STR_Loop_A", -1, true, false )
end)
addCommandHandler("taniec14",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "STRIP", "STR_Loop_B", -1, true, false )
end)
addCommandHandler("taniec15",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FINALE", "FIN_Cop1_Stomp", -1, true, false )
end)
addCommandHandler("taniec16",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DANCING", "dnce_M_a", -1, true, false )
end)
addCommandHandler("taniec17",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GFUNK", "Dance_G10", -1, true, false )
end)
addCommandHandler("taniec18",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GFUNK", "Dance_G11", -1, true, false )
end)
addCommandHandler("taniec19",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GFUNK", "Dance_G12", -1, true, false )
end)
addCommandHandler("taniec20",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RUNNINGMAN", "Dance_B1", -1, true, false )
end)
addCommandHandler("palisz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "LOWRIDER", "M_smklean_loop", -1, true, false )
end)
addCommandHandler("lezysz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BEACH", "Lay_Bac_Loop", -1, true, false )
end)
addCommandHandler("lezysz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckidle2", -1, true, false )
end)
addCommandHandler("lezysz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckidle4", -1, true, false )
end)
addCommandHandler("lezysz4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BEACH", "ParkSit_W_loop", -1, false, false )
end)
addCommandHandler("lezysz5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BEACH", "SitnWait_loop_W", -1, true, false )
end)
addCommandHandler("siedzisz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BEACH", "ParkSit_M_loop", -1, true, false )
end)
addCommandHandler("siedzisz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, true, false )
end)
addCommandHandler("siedzisz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "JST_BUISNESS", "girl_02", -1, false, false )
end)
addCommandHandler("siedzisz4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "INT_HOUSE", "LOU_Loop", -1, false, false )
end)
addCommandHandler("klekasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CAMERA", "camstnd_to_camcrch", -1, false, false )
end)
addCommandHandler("klekasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "COP_AMBIENT", "Copbrowse_nod", -1, true, false )
end)
addCommandHandler("czekasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "COP_AMBIENT", "Coplook_loop", -1, true, false )
end)
addCommandHandler("akrobata",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DAM_JUMP", "DAM_Dive_Loop", -1, false, false )
end)
addCommandHandler("msza",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "DEALER", "DEALER_IDLE", -1, true, false )
end)
addCommandHandler("msza2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GRAVEYARD", "mrnM_loop", -1, false, false )
end)
addCommandHandler("znakkrzyza",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "hndshkcb", -1, true, false )
end)
addCommandHandler("rzygasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FOOD", "EAT_Vomit_P", -1, true, false )
end)
addCommandHandler("jesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FOOD", "EAT_Burger", -1, true, false )
end)
addCommandHandler("cpun1",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "drnkbr_prtl", -1, true, false )
end)
addCommandHandler("cpun2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "smkcig_prtl", -1, true, false )
end)
addCommandHandler("cpun3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "Bbalbat_Idle_01", -1, true, false )
end)
addCommandHandler("cpun4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "Bbalbat_Idle_02", -1, true, false )
end)
addCommandHandler("witasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "hndshkba", -1, true, false )
end)
addCommandHandler("rozmawiasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "prtial_gngtlkH", -1, true, false )
end)
addCommandHandler("rozmawiasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "prtial_gngtlkG", -1, true, false )
end)
addCommandHandler("rozmawiasz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "prtial_gngtlkD", -1, true, false )
end)
addCommandHandler("nerwowy",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign2", -1, true, false )
end)
addCommandHandler("piszesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "INT_OFFICE", "OFF_Sit_Type_Loop", -1, true, false )
end)
addCommandHandler("gay",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WOMAN_walksexy", -1, true, true )
end)
addCommandHandler("gay2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WOMAN_walkpro", -1, true, true )
end)
addCommandHandler("gay3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WOMAN_runsexy", -1, true, true )
end)
addCommandHandler("wreczasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "KISSING", "gift_give", -1, false, false )
end)
addCommandHandler("machasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "KISSING", "gfwave2", -1, true, false )
end)
addCommandHandler("walisz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "PAULNMAC", "wank_loop", -1, true, false )
end)
addCommandHandler("walisz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MISC", "Scratchballs_01", -1, true, false )
end)
addCommandHandler("sikasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "PAULNMAC", "Piss_loop", -1, true, false )
end)
addCommandHandler("pijany",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WALK_drunk", -1, true, true )
end)
addCommandHandler("pijany2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "PAULNMAC", "PnM_Loop_A", -1, true, false )
end)
addCommandHandler("pijany3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "PAULNMAC", "PnM_Argue2_A", -1, true, false )
end)
addCommandHandler("rapujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SCRATCHING", "scmid_l", -1, true, false )
end)
addCommandHandler("rapujesz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SCRATCHING", "scdldlp", -1, true, false )
end)
addCommandHandler("rapujesz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "Flowers", "Flower_Hit", -1, true, false )
end)
addCommandHandler("rapujesz4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RAPPING", "RAP_C_Loop", -1, true, false )
end)
addCommandHandler("rapujesz5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RAPPING", "RAP_B_Loop", -1, true, false )
end)
addCommandHandler("rapujesz6",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SCRATCHING", "scdrdlp", -1, true, false )
end)
addCommandHandler("rapujesz7",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SCRATCHING", "scdrulp", -1, true, false )
end)
addCommandHandler("rapujesz8",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RAPPING", "RAP_A_Loop", -1, true, false )
end)
addCommandHandler("fsdfdsfdsfsd",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SKATE", "skate_run", -1, true, true )
end)
addCommandHandler("dsgdsfdsf",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SKATE", "skate_sprint", -1, true, true )
end)
addCommandHandler("umierasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "FLOOR_hit_f", -1, false, false )
end)
addCommandHandler("umierasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "FLOOR_hit", -1, false, false )
end)
addCommandHandler("bijesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BASEBALL", "Bat_M", -1, true, false )
end)
addCommandHandler("bijesz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RIOT", "RIOT_PUNCHES", -1, true, false )
end)
addCommandHandler("bijesz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FIGHT_B", "FightB_M", -1, true, false )
end)
addCommandHandler("bijesz4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MISC", "bitchslap", -1, true, false )
end)
addCommandHandler("bijesz5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "BIKE_elbowR", -1, true, false )
end)
addCommandHandler("wolasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RYDER", "RYD_Beckon_01", -1, true, false )
end)
addCommandHandler("wolasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "POLICE", "CopTraf_Come", -1, true, false )
end)
addCommandHandler("wolasz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RYDER", "RYD_Beckon_02", -1, true, false )
end)
addCommandHandler("zatrzymujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "POLICE", "CopTraf_Stop", -1, true, false )
end)
addCommandHandler("wskazujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SHOP", "ROB_Loop", -1, true, false )
end)
addCommandHandler("rozgladasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ON_LOOKERS", "lkaround_loop", -1, true, false )
end)
addCommandHandler("krzyczysz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ON_LOOKERS", "shout_in", -1, true, false )
end)
addCommandHandler("fuckyou",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RIOT", "RIOT_FUKU", -1, true, false )
end)
addCommandHandler("tchorz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "cower", -1, false, false )
end)
addCommandHandler("kopiesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "shake_carK", -1, true, false )
end)
addCommandHandler("kopiesz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FIGHT_D", "FightD_G", -1, true, false )
end)
addCommandHandler("kopiesz3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FIGHT_C", "FightC_3", -1, false )
end)
addCommandHandler("wywazasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "shake_carSH", -1, true, false )
end)
addCommandHandler("wywazasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "POLICE", "Door_Kick", -1, true, false )
end)
addCommandHandler("kieszen",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GANGS", "leanIDLE", -1, true, false )
end)
addCommandHandler("celujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "ARRESTgun", -1, false, false )
end)
addCommandHandler("kichasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "VENDING", "vend_eat1_P", -1, true, false )
end)
addCommandHandler("pocalunek",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BD_FIRE", "Grlfrd_Kiss_03", -1, true, false )
end)
addCommandHandler("taxi",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MISC", "Hiker_Pose", -1, false, false )
end)
addCommandHandler("taxi2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MISC", "Hiker_Pose_L", -1, false, false )
end)
addCommandHandler("noga",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SHOP", "SHP_Jump_Glide", -1, false, false )
end)
addCommandHandler("pozegnanie",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "BD_FIRE", "BD_Panic_03", -1, true, false )
end)
addCommandHandler("cud",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CARRY", "crry_prtial", -1, true, false )
end)
addCommandHandler("cud2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ON_LOOKERS", "Pointup_loop", -1, false, false )
end)
addCommandHandler("delirium",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckdeth1", -1, false )
end)
addCommandHandler("delirium2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckdeth2", -1, true, false )
end)
addCommandHandler("delirium3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckidle3", -1, true, false )
end)
addCommandHandler("delirium4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CHAINSAW", "csaw_part", -1, true, false )
end)
addCommandHandler("delirium5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CASINO", "Roulette_loop", -1, true, false )
end)
addCommandHandler("naprawiasz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CAR", "flag_drop", -1, true, false )
end)
addCommandHandler("naprawiasz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CAR", "Fixn_Car_Loop", -1, true, false )
end)
addCommandHandler("placzesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GRAVEYARD", "mrnF_loop", -1, true, false )
end)
addCommandHandler("kibicujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "RIOT", "RIOT_ANGRY_B", -1, true, false )
end)
addCommandHandler("kibicujesz2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ON_LOOKERS", "wave_loop", -1, true, false )
end)
addCommandHandler("bioenergoterapeuta",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "WUZI", "Wuzi_Greet_Wuzi", -1, true, false )
end)
addCommandHandler("meteorolog",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "WUZI", "Wuzi_grnd_chk", -1, true, false )
end)
addCommandHandler("klepiesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SWEET", "sweet_ass_slap", -1, true, false )
end)
addCommandHandler("cierpisz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "SWEET", "Sweet_injuredloop", -1, true, false )
end)
addCommandHandler("starzec",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WALK_shuffle", -1, true, true )
end)
addCommandHandler("starzec2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WOMAN_walkfatold", -1, true, true )
end)
addCommandHandler("starzec3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "ped", "WOMAN_walkshop", -1, true, true )
end)
addCommandHandler("reanimujesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MEDIC", "CPR", -1, false, false )
end)
addCommandHandler("myjesz",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CASINO", "dealone", -1, true, false )
end)
addCommandHandler("zadowolony",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CASINO", "manwind", -1, true, false )
end)
addCommandHandler("zadowolony2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CASINO", "manwinb", -1, true, false )
end)
addCommandHandler("zalamany",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CASINO", "Roulette_lose", -1, true, false )
end)
addCommandHandler("zmeczony",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "FAT", "IDLE_tired", -1, true, false )
end)
addCommandHandler("ochnie",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "MISC", "plyr_shkhead", -1, true, false )
end)
addCommandHandler("cwaniak1",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign1", -1, true, false )
end)
addCommandHandler("cwaniak2",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign1LH", -1, true, false )
end)
addCommandHandler("cwaniak3",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign2", -1, true, false )
end)
addCommandHandler("cwaniak4",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign2LH", -1, true, false )
end)
addCommandHandler("cwaniak5",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign3", -1, true, false )
end)
addCommandHandler("cwaniak6",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign3LH", -1, true, false )
end)
addCommandHandler("cwaniak7",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign4", -1, true, false )
end)
addCommandHandler("cwaniak8",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign4LH", -1, true, false )
end)
addCommandHandler("cwaniak9",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign5", -1, true, false )
end)
addCommandHandler("cwaniak10",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "GHANDS", "gsign5LH", -1, true, false )
end)
addCommandHandler("pijak",function(plr,cmd)
if (isPedInVehicle(plr)) then
outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
return
end
bindKey(plr, "ENTER", "down", stopAnimacja)
setPedAnimation ( plr, "CRACK", "crckidle4", -1, true, false )
end)
addCommandHandler("p", function(plr,cmd,name)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,5) or getAdmin(plr,1) or getAdmin(plr, 7) or getAdmin(plr,8) then
if not name then return end
if veh then
if getElementData(veh,"vehicle:spawn") then
outputChatBox("#bf0101(✖) #FFFFFFNie możesz zmienić Sobie pojazdu prywatnego.", plr, 255,255,255, true)
return
end
end
if tonumber(name) ~= nil then
outputChatBox("#ff6600(ⓘ) #FFFFFFMusisz wpisać nazwę, nie model.", plr, 255,255,255, true)
return
end
if name == "rhino" or name == "hydra" or name =="seasparrow" or name == "hunter" or name == "Rhino" or name == "Hunter" or name == "Hydra" or name == "Infernus" or name == "infernus" then
outputChatBox("#bf0101(✖) #FFFFFFBrak dostępu do zakazanego modelu.", plr, 255, 255,255, true )
return
end
local dim = getElementDimension(plr)
local x,y,z = getElementPosition(plr)
local rx,ry,rz = getElementRotation(plr)
local vehicle = createVehicle(getVehicleModelFromName(name), x, y, z, rx, ry, rz)
local model = getVehicleModelFromName(name)
setElementInterior(vehicle,getElementInterior(plr))
setElementDimension(vehicle,getElementDimension(plr))
setElementData(vehicle, "vehicle:fuel", 100)
outputChatBox("#06B200(✔) #FFFFFFZrespiłeś(aś) pojazd: #ff6600"..name, plr, 255,255,255, true)
end
end)
addCommandHandler("dp", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,5) or getAdmin(plr,1) or getAdmin(plr, 7) or getAdmin(plr,8) then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("#ff6600(ⓘ) #FFFFFFMusisz siedzieć w pojeździe.", plr, 255,255,255, true)
return
end
if getElementData(veh,"vehicle:spawn") then
outputChatBox("#ff6600(ⓘ) #FFFFFFNie możesz usunąć tego pojazdu.", plr,255,255,255, true)
return
end
destroyElement(veh)
outputChatBox("#06B200(✔) #FFFFFFUsunąłeś(aś) pojazd", plr,255,255,255, true)
--end
else
outputChatBox("#bf0101(✖) #FFFFFFBrak uprawnień", plr, 255,255,255, true)
end
end)
local stopChat = false
--[[
addCommandHandler("v", function(plr, cmd, ...)
if getElementData(plr, "player:premium") == false and getElementData(plr, "player:premiumplus") == false then outputChatBox("* Musisz posiadać status premium/premium+ by pisać na czacie globalnym!",plr,78,255,0) return end
if getElementData(plr,'player:mute') then outputChatBox('Posiadasz karę wyciszenia! Uważasz że kara jest niesłuszna? Zaapeluj na forum CrazyRPG.svpj.pl.',plr) return end
if not ... then
local x = getElementData(plr,"player:pchatoff")
if x == false then
outputChatBox("#007aff(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium/premium+",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatoff",true)
end
if x == true then
outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium/premium+",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatoff",false)
end
return end
if stopChat then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
return end
if getElementData(plr,"player:pchatoff") then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium/premium+.', plr, 255, 255, 255, true)
return end
if ... then
local message = table.concat ( { ... }, " " )
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
for _,p in pairs(getElementsByType("player")) do
local premkas = getElementData(plr, "player:premium")
if premkas then premkas = "#ffcc00(P)#FFFFFF" else premkas = "" end
local spremkas = getElementData(plr, "player:premiumplus")
if spremkas then spremkas = "#FFD700(P+)#FFFFFF" else spremkas = "" end
if getElementData(p,"player:premium") or getElementData(p,"player:premiumplus") and not getElementData(p,"player:pchatoff") then
outputChatBox("#ffcc00 "..spremkas..""..premkas.." > "..name.."#ffcc00[#FFFFFF"..getElementData(plr,"id").."#ffcc00]#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
end
end
local desc = "(Czat Premium/Premium+) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
triggerEvent("admin:addText", resourceRoot, RGBToHex(255,204,0)..desc..RGBToHex(255,255,255),math.random(0,99))
triggerEvent("admin:logs", root, desc)
outputServerLog(desc)
end
end)
]]
addCommandHandler("v", function(plr, cmd, ...)
if getElementData(plr, "player:premium") == false then outputChatBox("* Musisz posiadać status premium by pisać na czacie globalnym!",plr,78,255,0) return end
if not ... then
local x = getElementData(plr,"player:pchatoff")
if x == false then
outputChatBox("#ff6600(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatoff",true)
end
if x == true then
outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatoff",false)
end
return end
if stopChat then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
return end
if getElementData(plr,"player:mute") then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFMasz aktywne wyciszenie!', plr, 255, 255, 255, true)
return end
if getElementData(plr,"player:pchatoff") then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium.', plr, 255, 255, 255, true)
return end
if ... then
local message = table.concat ( { ... }, " " )
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
for _,p in pairs(getElementsByType("player")) do
if getElementData(p,"player:premium") and not getElementData(p,"player:pchatoff") then
--outputChatBox("#FFFF00"..getElementData(plr,"id").."#C0FF00> #C0FF00"..name.."#C0FF00: #C0FF00"..message:gsub("#%x%x%x%x%x%x",""), p, 255, 255, 255, true)
--outputChatBox("#FFFF00"..getElementData(plr,"id").." > "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
outputChatBox("#ffcc00(Premium)> [#FFFFFF"..getElementData(plr,"id").."#ffcc00] "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
end
end
local desc = "(Premium) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
triggerEvent("admin:addText", resourceRoot, RGBToHex(255,204,0)..desc..RGBToHex(255,255,255),math.random(0,99))
triggerEvent("admin:logs", root, desc)
--triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
outputServerLog(desc)
end
end)
addCommandHandler("vv", function(plr, cmd, ...)
if getElementData(plr, "player:premiumplus") == false then outputChatBox("* Musisz posiadać status premium + by pisać na czacie globalnym!",plr,78,255,0) return end
if not ... then
local x = getElementData(plr,"player:pchatplusoff")
if x == false then
outputChatBox("#ff6600(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium +",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatplusoff",true)
end
if x == true then
outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium +",plr, 255, 255, 255, true)
setElementData(plr,"player:pchatplusoff",false)
end
return end
if stopChat then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
return end
if getElementData(plr,"player:mute") then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFMasz aktywne wyciszenie!', plr, 255, 255, 255, true)
return end
if getElementData(plr,"player:pchatplusoff") then
cancelEvent()
outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium +.', plr, 255, 255, 255, true)
return end
if ... then
local message = table.concat ( { ... }, " " )
local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
for _,p in pairs(getElementsByType("player")) do
if getElementData(p,"player:premiumplus") and not getElementData(p,"player:pchatplusoff") then
--outputChatBox("#FFFF00"..getElementData(plr,"id").."#C0FF00> #C0FF00"..name.."#C0FF00: #C0FF00"..message:gsub("#%x%x%x%x%x%x",""), p, 255, 255, 255, true)
--outputChatBox("#FFFF00"..getElementData(plr,"id").." > "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
outputChatBox("#FF8B00(Premium +)> [#FFFFFF"..getElementData(plr,"id").."#FF8B00] "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
end
end
local desc = "(Premium +) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
triggerEvent("admin:addText", resourceRoot, RGBToHex(255,134,0)..desc..RGBToHex(255,255,255),math.random(0,99))
triggerEvent("admin:logs", root, desc)
--triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
outputServerLog(desc)
end
end)
addCommandHandler("up", function(plr, cmd, value)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) then
if (tonumber(value)==nil) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /up <ile>", plr, 255,255,255, true)
return
end
local e = plr
if (isPedInVehicle(plr)) then
e = getPedOccupiedVehicle(plr)
end
local x,y,z = getElementPosition(e)
setElementPosition(e, x, y, z+tonumber(value))
end
end)
addCommandHandler("thru", function(plr, cmd, value)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,5) or getAdmin(plr,6) or getAdmin(plr, 7) then
if (tonumber(value)==nil) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /thru <ile>", plr, 255,255,255, true)
return
end
local e = plr
if getCameraTarget(plr) ~= plr then
e = getCameraTarget(plr)
end
if (isPedInVehicle(plr)) then
e = getPedOccupiedVehicle(e)
end
local x,y,z = getElementPosition(e)
local _,_,rz = getElementRotation(e)
local rrz = math.rad(rz)
local x = x + (value * math.sin(-rrz))
local y = y + (value * math.cos(-rrz))
setElementPosition(e, x, y, z)
end
end)
local zapisane_pozycje = {}
addCommandHandler("sp", function(plr,cmd)
if getAdmin(plr) then
local pos={}
pos[1],pos[2],pos[3]=getElementPosition(plr)
pos[4]=getElementInterior(plr)
pos[5]=getElementDimension(plr)
local uid = getElementData(plr,"player:sid")
zapisane_pozycje[uid] = pos
outputChatBox("#06B200(✔) #FFFFFFPozycja została zapisana.", plr, 255,255,255, true)
end
end)
addCommandHandler("lp", function(plr,cmd)
if getAdmin(plr) then
local uid = getElementData(plr,"player:sid")
local pos=zapisane_pozycje[uid]
if (not pos) then
outputChatBox("#bf0101(✖) #FFFFFFNie masz żadnej zapisanej pozycji.", plr, 255,255,255, true)
return
end
local veh = getPedOccupiedVehicle(plr)
if veh then plr = veh end
setElementPosition(plr,pos[1],pos[2],pos[3])
setElementInterior(plr,pos[4])
setElementDimension(plr,pos[5])
outputChatBox("#06B200(✔) #FFFFFFWczytano pozycję.", plr, 255,255,255, true)
end
end)
addCommandHandler("pj",function(plr,cmd,pj)
if getAdmin(plr,4) or getAdmin(plr, 7) then
if not pj or not tonumber(pj) then outputChatBox("* Wpisz /pj <0-3> !",plr) return end
local pj = tonumber(pj)
if pj < 0 or pj > 3 then outputChatBox("* Wpisz /pj <0-3> !",plr) return end
local veh = getPedOccupiedVehicle(plr)
if not veh then outputChatBox("* Najpierw wsiądź do pojazdu !", plr) return end
setVehiclePaintjob(veh,pj)
end
end)
addCommandHandler("vinfo", function(plr,cmd,pojazd)
if not getAdmin(plr) then outputChatBox("* Brak uprawnień !", plr) return end
if not pojazd or not tonumber(pojazd) then
outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /vinfo <id pojazdu>", plr, 255,255,255, true)
return
end
pojazd=tonumber(pojazd)
local result = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=?",pojazd)
if not result or #result < 1 then
outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego pojazdu !", plr, 255,255,255, true)
return end
local query = exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=?",result[1].ownedPlayer)
local model = exports['pystories-db']:dbGet("SELECT id,model from pystories_vehicles where model = ? and id<=? order by id desc",result[1].model,result[1].id)
outputChatBox("Pojazd ID " .. result[1].id .. ", Model: " .. result[1].model .. " ["..getVehicleNameFromModel(result[1].model).."]", plr)
outputChatBox("Własność gracza " .. query[1].login .. " ["..result[1].ownedPlayer.."]", plr)
outputChatBox("Ostatni kierowca " .. result[1].driver .. "| Przebieg " .. result[1].mileage, plr)
outputChatBox("PB: " .. result[1].fuel .. " L | Przechowalnia : " ..result[1].parking .." | Parking Policyjny: ".. result[1].police .. "", plr)
outputChatBox("MK1: ".. result[1].mk1 .." | MK2: ".. result[1].mk2 .." | MK3: "..result[1].mk3.."", plr)
outputChatBox("Pojemność Silnika: ".. result[1].pojemnosc_silnika .." | Rodzaj Paliwa: ".. result[1].rodzaj .." | Bak: "..result[1].bak.." L", plr)
outputChatBox("Data utworzenia pojazdu "..result[1].createdate, plr)
outputChatBox("Jest to "..#model.." pojazd tego modelu na serwerze!", plr)
end)
addCommandHandler("veh.list", function(plr,cmd,cel)
if not getAdmin(plr) then outputChatBox("* Brak uprawnien", plr) return end
if not cel then
outputChatBox("* Użyj: /veh.list <id/nick>", plr)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
local resulte = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?",getElementData(target, "player:sid"))
if not resulte or #resulte < 1 then
outputChatBox("* Nie znaleziono pojazdu", plr)
return end
outputChatBox("--- Pojazdy Gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."---",plr)
for i,result in pairs(resulte) do
outputChatBox("* Pojazd ID " .. result.id .. ", model " .. result.model .. " ("..getVehicleNameFromModel(result.model)..")", plr)
end
outputChatBox("------",plr)
exports["pystories-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)", getElementData(plr,"player:sid"), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), "veh.list "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."")
end)
addCommandHandler("ginfo", function(plr,cmd,cel)
if getAdmin(plr,6) or getAdmin(plr,5) or getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr, 7) then
if not cel then
outputChatBox("#ff6600(ⓘ) #FFFFFFUzyj: /ginfo <id/nick>", plr, 255,255,255, true)
return
end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
gracz=tonumber(gracz)
exports["pystories-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)", getElementData(plr,"player:sid"), getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), "ginfo "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."")
local result = exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=?",getElementData(target, "player:sid"))
if not result or #result < 1 then
outputChatBox("* Nie znaleziono gracza", plr, 255, 255, 255)
return end
outputChatBox("#ff6600(ⓘ) #FFFFFFLogin: " .. result[1].login, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFPieniądze: " .. result[1].money, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFPieniądze w bankomacie: " .. result[1].bank_money, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFREP: " .. result[1].srp, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFMinuty: " .. result[1].hours, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFMinuty na duty: " .. result[1].worker, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFData rejestracji: " .. result[1].registered, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFKonto premium do: " .. result[1].premiumdate, plr,255, 255, 255, true)
outputChatBox("#ff6600(ⓘ) #FFFFFFKonto premium+ do: " .. result[1].premiumplusdate, plr,255, 255, 255, true)
end
end)
addCommandHandler("paliwo", function(plr,cmd)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr, 7) then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("#bf0101(✖) #FFFFFFNie znajdujesz się w pojeździe", plr, 255,255,255, true)
return
end
setElementData(veh, "vehicle:fuel", 100)
outputChatBox("#06B200(✔) #FFFFFFAuto zatankowane!",plr,255,255,255, true)
end
end)
addCommandHandler("paliwo2", function(plr,cmd)
if getAdmin(plr,8) then
local veh=getPedOccupiedVehicle(plr)
if not veh then
outputChatBox("#bf0101(✖) #FFFFFFNie znajdujesz się w pojeździe", plr, 255,255,255, true)
return
end
setElementData(veh, "vehicle:fuel", 300)
outputChatBox("#06B200(✔) #FFFFFFAuto zatankowane!",plr,255,255,255, true)
end
end)
addCommandHandler("daj.bron", function(plr,cmd,cel,bron,amunicja)
if getAdmin(plr,4) or getAdmin(plr, 7) then
if not cel or not bron then
outputChatBox("* Użycie: /daj.bron <nick/ID> <bron> <amunicja>", plr)
return
end
if not tonumber(bron) then
outputChatBox("* Użycie: /daj.bron <nick/ID> <bron> <amunicja>", plr)
return
end
if not amunicja then local amunicja = 10 end
local target=exports["pystories-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
if giveWeapon(target,bron,amunicja,true) then
outputChatBox("* Nadałeś(aś) broń ("..getWeaponNameFromID(bron)..") dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
outputChatBox("* Otrzymałeś(aś) broń ("..getWeaponNameFromID(bron)..") od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""),target)
else
outputChatBox("* Wpisałeś(aś) złe id broni!",plr)
end
end
end)
addCommandHandler("cfix", function(plr, cmd, range)
if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr, 7) then
if (not range) then
outputChatBox("Użyj: /cfix <zasieg>", plr)
return end
if not tonumber(range) then
outputChatBox("* /cfix <zasieg>", plr)
return end
range = tonumber(range)
if range <= 0 then
outputChatBox("* Za mala odleglosc", plr)
return end
if range > 200 then
outputChatBox("* Za duza odleglosc", plr)
return end
local x,y,z = getElementPosition(plr)
local cub = createColSphere(x,y,z,range)
local pojazdy = getElementsWithinColShape( cub, "vehicle")
if #pojazdy == 0 then
outputChatBox("* Brak pojazdow w poblizu", plr)
return end
for i,pojazd in ipairs(pojazdy) do
fixVehicle(pojazd)
setVehicleOverrideLights(pojazd, 2)
end
setTimer(destroyElement,5000,1,cub)
end
end)
addCommandHandler ( "erugergergkehrgjergeg", function(plr,cmd,ilosc )
if getAdmin(plr, 4) or getAdmin(plr,3) then
if not tonumber(ilosc) then outputChatBox("To ma być liczba!",plr,255,0,0) return end
auto = getPedOccupiedVehicle ( plr )
id = getElementModel ( auto )
if not ilosc then outputChatBox("Nie podaleś liczby!", plr, 255,0,0) return end
if ilosc == "20" then
handlingTable = getOriginalHandling ( id )
wartosc = handlingTable ["maxVelocity"]
wartosc1 = handlingTable ["engineAcceleration"]
setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(75))
setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(20))
end
if ilosc == "10" then
handlingTable = getOriginalHandling ( id )
wartosc = handlingTable ["maxVelocity"]
wartosc1 = handlingTable ["engineAcceleration"]
setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(25))
setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(10))
end
if ilosc == "40" then
handlingTable = getOriginalHandling ( id )
wartosc = handlingTable ["maxVelocity"]
wartosc1 = handlingTable ["engineAcceleration"]
setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(600))
setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(600))
end
end
end)
addCommandHandler ( "grniuergherhtguergerg", function(plr,cmd,ilosc )
if getAdmin(plr, 4) or getAdmin(plr,5) then
if not tonumber(ilosc) then outputChatBox("To ma być liczba!",plr,255,0,0) return end
auto = getPedOccupiedVehicle ( plr )
id = getElementModel ( auto )
if not ilosc then outputChatBox("Nie podaleś liczby!", plr, 255,0,0) return end
if ilosc == "0" then
setVehicleVariant(auto, 0, 0)
end
if ilosc == "1" then
setVehicleVariant(auto, 1, 1)
end
if ilosc == "2" then
setVehicleVariant(auto, 2, 2)
end
if ilosc == "3" then
setVehicleVariant(auto, 3, 3)
end
if ilosc == "4" then
setVehicleVariant(auto, 4, 4)
end
if ilosc == "5" then
setVehicleVariant(auto, 5, 5)
end
if ilosc == "6" then
setVehicleVariant(auto, 0, 2)
end
end
end)