Facebook
From Beefy Hog, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 137
  1.         function RGBToHex(red, green, blue, alpha)
  2.         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
  3.                 return nil
  4.         end
  5.         if(alpha) then
  6.                 return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
  7.         else
  8.                 return string.format("#%.2X%.2X%.2X", red,green,blue)
  9.         end
  10. end
  11.  
  12. -- Settings
  13. function pobierzDate(type,time)
  14.  
  15.         realTime=getRealTime()
  16.         type=tostring(type)
  17.         time=tonumber(time)
  18.         if time < 0 then return end
  19.  
  20.         if type == "m" then
  21.                 if time > 59 then return end
  22.                 value1=realTime.minute+time
  23.                 value3 = realTime.monthday
  24.         else
  25.                 value1=realTime.minute
  26.                 value3 = realTime.monthday
  27.         end
  28.  
  29.         if type == "h" then
  30.                 if time > 23 then return end
  31.                 value2=realTime.hour+time
  32.         else
  33.                 value2=realTime.hour
  34.         end
  35.  
  36.  
  37.         if type == "d" then if time > 31 then return end value3=realTime.monthday+time else value3=realTime.monthday end
  38.         if type == "w" then  if time > 11 then return end value4=realTime.month+time else value4=realTime.month end
  39.         if value1 >= 60 then value1 = value1-60; value2=value2+1 end
  40.         if value2 >= 24 then value2 = value2-24; value3=value3+1 end
  41.         if value3 >= 31 then value3 = value3-31; value4=value4+1 end
  42.         date=string.format("%04d-%02d-%02d ", realTime.year+1900, value4+1, value3)
  43.         time=string.format("%02d:%02d:%02d", value2, value1, realTime.second)
  44.         return date..time
  45. end
  46.  
  47. addCommandHandler("pobierz.kolor", function(plr)
  48.         if getAdmin(plr, 4) then
  49.                 local veh = getPedOccupiedVehicle(plr)
  50.                 local c1, c2, c3, c4, c5, c6, c7, c8, c9 = getVehicleColor(veh, true)
  51.                 local l1, l2, l3 = getVehicleHeadLightColor(veh)
  52.                 outputChatBox("Kolor podstawowy: #007aff"..c1..", "..c2..", "..c3.."", plr, 255, 255, 255, true)
  53.                 outputChatBox("Kolor dodatkowy: #007aff"..c4..", "..c5..", "..c6.."", plr, 255, 255, 255, true)
  54.                 outputChatBox("Kolor felg: #007aff"..c7..", "..c8..", "..c9.."", plr, 255, 255, 255, true)
  55.                 outputChatBox("Kolor świateł: #007aff"..l1..", "..l2..", "..l3.."", plr, 255, 255, 255, true)
  56.         end
  57. end)           
  58. --[[
  59. addCommandHandler("sprawdz.pojazdy", function(player)
  60.         pojazdow = 0
  61.         for key, value in pairs(getElementsByType('vehicle')) do
  62.                 if getElementData(value, 'vehicle:id') then
  63.                         pojazdow = pojazdow+1
  64.                 end
  65.         end
  66.         outputChatBox('* Pojazdów na mapie: '..pojazdow, player)
  67. end)
  68. ]]
  69. addCommandHandler("ranga", function(plr,cmd,target,numer)
  70.         if getAdmin(plr, 4) or getAdmin(plr, 8) or getAdmin(plr, 7) then
  71. if not target or not numer or not tonumber(numer) then
  72. 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)
  73. return end
  74. if tonumber(numer) > 8 or tonumber(numer) < 0 then
  75. 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)
  76. return end
  77. local gracz=exports["pystories-core"]:findPlayer(plr,target)
  78. if not gracz then outputChatBox("(?)Nie ma takiego gracza!", plr, 255, 255, 255) end
  79. local serial=getPlayerSerial(gracz)
  80. --
  81. local sel=exports["pystories-db"]:dbGet("SELECT * FROM pystories_admins WHERE serial=?", serial)
  82. if sel and #sel > 0 then
  83. if tonumber(numer) == 0 then
  84. exports['pystories-db']:dbSet("DELETE from pystories_admins where serial=?",serial)
  85. setElementData(gracz,"player:admin",false)
  86. setElementData(gracz,"player:level",false)
  87. triggerEvent("save:player",root,gracz)
  88. triggerEvent("load:player",root,gracz)
  89. setPlayerName(gracz,getPlayerName(gracz):gsub("#%x%x%x%x%x%x",""))
  90. outputChatBox(("* Zabrałeś %s rangę administracyjną!"):format(getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."("..getElementData(gracz,"id")..")"),plr,255, 255, 255)
  91. return end
  92. exports['pystories-db']:dbSet("UPDATE pystories_admins set level=? where serial=?",numer,serial)
  93. --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)
  94. --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)
  95. else
  96. --if tonumber(numer) == 0 then outputChatBox("* Ten gracz nie mial rangi!",plr,255,0,0) return end
  97. 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)
  98. 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)
  99. 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)
  100. end
  101. end
  102. end)
  103.  
  104. addCommandHandler ( "schowaj", function(plr,cmd,id )
  105.     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
  106.         if not id or not tonumber(id) then
  107.             outputChatBox("✘ Podaj id pojazdu!", plr, 255, 0, 0)
  108.             return
  109.         end
  110.         exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking = 1,tp_to_parking = ? WHERE id = ?",getElementData(plr, "player:nickname"), id)
  111.         for i,v in ipairs(getElementsByType("vehicle")) do
  112.             if getElementData(v,"vehicle:id") == tonumber(id) then
  113.             exports["pystories-vehicles"]:onSaveVehicle(v)
  114.                         destroyElement(v)
  115.                         triggerClientEvent(plr,"onClientAddNotification",plr, "Pojazd został przeniesiony do przechowywalni!", "success")    
  116.                         end
  117.                 end
  118.         end
  119. end)
  120.  
  121. addCommandHandler ( "schowajall", function(plr,cmd )
  122.     if getAdmin(plr, 4) then
  123.         for i,v in ipairs(getElementsByType("vehicle")) do
  124.             if getElementData(v,"vehicle:id") then
  125.             exports["pystories-vehicles"]:onSaveVehicle(v)
  126.         exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking = 1,tp_to_parking = ? WHERE id = ?",getElementData(plr, "player:nickname"), getElementData(v,"vehicle:id") )
  127.             destroyElement(v)
  128.             triggerClientEvent(plr,"onClientAddNotification",plr, "Wszystkie pojazdy zostały przeniesione do przechowywalni!", "success")
  129.             end
  130.         end
  131.     end
  132. end)
  133.  
  134. addCommandHandler("tppos", function(plr,cmd,x,y,z)
  135.         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
  136.                 x,y,z = tonumber(x),tonumber(y),tonumber(z)
  137.                 if not x or not y or not z then
  138.                         outputChatBox("Podaj pozycje x y z!", plr, 255, 255, 255)
  139.                         return
  140.                 end
  141.                 setElementPosition(plr,x,y,z)
  142.                 outputChatBox("Przeniesiono!", plr, 255, 255, 255)
  143.         end
  144. end)
  145.  
  146. addCommandHandler('ac', function(plr,cmd, ...)
  147. local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
  148.         if not getElementData(plr,"player:admin") then return end
  149.         if getElementData(plr,"player:admin") then
  150.         local ranga = test
  151.         local msg=table.concat({...}, " ")
  152.         if (getAdmin(plr,4)) then
  153.                 ranga = "#800080Zalozyciel"
  154.         end
  155.         if (getAdmin(plr,5)) then
  156.                 ranga = "#99bee5Opiekun"
  157.         end
  158.         if (getAdmin(plr,3)) then
  159.                 ranga = "#591411ROOT"
  160.         end
  161.         if (getAdmin(plr,2)) then
  162.                 ranga = "#f20000Administrator"
  163.         end
  164.         if (getAdmin(plr,1)) then
  165.                 ranga = "#2c6016Moderator"
  166.         end
  167.         if (getAdmin(plr,6)) then
  168.                 ranga = "#00ff0cSupport"
  169.         end
  170.         if (getAdmin(plr,7)) then
  171.                 ranga = "#CC66FFVice Zalozyciel"
  172.         end    
  173.         if (getAdmin(plr,8)) then
  174.                 ranga = "#00FFFFEmeryt"
  175.         end            
  176.         for _, p in pairs(getElementsByType('player')) do
  177.                 if getAdmin(p) then
  178.                         if not getAdmin(p) then return end
  179.                                 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)
  180.                 end
  181.         end
  182.         local desc = "|Czat| |"..getElementData(plr,"id").."|"..name.." |"..ranga.."|: "..msg:gsub("#%x%x%x%x%x%x","")..""
  183.         --triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
  184.         outputServerLog(desc:gsub("#%x%x%x%x%x%x",""))
  185. end
  186. end)
  187.  
  188. -- Teksty
  189.  
  190. function setPremiumDay(plr,days)
  191.         if getPremiumDate(plr) then
  192.         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")))
  193.         return end
  194.         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")))      
  195. end
  196.  
  197. function getPremiumDate(plr)
  198.         local queryA=exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=? AND premiumdate>NOW() LIMIT 1", getElementData(plr,"player:sid"))
  199.         if (queryA and #queryA > 0) then
  200.                 return queryA[1].premiumdate
  201.         end
  202.         return false   
  203. end
  204.  
  205. addCommandHandler("star.vip",function(plr,cmd,cel,dni)
  206.         if getAdmin(plr,4) or getAdmin(plr, 5) or getAdmin(plr, 7) or getAdmin(plr,8) then
  207.         if not cel then outputChatBox("/crazy.vip [gracz] [dni]",plr) return end
  208.         if not dni then outputChatBox("/crazy.vip [gracz] [dni]",plr) return end
  209.         if not tonumber(dni) then outputChatBox("/dajpremium [gracz] [dni]",plr) return end
  210.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  211.                 if not target then
  212.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  213.                         return
  214.                 end
  215.                 setPremiumDay(target,dni)
  216.                 outputChatBox("Nadano konto PREMIUM na "..dni.." dni!", plr, 255, 128, 64)
  217.                 outputChatBox("Otrzymales konto PREMIUM na "..dni.." dni!", target, 255, 128, 64)
  218.                 setElementData(plr,"player:premium",true)
  219.                 triggerEvent("save:player",root,target)
  220.                 triggerEvent("load:player",root,target)
  221.         end
  222. end)
  223.  
  224. addCommandHandler("star.vipplus",function(plr,cmd,cel,dni)
  225.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  226.         if not cel then outputChatBox("/crazy.vipplus [gracz] [dni]",plr) return end
  227.         if not dni then outputChatBox("/crazy.vipplus [gracz] [dni]",plr) return end
  228.         if not tonumber(dni) then outputChatBox("/dajpremium [gracz] [dni]",plr) return end
  229.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  230.                 if not target then
  231.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  232.                         return
  233.                 end
  234.                 setsPremiumDay(target,dni)
  235.                 outputChatBox("Nadano konto PREMIUM+ na "..dni.." dni!", plr, 255, 128, 64)
  236.                 outputChatBox("Otrzymales konto PREMIUM+ na "..dni.." dni!", target, 255, 128, 64)
  237.                 setElementData(plr,"player:premiumplus",true)
  238.                 triggerEvent("save:player",root,target)
  239.                 triggerEvent("load:player",root,target)
  240.                 setPlayerName(plr,"#ff6600"..getPlayerName(plr))
  241.                 setPlayerNametagColor(plr, 255, 200, 0)
  242.                 setElementData(plr,"premium:level",2)
  243.         end
  244. end)
  245.  
  246. function setsPremiumDay(plr,days)
  247.         if getsPremiumDate(plr) then
  248.         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")))
  249.         return end
  250.         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")))          
  251. end
  252.  
  253. function getsPremiumDate(plr)
  254.         local queryA=exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=? AND premiumplusdate>NOW() LIMIT 1", getElementData(plr,"player:sid"))
  255.         if (queryA and #queryA > 0) then
  256.                 return queryA[1].premiumplusdate
  257.         end
  258.         return false   
  259. end
  260.  
  261. addCommandHandler("vopis", function(plr,cmd,...)
  262.         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
  263.         local desc=table.concat(arg, " ")
  264.         local veh=getPedOccupiedVehicle(plr)
  265.         if not veh then
  266.                 triggerClientEvent(plr,"onClientAddNotification",plr, "* Musisz znajdować się w pojeździe aby dodać opis!", "error")
  267.                 return
  268.         end
  269.         if getElementData(veh, "vehicle:desc") then
  270.                 setElementData(veh, "vehicle:desc", false)
  271.         return end
  272.         if string.len(desc) < 2 then
  273.                 triggerClientEvent(plr,"onClientAddNotification",plr, " * Poprawne użycie: #007aff/vopis#FFFFFF <opis  musi wynosić min. 2 znaki>", "info")    
  274.                 return
  275.         end
  276.         descc=string.format("%s", desc)
  277.         setElementData(veh,"vehicle:desc",descc)
  278.         else
  279.                 triggerClientEvent(plr,"onClientAddNotification",plr, "* Nie posiadasz uprawnień, aby użyć tej komendy!", "error")
  280.         end
  281. end)
  282.  
  283. -- Komendy rconów
  284. addCommandHandler("przepisz.gracz", function(plr,cmd,value)
  285.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
  286.                 local veh=getPedOccupiedVehicle(plr)
  287.                 if not veh then
  288.                         outputChatBox("#bf0101(✖) #FFFFFFNie siedzisz w pojeździe.", plr, 255,255,255, true)
  289.                         return
  290.                 end
  291.                 setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
  292.                 outputChatBox("#06B200(✔) #FFFFFFPrzepisałeś(aś) pojazd do gracza: "..value, plr, 255,255,255, true)
  293.         end
  294. end)
  295.  
  296. -- Teksty
  297.  
  298. addCommandHandler("o", function(plr,cmd,...)
  299. 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
  300. local text=table.concat({...}, " ")
  301. ranga = getElementData(plr, "player:level")
  302. if ranga == 4 then
  303. ranga = "#800080Założyciel#ffffff"
  304. end
  305. if ranga == 5 then
  306. ranga = "#99bee5Opiekun#ffffff"
  307. end
  308. if ranga == 3 then
  309. ranga = "#591411RCON#ffffff"
  310. end
  311. if ranga == 2 then
  312. ranga = "#f20000Administrator#ffffff"
  313. end
  314. if ranga == 1 then
  315. ranga = "#2c6016Moderator#ffffff"
  316. end
  317. if ranga == 6 then
  318. ranga = "#00ff0cSupport#ffffff"
  319. end
  320. if ranga == 7 then
  321. ranga = "#CC66FFvZalozyciel#ffffff"
  322. end
  323. if ranga == 8 then
  324. ranga = "#00FFFFEmery#ffffff"
  325. end  
  326. outputChatBox(">> "..text.." #ffffff- ["..ranga.."] "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 255, 255, 255,true)
  327. outputServerLog('Chat /o> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
  328. end
  329. end)
  330.  
  331. addCommandHandler("daj.plnall", function(plr,cmd,pinion)
  332.         if not pinion then return end
  333.         if not tonumber(pinion) then return end
  334.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  335.                 for i,v in ipairs(getElementsByType("player")) do
  336.                 if isElement(v) then
  337.                 givePlayerMoney(v,pinion)
  338.                 end
  339.                 end
  340.                 outputChatBox("#ff6600(ⓘ) #FFFFFFZalozyciel dodał każdemu graczowi  #06B200"..pinion.." #FFFFFFPLN", root, 255,255,255,true)
  341.         end
  342. end)   
  343.  
  344. addCommandHandler("daj.rpall", function(plr,cmd,pinion)
  345.         if not pinion then return end
  346.         if not tonumber(pinion) then return end
  347.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  348.                 for i,v in ipairs(getElementsByType("player")) do
  349.                 if isElement(v) then
  350.                 setElementData(v, "player:srp", ((getElementData(v, "player:srp") or 0) + pinion))
  351.                 end
  352.                 end
  353.                 outputChatBox("#ff6600(ⓘ) #FFFFFFZalozyciel dodał każdemu graczowi  #06B200"..pinion.." #FFFFFFRP", root, 255,255,255,true)
  354.         end
  355. end)
  356.  
  357. function pobierzOrga (plr,cmd,cel,nazwa)
  358. 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
  359. if not cel or not nazwa then outputChatBox("* Użyj /stworz.organizacje <id/nick lidera> <nazwa>", plr) return end
  360. local target=exports["pystories-core"]:findPlayer(plr,cel)
  361. if not target then
  362.             outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  363.         return
  364. end
  365. outputChatBox("#06B200(✔) #FFFFFFZałożono organizacja dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." o nazwie "..nazwa.."",plr, 255,255,255, true)
  366. outputChatBox("#06B200(✔) #FFFFFFOtrzymałeś organizacje "..nazwa.." od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..".",target, 255,255,255, true)
  367. local name = getPlayerName(target):gsub("#%x%x%x%x%x%x","")
  368. exports["pystories-db"]:dbSet("INSERT INTO ms_organizacje (code,uid,login,rank) VALUES (?,?,?,4)", nazwa, getElementData(target,"player:sid"), name)
  369. setElementData(target,"player:organization",nazwa)
  370. end
  371. end
  372. addCommandHandler("stworz.organizacje",pobierzOrga)
  373.  
  374. function pobierzDomki (plr,cmd,id,nazwa)
  375. 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
  376. if not id or not nazwa then outputChatBox("* Użyj /dom <id> <nazwa>", plr) return end
  377. local x,y,z=getElementPosition(plr)
  378. kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
  379. outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
  380. exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,221,15000)", id, nazwa, id, kordy, kordy)
  381. end
  382. end
  383. addCommandHandler("dom",pobierzDomki)
  384.  
  385. function pobierzDomki (plr,cmd,id,nazwa)
  386. 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
  387. if not id or not nazwa then outputChatBox("* Użyj /dom.1 <id> <nazwa>", plr) return end
  388. local x,y,z=getElementPosition(plr)
  389. kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
  390. outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
  391. exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,31,25000)", id, nazwa, id, kordy, kordy)
  392. end
  393. end
  394. addCommandHandler("dom.1",pobierzDomki)
  395.  
  396. addCommandHandler("daj.pln", function(plr,cmd,cel,value)
  397.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  398.                 if not cel or not tonumber(value) then
  399.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /daj.pln <nick/ID> <koszt>", plr, 255,255,255, true)
  400.                         return
  401.                 end
  402.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  403.                 if not target then
  404.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  405.                         return
  406.                 end
  407.                 givePlayerMoney(target, value)
  408.                 outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) od systemu "..value.." PLN", target, 255,255,255, true)
  409.                 outputChatBox ("#06B200(✔) #FFFFFFNadałeś(aś) "..value.." PLN dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
  410.         end
  411. end)
  412.  
  413.  
  414. addCommandHandler("daj.rp", function(plr,cmd,cel,value,...)
  415.                 if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  416.                 local reason = table.concat({...}, " ")
  417.                 if not cel or not tonumber(value) then
  418.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /daj.rp <nick/ID> <ilosc>", plr, 255,255,255, true)
  419.                         return
  420.                 end
  421.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  422.                 if not target then
  423.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  424.                         return
  425.                 end
  426.                 exports["pystories-db"]:dbSet("UPDATE pystories_users SET srp=? WHERE id=?", getElementData(target,"player:srp")+value, getElementData(target, "player:sid"))
  427.                 setElementData(target,"player:srp", getElementData(target,"player:srp")+value)
  428.                 outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś)  "..value.." REP!", target, 255,255,255, true)
  429.                 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)
  430.                 end
  431. end)
  432.  
  433. -- Komendy adminów
  434.  
  435. addCommandHandler("jp", function(plr,cmd)
  436.         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
  437.                 if isPedInVehicle(plr) then
  438.                         removePedFromVehicle(plr)
  439.                 end
  440.                 if doesPedHaveJetPack(plr) then
  441.                         removePedJetPack(plr)
  442.                         outputChatBox ("#bf0101(✖) #FFFFFFZabrałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
  443.                 else
  444.                         givePedJetPack(plr)
  445.                         outputChatBox ("#007aff(ⓘ) #FFFFFFOtrzymałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
  446.                 end
  447.         end
  448. end)
  449.  
  450. addCommandHandler("vanish", function(plr,cmd)
  451.         if getAdmin(plr,4) or getAdmin(plr, 5) or getAdmin(plr, 7) or getAdmin(plr,8) then
  452.                 if not getElementData(plr, "p:inv") then
  453.                         setElementData(plr, "p:inv", true)
  454.                         outputChatBox("* Włączyłeś system niewidki, nikt Cię nie widzi !", plr, 255,255,255)
  455.                 else
  456.                         setElementData(plr, "p:inv", false)
  457.                         outputChatBox("* Wyłączyłeś system niewidki, każdy Cię widzi !", plr, 255,255,255)
  458.                 end
  459.         end
  460. end)
  461.  
  462. addCommandHandler("tune", function(plr,cmd,cel,value)
  463.         if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr, 7) or getAdmin(plr,8) then
  464.                 if not cel or not tonumber(value) then
  465.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /tune <nick/ID> <id>", plr, 255,255,255, true)
  466.                         return
  467.                 end
  468.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  469.                 if not target then
  470.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255,255,255, true)
  471.                         return
  472.                 end
  473.                 local veh=getPedOccupiedVehicle(target)
  474.                 addVehicleUpgrade(veh,value)
  475.                 outputChatBox("#ff6600(ⓘ) #FFFFFFDo twojego pojazdu dodano tuning, o id: "..value.."", target, 255,255,255, true)
  476.                 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)
  477.         end
  478.  
  479. end)
  480.  
  481. addCommandHandler("przeladuj", function(plr,cmd,cel,...)
  482.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
  483.                 local reason=table.concat({...}, " ")
  484.                 if not cel or not reason then
  485.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /przeladuj <nick/ID>", plr,255,255,255, true)
  486.                         return
  487.                 end
  488.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  489.                 if not target then
  490.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  491.                         return
  492.                 end
  493.                 triggerEvent("save:player",root,target)
  494.                 triggerEvent("load:player",root,target)
  495.                 outputChatBox("#06B200(✔) #FFFFFFPrzeładowano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr,255,255,255, true)
  496.         end
  497. end)
  498.  
  499. addCommandHandler("zapisz.all", function(plr,cmd)
  500.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  501.                 for i,v in ipairs(getElementsByType("player")) do
  502.                 if isElement(v) then
  503.                 triggerEvent("save:player",root,v)
  504.                 end
  505.                 end
  506.                 outputChatBox("#06B200(✔) #FFFFFFAdministrator zapisał wszystkim statystyki.", root, 255,255,255, true)
  507.         end
  508. end)
  509.  
  510. addCommandHandler("przeladuj.all", function(plr,cmd,cel,...)
  511.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,5) then
  512.                 for i,v in ipairs(getElementsByType("player")) do
  513.                 if isElement(v) then
  514.                 triggerEvent("save:player",root,v)
  515.                 triggerEvent("load:player",root,v)
  516.                 end
  517.                 end
  518.                 outputChatBox("* Administrator przeładował wszystkim statystyki.", root, 21,0,170,true)
  519.         end
  520. end)
  521.  
  522. addCommandHandler("wczytaj", function(plr,cmd,cel,...)
  523.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
  524.                 local reason=table.concat({...}, " ")
  525.                 if not cel or not reason then
  526.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /wczytaj <nick/ID>", plr, 255,255,255, true)
  527.                         return
  528.                 end
  529.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  530.                 if not target then
  531.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  532.                         return
  533.                 end
  534.                 triggerEvent("load:player",root,target)
  535.                 outputChatBox("* Wczytano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr)
  536.         end
  537. end)
  538.  
  539. addCommandHandler("zapisz", function(plr,cmd,cel,...)
  540.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr, 7) then
  541.                 local reason=table.concat({...}, " ")
  542.                 if not cel or not reason then
  543.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zapisz <nick/ID>", plr, 255,255,255, true)
  544.                         return
  545.                 end
  546.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  547.                 if not target then
  548.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  549.                         return
  550.                 end
  551.                 triggerEvent("save:player",root,target)
  552.                 outputChatBox("#ff6600(ⓘ) #FFFFFFZapisano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr, 255,255,255, true)
  553.         end
  554. end)
  555.  
  556. addCommandHandler("fix", function(plr,cmd,cel)
  557.         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
  558.                 if not cel then
  559.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /fix <nick/ID>", plr, 255,255,255, true)
  560.                         return
  561.                 end
  562.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  563.                 if not target then
  564.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  565.                         return
  566.                 end
  567.                 local veh=getPedOccupiedVehicle(target)
  568.                 if not veh then
  569.                         outputChatBox("#bf0101(✖) #FFFFFF"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..", nie znajduje się w pojeździe !", plr, 255,255,255, true)
  570.                         return
  571.                 end
  572.                 outputChatBox("#06B200(✔) #FFFFFFNaprawiłeś(aś) pojazd "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
  573.                 setElementHealth(veh, 1000)
  574.                 fixVehicle(veh)
  575.         end
  576.  
  577. end)
  578.  
  579. addCommandHandler("flip", function(plr,cmd,cel)
  580.         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
  581.                 if not cel then
  582.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /flip <nick/ID>", plr, 255,255,255, true)
  583.                         return
  584.                 end
  585.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  586.                 if not target then
  587.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  588.                         return
  589.                 end
  590.                 local veh=getPedOccupiedVehicle(target)
  591.                 if not veh then
  592.                         outputChatBox("#bf0101(✖) #FFFFFF"..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..", nie znajduje się w pojeździe !", plr, 255,255,255, true)
  593.                         return
  594.                 end
  595.                 local x,y,z = getElementRotation(veh)
  596.                 outputChatBox("#06B200(✔) #FFFFFFObróciłeś(aś) pojazd "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr, 255,255,255, true)
  597.                 setElementRotation(veh, 0, 0, z)
  598.         end
  599.  
  600. end)
  601.  
  602. addCommandHandler("kolor", function(plr,cmd,cel,value,value2,value3)
  603.         if getAdmin(plr,4) or getAdmin(plr, 7)  then
  604.                 if not cel or not tonumber(value) or not tonumber(value2) or not tonumber(value3) then
  605.                         outputChatBox("* Użycie: /kolor <nick/ID> <r g b>", plr)
  606.                         return
  607.                 end
  608.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  609.                 if not target then
  610.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  611.                         return
  612.                 end
  613.                 local veh=getPedOccupiedVehicle(target)
  614.                 setVehicleColor(veh,value,value2,value3,value,value2,value3)
  615.                 outputChatBox("* Twojemu pojazdowi zmieniono kolor.", target)
  616.                 outputChatBox("* Zmieniłeś(aś) kolor pojazdu graczu: "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
  617.         end
  618.  
  619. end)
  620.  
  621. -- reszta komend
  622.  
  623. function cmd_pkick(plr, cmd, target, ...)
  624.         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
  625.         if not target or not ... then
  626.                 outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj /k [ID/Nazwa gracza] [Powód]", plr, 255, 255, 255, true)
  627.                 return
  628.         end
  629.     local player = exports["pystories-core"]:findPlayer(plr,target)
  630.         local text = table.concat({...}, " ")
  631.         if player then
  632.                 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)
  633.                 outputConsole(" ", player)
  634.                 outputConsole("Zostałeś wykopany z serwera!", player)
  635.                 outputConsole("Osoba wyrzucająca: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), player)
  636.                 outputConsole("Powód: "..text, player)
  637.                 outputConsole(" ", player)
  638.                 kickPlayer(player, getPlayerName(plr), "Sprawdź swoją konsolę (~)")
  639.         end
  640.         end
  641. end
  642. addCommandHandler("k", cmd_pkick)
  643.  
  644. addCommandHandler("tt", function(plr,cmd,cel)
  645.         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
  646.                 if not cel then
  647.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /tt <nick/ID>", plr, 255,255,255, true)
  648.                         return
  649.                 end
  650.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  651.                 if not target then
  652.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  653.                         return
  654.                 end
  655.                 if isPedInVehicle(plr) then
  656.                         removePedFromVehicle(plr)
  657.                 end
  658.                 outputChatBox("#06B200(✔) #FFFFFFPrzeteleportowano do gracza o nicku #06B200"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." ", plr, 255,255,255, true)
  659.                 --triggerClientEvent(plr,"onClientAddNotification",plr, " * Pomyślnie przeteleportowano do gracza:\n#339933"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." ", "esssucc")  
  660.                 local x,y,z=getElementPosition(target)
  661.                 setElementInterior(plr,getElementInterior(target))
  662.                 setElementDimension(plr,getElementDimension(target))
  663.                 setElementPosition(plr,x+math.random(1,2),y+math.random(1,2),z)
  664.         end
  665. end)
  666.  
  667. addCommandHandler("th", function(plr,cmd,cel)
  668.         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
  669.                 if not cel then
  670.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /th <nick/ID>", plr, 255,255,255, true)
  671.                         return
  672.                 end
  673.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  674.                 if not target then
  675.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  676.                         return
  677.                 end
  678.                 if isPedInVehicle(target) then
  679.                         removePedFromVehicle(target)
  680.                 end
  681.                 outputChatBox("#06B200(✔) #FFFFFFPrzeteleportowano gracza o nicku #06B200"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." #FFFFFFdo Siebie ", plr, 255,255,255, true)
  682.                 --triggerClientEvent(plr,"onClientAddNotification",plr, " * Pomyślnie przeteleportowano gracza:\n#339933"..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." #FFFFFFdo siebie.", "success")  
  683.                 local x,y,z=getElementPosition(plr)
  684.                 setElementInterior(target,getElementInterior(plr))
  685.                 setElementDimension(target,getElementDimension(plr))
  686.                 setElementPosition(target,x+math.random(1,2),y+math.random(1,2),z)
  687.         end
  688. end)
  689.  
  690. addCommandHandler("dim", function(plr, cmd, value)
  691.         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
  692.         if (not value) then
  693.             outputChatBox("* Użyj: /dim <ilość>", plr)
  694.             return
  695.         end
  696.         setElementDimension(plr, value)
  697.     end
  698. end)
  699.  
  700. function make_warn(gracz, cmd, toGracz, ...)
  701.         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
  702.         if toGracz and ... then
  703.         local toGracz=exports["pystories-core"]:findPlayer(gracz,toGracz)
  704.                 if not toGracz then
  705.                 outputChatBox("Nie znaleziono podanego gracza.", gracz)
  706.                         return
  707.                 end
  708.                 local tresc = table.concat({...}, " ")
  709.                 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
  710.                 outputChatBox(" ", toGracz, 0, 122, 255, true)
  711.         outputChatBox("Otrzymałeś(aś) ostrzeżenie od "..getPlayerName(gracz):gsub("#%x%x%x%x%x%x","").."", toGracz, 255, 79, 10, true)
  712.                 outputChatBox(" ", toGracz, 0, 122, 255, true)
  713.                 outputChatBox("Powód: "..tresc, toGracz, 255, 255, 255)
  714.                 outputChatBox(" ", toGracz, 0, 122, 255, true)
  715.                 outputChatBox("Nie stosowanie się do ostrzeżenia, może skutkować kickiem lub banem.", toGracz, 255, 79, 10, true)
  716.                 outputConsole(txt)
  717.                 triggerClientEvent(root, "prawko_noti", root, txt)
  718.         else
  719.                 outputChatBox("Poprawne użycie: /warn <id/nick> <powód>", gracz)
  720.         end
  721.         end
  722. end
  723. addCommandHandler("warn", make_warn)
  724.  
  725. addCommandHandler("zpj", function(plr,cmd,cel,time,type, ...)
  726.         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
  727.                 local text = table.concat({...}, " ")
  728.                 if not cel or not tonumber(time) or not type or not text then
  729.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zpj <nick/ID> <czas> <jednostka: m/h/y/w> <powód>", plr, 255,255,255, true)
  730.                         return
  731.                 end
  732.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  733.                 if not target then
  734.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  735.                         return
  736.                 end
  737.                 if isPedInVehicle(target) then
  738.                         removePedFromVehicle(target)
  739.                 end
  740.                 local czas_tabela=pobierzDate(type,time)
  741.         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)
  742.                
  743.                 if type == "m" then
  744.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "A")
  745.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "B")
  746.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),text, time, "C")
  747.                 elseif type == "h" then
  748.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "A")
  749.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "B")
  750.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),text, time, "C")
  751.                 elseif type == "d" then
  752.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "A")
  753.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "B")
  754.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),text, time, "C")
  755.                 elseif type == "w" then
  756.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "A")
  757.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "B")
  758.                         exports["pystories-db"]:dbSet("INSERT INTO pystories_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)", getPlayerSerial(target),text, time, "C")
  759.                 end
  760.  
  761.  
  762.                 print(czas_tabela)
  763.  
  764.  
  765.                 outputChatBox(" ", target, 255, 0, 0)
  766.                 outputChatBox(" ", target, 255, 0, 0)
  767.                 outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) zakaz prowadzenia pojazdów od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
  768.                 outputChatBox(" ", target, 255, 0, 0)
  769.                 outputChatBox("#ff6600(ⓘ) #FFFFFFPowód: "..text:gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
  770.                 outputChatBox(" ", target, 255, 0, 0)
  771.                 outputChatBox("#ff6600(ⓘ) #FFFFFFCzas: "..time .. type .."", target, 255, 255, 255, true)
  772.                 outputChatBox(" ", target, 255, 0, 0)
  773.                 outputChatBox(" ", target, 255, 0, 0)
  774.         end
  775. end)
  776.  
  777. addCommandHandler('gmute', function(plr,cmd,cel,time,type, ...)
  778.         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
  779.                 local text = table.concat({...}, " ")
  780.                 if not cel or not tonumber(time) or not type or not text then
  781.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /mute <nick/ID> <czas> <jednostka: m/h/y/w> <powód>", plr, 255,255,255, true)
  782.                         return
  783.                 end
  784.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  785.                 if not target then
  786.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  787.                         return
  788.                 end
  789.                 local czas_tabela=pobierzDate(type,time)
  790.         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)
  791.                
  792.                 if type == "m" then
  793.                         exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? minute)",getPlayerSerial(target),text,time)
  794.                 elseif type == "h" then
  795.                         exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? hour)", getPlayerSerial(target),text, time)
  796.                 elseif type == "d" then
  797.                         exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? day)", getPlayerSerial(target),text, time)
  798.                 elseif type == "w" then
  799.                         exports["pystories-db"]:dbSet("INSERT INTO n_mute (serial,reason,time) VALUES (?,?,NOW() + INTERVAL ? week)", getPlayerSerial(target),text, time)
  800.                 end
  801.  
  802.                 setElementData(target,'player:mute',true)
  803.  
  804.                 outputChatBox(" ", target, 255, 0, 0)
  805.                 outputChatBox(" ", target, 255, 0, 0)
  806.                 outputChatBox("#ff6600(ⓘ) #FFFFFFOtrzymałeś(aś) karę wyciszenia od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
  807.                 outputChatBox(" ", target, 255, 0, 0)
  808.                 outputChatBox("#ff6600(ⓘ) #FFFFFFPowód: "..text:gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
  809.                 outputChatBox(" ", target, 255, 0, 0)
  810.                 outputChatBox("#ff6600(ⓘ) #FFFFFFCzas: "..time .. type .."", target, 255, 255, 255, true)
  811.                 outputChatBox(" ", target, 255, 0, 0)
  812.                 outputChatBox(" ", target, 255, 0, 0)
  813.         end
  814. end)
  815.  
  816. addCommandHandler('gunmute', function(plr,cmd,cel)
  817.         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
  818.                 if not cel then
  819.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /unmute <nick/ID>", plr, 255,255,255, true)
  820.                         return
  821.                 end
  822.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  823.                 if not target then
  824.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  825.                         return
  826.                 end
  827.         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",""))
  828.                
  829.  
  830.                 setElementData(target,'player:mute',false)
  831.                 exports['pystories-db']:dbSet('delete from n_mute where serial=?',getPlayerSerial(target))
  832.  
  833.                 outputChatBox(" ", target, 255, 0, 0)
  834.                 outputChatBox(" ", target, 255, 0, 0)
  835.                 outputChatBox("#ff6600(ⓘ) #FFFFFFZostałeś odciszony przez: "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."", target, 255, 255, 255, true)
  836.                 outputChatBox(" ", target, 255, 0, 0)
  837.                 outputChatBox(" ", target, 255, 0, 0)
  838.         end
  839. end)
  840.  
  841. addCommandHandler("zpl", function(plr,cmd,cel,time,rodzaj,...)
  842.         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
  843.                 local reason=table.concat({...}, " ")
  844.                 if not cel or not tonumber(time) or not rodzaj or not reason then
  845.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /zpl <nick/ID> <czas> <jednostka: m/h/d/w> <powód>", plr, 255,255,255, true)
  846.                         return
  847.                 end
  848.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  849.                 if not target then
  850.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  851.                         return
  852.                 end
  853.                 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))
  854.                 local result=exports["DB2"]:pobierzWyniki(query)
  855.                 if (result) then
  856.                         return outputChatBox("#ff6600(ⓘ) #FFFFFFGracz Posiada zawieszone prawo jazdy do "..result["time"]..", za: "..result["reason"], plr, 255, 255, 255, true)
  857.                 else
  858.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "L", getPlayerSerial(plr))
  859.                 end
  860.                 if isPedInVehicle(target) then
  861.                         removePedFromVehicle(target)
  862.                 end
  863.                 if tonumber(time) <= 0 then return end
  864.                 local result = "DATE()"
  865.                 if rodzaj == "m" then
  866.                 result = string.format('DATE_ADD(NOW(), INTERVAL %d MINUTE)',time)
  867.                 elseif rodzaj == "h" then
  868.                 result = string.format('DATE_ADD(NOW(), INTERVAL %d HOUR)',time)
  869.                 elseif rodzaj == "d" then
  870.                 result = string.format('DATE_ADD(NOW(), INTERVAL %d DAY)',time)
  871.                 elseif rodzaj == "w" then
  872.                 result = string.format('DATE_ADD(NOW(), INTERVAL %d WEEK)',time)
  873.                 end
  874.                 reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
  875.                 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)
  876.                 local query = string.format("INSERT INTO pystories_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')", getPlayerSerial(target), reason, result, "L")
  877.                 exports["pystories-db"]:dbSet(query)
  878.         end
  879. end)
  880. addCommandHandler("skin", function(plr,cmd,cel,id)
  881.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr, 7) or getAdmin(plr, 8) then
  882.                 local id = tonumber(id)
  883.                 if not cel or not id then
  884.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /skin <nick/ID> <id skinu> ", plr, 255,255,255, true)
  885.                         return
  886.                 end
  887.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  888.                 if not target then
  889.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  890.                         return
  891.                 end
  892.                 if id < 0 or id > 311 then outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /skin <nick/ID> <id skinu>", plr, 255,255,255, true) return end
  893.                 if id == 22 then outputChatBox("#bf0101(✖) #FFFFFFSkin został zablokowany z powodu buga!",plr, 255,255,255, true) return end
  894.                 setElementModel(target,id)
  895.                 local query = exports['pystories-db']:dbSet("UPDATE pystories_users SET skin=? WHERE id=?",id,getElementData(target,"player:sid"))
  896.                 outputChatBox("#06B200(✔) #FFFFFFZmieniono skin graczu "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." na id "..id,plr, 255,255,255, true)
  897.         end
  898. end)
  899. addCommandHandler("opj", function(plr,cmd,cel)
  900.         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
  901.                 if not cel then
  902.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /opj <nick/ID> ", plr, 255,255,255, true)
  903.                         return
  904.                 end
  905.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  906.                 if not target then
  907.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  908.                         return
  909.                 end
  910.                 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))
  911.                 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))
  912.                 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))
  913.                 local result=exports["DB2"]:pobierzWyniki(query)
  914.                 local result2=exports["DB2"]:pobierzWyniki(query2)
  915.                 local result3=exports["DB2"]:pobierzWyniki(query3)
  916.                 if (result) or (result2) or (result3) then
  917.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "A", getPlayerSerial(target))
  918.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "B", getPlayerSerial(target))
  919.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "C", getPlayerSerial(target))
  920.                         outputChatBox("#06B200(✔) #FFFFFFGracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoje prawo jazdy!", plr, 255, 255, 255, true)
  921.                         outputChatBox("#007aff(ⓘ) #FFFFFF "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoje prawo jazdy!", target, 255, 255, 255, true)
  922.                 else
  923.                         outputChatBox("#007aff(ⓘ) #FFFFFFGracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranego prawka!", plr, 255, 255, 255, true)
  924.                 end
  925.         end
  926. end)
  927. addCommandHandler("opl", function(plr,cmd,cel)
  928.         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
  929.                 if not cel then
  930.                         outputChatBox("* Użycie: /opl <nick/ID> ", plr)
  931.                         return
  932.                 end
  933.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  934.                 if not target then
  935.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  936.                         return
  937.                 end
  938.                 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))
  939.                 local result=exports["DB2"]:pobierzWyniki(query)
  940.                 if (result) then
  941.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE type=? AND active=1 AND serial=?", "L", getPlayerSerial(target))
  942.                         outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." odzyskal swoja Licencje!", plr, 0, 255, 0)
  943.                         outputChatBox("* "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").." oddal Twoja Licencje!", target, 0, 255, 0)
  944.                 else
  945.                         outputChatBox("* Gracz "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." nie posiada zabranej Licencji!", plr, 0, 255, 0)
  946.                 end
  947.                 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")
  948.         end
  949. end)
  950.  
  951. addCommandHandler("b", function(plr,cmd,cel,x,bantype,...)
  952.         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
  953.                 local reason=table.concat({...}, " ")
  954.                 if not cel or not tonumber(x) or not bantype or not reason then
  955.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /b <nick/ID> <ilość> <m/h/d> <powód>", plr, 255,255,255, true)
  956.                         outputChatBox("m - minuty/h - godziny/d - dni", plr)
  957.                         return
  958.                 end
  959.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  960.                 if not target then
  961.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  962.                         return
  963.                 end
  964.                 if (getAdmin(plr,4) == false) and getAdmin(target,4) then return end
  965.                 reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
  966.                 if bantype=="m" or bantype=="h" or bantype=="d" then
  967.                 if bantype=="m" then
  968.                 exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)", getPlayerSerial(target),reason, x, "ban")
  969.                 end
  970.                 if bantype=="h" then
  971.                 exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)", getPlayerSerial(target),reason, x, "ban")
  972.                 end
  973.                 if bantype=="d" then
  974.                 exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)", getPlayerSerial(target),reason, x, "ban")
  975.                 end
  976.                 end
  977.                 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)
  978.                 kickPlayer(target,plr,"Zostałeś(aś) zbanowany(a), połącz się ponownie.")
  979.         end
  980. end)
  981.  
  982. addCommandHandler("pb", function(plr,cmd,cel,...)
  983.         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
  984.                 local reason=table.concat({...}, " ")
  985.                 if not cel or not reason then
  986.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /pb <nick/ID> <powód>", plr, 255,255,255, true)
  987.                         return
  988.                 end
  989.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  990.                 if not target then
  991.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  992.                         return
  993.                 end
  994.                 if (getAdmin(plr,4) == false) and getAdmin(target,4) then return end
  995.                 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))
  996.                 local result=exports["DB2"]:pobierzWyniki(query)
  997.                 if (result) then
  998.                         return outputChatBox("* Gracz Posiada Bana do "..result["time"]..", za: "..result["reason"], plr, 255, 0, 0)
  999.                 else
  1000.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?", "ban", getPlayerSerial(target))
  1001.                 end
  1002.                 reason = reason.." |od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","").."|"
  1003.  
  1004.                 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)
  1005.                 exports["pystories-db"]:dbSet("INSERT INTO pystories_ban (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSerial(target), reason,"2030-12-31 23:59:59", "ban")
  1006.                 kickPlayer(target,reason)
  1007.         end
  1008. end)
  1009.  
  1010. addCommandHandler("ub", function(plr,cmd,cel)
  1011.         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
  1012.                 if not cel then
  1013.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUżycie: /ub <serial>", plr, 255,255,255, true)
  1014.                         return
  1015.                 end
  1016.                 local query=string.format("SELECT * FROM pystories_ban WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","ban", cel)
  1017.                 local result=exports["DB2"]:pobierzWyniki(query)
  1018.                 if (result) then
  1019.                         exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?", "ban", cel)
  1020.                         outputChatBox("#06B200(✔) #FFFFFFUsunieto bana o serialu ("..cel..")!", plr, 255, 255, 255, true)
  1021.                 else
  1022.                         outputChatBox("#bf0101(✖) #FFFFFFNie wykryto bana o serialu ("..cel..")!", plr, 255, 255, 255, true)
  1023.                 end
  1024.         end
  1025. end)
  1026.  
  1027. addCommandHandler("vtt", function(plr,cmd,vid)
  1028.         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
  1029.                 if not vid or not tonumber(vid) then return end
  1030.                 vid=tonumber(vid)
  1031.                 for i,v in ipairs(getElementsByType("vehicle")) do
  1032.                         local dbid=getElementData(v,"vehicle:id")
  1033.                         if dbid and tonumber(dbid) == vid then
  1034.                         local x,y,z=getElementPosition(v)
  1035.                         setElementPosition(plr,x,y,z+4)
  1036.                         setElementInterior(plr, getElementInterior(v))
  1037.                         setElementDimension(plr, getElementDimension(v))
  1038.                                 warpPedIntoVehicle(plr,v)
  1039.                 end
  1040.                 end
  1041.                 local query=exports["pystories-db"]:dbGet("SELECT 1 FROM pystories_vehicles WHERE id=? AND parking>0", vid)
  1042.                 if query then
  1043.                         outputChatBox("#ff6600(ⓘ) #FFFFFFPojazd znajduje sie na parkingu/w przechowalni.", plr, 255, 255, 255, true)
  1044.                 else
  1045.                         outputChatBox("#ff6600(ⓘ) #FFFFFFNie znaleziono podanego pojazdu na mapie.", plr, 255, 255, 255, true)
  1046.                 end
  1047.         end
  1048. end)
  1049.  
  1050. addCommandHandler("vth", function(plr,cmd,vid)
  1051.         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
  1052.                 if not vid or not tonumber(vid) then return end
  1053.                 vid=tonumber(vid)
  1054.                 for i,v in ipairs(getElementsByType("vehicle")) do
  1055.                         local dbid=getElementData(v,"vehicle:id")
  1056.                         if dbid and tonumber(dbid) == vid then
  1057.                                 if getElementData(v,"vehicle_id:faction") then outputChatBox("* Auto znajduje się na parkingu policyjnym !",plr,255,0,0) return end
  1058.                         local x,y,z=getElementPosition(plr)
  1059.                         setElementPosition(v,x,y,z+0.1)
  1060.                         setElementInterior(v, getElementInterior(plr))
  1061.                         setElementDimension(v, getElementDimension(plr))
  1062.                                 warpPedIntoVehicle(plr,v)
  1063.                         end
  1064.                 end
  1065.                 local query=exports["pystories-db"]:dbGet("SELECT 1 FROM pystories_vehicles WHERE id=? AND parking>0", vid)
  1066.                 if query then
  1067.                         outputChatBox("#ff6600(ⓘ) #FFFFFFPojazd znajduje sie na parkingu/w przechowalni.", plr, 255, 255, 255, true)
  1068.                 else
  1069.                         outputChatBox("#ff6600(ⓘ) #FFFFFFNie znaleziono podanego pojazdu na mapie.", plr, 255, 255, 255, true)
  1070.                 end
  1071.         end
  1072. end)
  1073.  
  1074. addCommandHandler("heal", function(plr,cmd,cel)
  1075.         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
  1076.                 if not cel then
  1077.                         outputChatBox("* Użyj: /heal <id/nick>", plr)
  1078.                         return
  1079.                 end
  1080.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  1081.                 if not target then
  1082.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  1083.                         return
  1084.                 end
  1085.                 setElementHealth(target, 100)
  1086.                 outputChatBox("* Uleczyłeś(aś) gracza " ..getPlayerName(target):gsub("#%x%x%x%x%x%x",""), plr)
  1087.                 outputChatBox("* Zostałeś(aś) uleczony(a) przez "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), target)
  1088.         end
  1089. end)
  1090.  
  1091.  
  1092. addCommandHandler("spec", function(plr,cmd,cel)
  1093.         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
  1094.                 if not cel then
  1095.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUzyj: /spec <id/nick>", plr,255,255,255, true)
  1096.                         return
  1097.                 end
  1098.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  1099.                 if not target then
  1100.                         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  1101.                         return
  1102.                 end
  1103.                 local x,y,z=getElementPosition(plr)
  1104.                 removePedFromVehicle(plr)
  1105.                 setElementInterior(plr, getElementInterior(target))
  1106.                 setElementDimension(plr, getElementDimension(target))
  1107.                 setCameraTarget(plr, target)
  1108.                 setElementData(plr,"spec:pos",{x,y,z})
  1109.         end
  1110. end)
  1111.  
  1112. addCommandHandler("specoff", function(plr,cmd)
  1113.         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
  1114.                 local spec=getElementData(plr,"spec:pos")
  1115.                 if not spec then return end
  1116.                 setElementPosition(plr, spec[1], spec[2], spec[3])
  1117.                 setCameraTarget(plr, plr)
  1118.         end
  1119. end)
  1120.  
  1121. function destroyBlipsAttachedTo(player)
  1122.     local attached = getAttachedElements ( player )
  1123.     if ( attached ) then
  1124.         for k,element in ipairs(attached) do
  1125.             if getElementType ( element ) == "blip" then
  1126.                 destroyElement ( element )
  1127.             end
  1128.         end
  1129.     end
  1130. end
  1131.  
  1132. addCommandHandler("inv", function(plr)
  1133.         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
  1134.                 if getElementAlpha(plr) > 0 then
  1135.                         setElementAlpha(plr,0)
  1136.                         setElementData(plr, "player:inv", true)
  1137.                         destroyBlipsAttachedTo ( plr )
  1138.                 else
  1139.                         setElementAlpha(plr,255)
  1140.                         setElementData(plr, "player:inv", false)
  1141.                         local newValue = getElementData(plr,"player:admin") -- find the new value
  1142.                         if newValue == true then
  1143.                                 destroyBlipsAttachedTo (plr)
  1144.                                 createBlipAttachedTo ( plr, 0, 2, 255, 255, 255 )
  1145.  
  1146.                         else
  1147.                                 destroyBlipsAttachedTo ( plr )
  1148.                                 createBlipAttachedTo ( plr, 0, 2, 255, 255, 255 )
  1149.                         end
  1150.                 end
  1151.         end
  1152. end)
  1153.  
  1154. addCommandHandler("invveh", function(plr)
  1155.         if getAdmin(plr,4) or getAdmin(plr, 7) or getAdmin(plr,8) then
  1156.                 local plr=getPedOccupiedVehicle(plr)
  1157.                 if not plr then return end
  1158.                 if getElementAlpha(plr) > 0 then
  1159.                         setElementAlpha(plr,0)
  1160.                 else
  1161.                         setElementAlpha(plr,255)
  1162.                 end
  1163.         end
  1164. end)
  1165.  
  1166. local dopicia = {}
  1167. local player_alc = {}
  1168. local pije = {}
  1169.  
  1170. function stopAnimacja(plr)
  1171.     setPedAnimation(plr, false)
  1172.     unbindKey(plr, "ENTER", "down", stopAnimacja)
  1173. end
  1174.  
  1175. function pij(plr)
  1176.         if pije[plr] then return end
  1177.         pije[plr] = true
  1178.     setPedAnimation ( plr, "BAR", "dnk_stndM_loop", 1200, false, false )
  1179.         setTimer(function () setPedAnimation(plr,false);pije[plr] = nil; triggerClientEvent(plr,"onDrinkAlcohol",root) end,1200,1)
  1180.         setPedWalkingStyle(plr,126)
  1181.         dopicia[plr] = dopicia[plr] -1
  1182.         if dopicia[plr] == 0 then
  1183.         destroyElement(player_alc[plr])
  1184.         player_alc[plr] = nil
  1185.     unbindKey(plr, "fire", "down", pij)
  1186.         end
  1187. end
  1188.  
  1189.  
  1190. addCommandHandler("sex1",function(plr,cmd)
  1191.     if (isPedInVehicle(plr)) then
  1192.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1193.         return
  1194.     end
  1195. bindKey(plr, "ENTER", "down", stopAnimacja)
  1196.     setPedAnimation ( plr, "sex", "sex_1_cum_p", -1, true, false )
  1197. end)
  1198.  
  1199.  
  1200. addCommandHandler("sex2",function(plr,cmd)
  1201.     if (isPedInVehicle(plr)) then
  1202.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1203.         return
  1204.     end
  1205. bindKey(plr, "ENTER", "down", stopAnimacja)
  1206.     setPedAnimation ( plr, "sex", "sex_1_cum_w", -1, true, false )
  1207. end)
  1208.  
  1209.  
  1210. addCommandHandler("dzwonisz",function(plr,cmd)
  1211.     setPedAnimation( plr, "ped", "phone_in", -1, false, false, false, true)
  1212. end)
  1213.  
  1214.  
  1215. -- animacje zaimportowane z BestPlay i wykonane przez wujka <[email protected]>
  1216.  
  1217. addCommandHandler("rece",function(plr,cmd)
  1218.     if (isPedInVehicle(plr)) then
  1219.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1220.         return
  1221.     end
  1222.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1223.     setPedAnimation ( plr, "ped", "handsup", -1, false, false )
  1224. end)
  1225.  
  1226. addCommandHandler("taichi",function(plr,cmd)
  1227.     if (isPedInVehicle(plr)) then
  1228.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1229.         return
  1230.     end
  1231.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1232.     setPedAnimation ( plr, "PARK", "Tai_Chi_Loop", -1, true, false )
  1233. end)
  1234.  
  1235. addCommandHandler("predator",function(plr,cmd)
  1236.     if (isPedInVehicle(plr)) then
  1237.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1238.         return
  1239.     end
  1240.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1241.     setPedAnimation ( plr, "BSKTBALL", "BBALL_def_loop", -1, true, false )
  1242. end)
  1243.  
  1244. addCommandHandler("podkrecasz",function(plr,cmd)
  1245.     if (isPedInVehicle(plr)) then
  1246.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1247.         return
  1248.     end
  1249.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1250.     setPedAnimation ( plr, "BAR", "Barserve_glass", -1, false, false )
  1251. end)
  1252.  
  1253. addCommandHandler("dab",function(plr,cmd)
  1254.     if (isPedInVehicle(plr)) then
  1255.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1256.         return
  1257.     end
  1258.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1259.    setPedAnimation ( plr, "BAR", "BD_Panic_01", -1, false, false )
  1260. end)
  1261.  
  1262. addCommandHandler("podsluchujesz",function(plr,cmd)
  1263.     if (isPedInVehicle(plr)) then
  1264.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1265.         return
  1266.     end
  1267.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1268.     setPedAnimation ( plr, "BAR", "Barserve_order", -1, false, false )
  1269. end)
  1270.  
  1271. addCommandHandler("podaj",function(plr,cmd,targ)
  1272.         if getAdmin(plr,3) or getAdmin(plr,4) then
  1273.                 if not targ then
  1274.                         outputChatBox("Uzyj: /podaj <id/nick>", plr)
  1275.                         return
  1276.                 end
  1277.                 local target=exports["pystories-core"]:findPlayer(plr,targ)
  1278.                 if not target then
  1279.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  1280.                         return
  1281.                 end
  1282.         if player_alc[target] then outputChatBox("* Gracz ma juz alkochol!", plr) return end
  1283.     if (isPedInVehicle(target)) then
  1284.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1285.         return
  1286.     end
  1287.         local alc = createObject(1484,0,0,0)
  1288.         player_alc[target] = alc
  1289.         dopicia[target] = 3
  1290.         exports.bone_attach:attachElementToBone(alc,target,12,0,0,0,0,0,0)
  1291.     bindKey(target, "fire", "down", pij)
  1292.         end
  1293. end)
  1294. addCommandHandler("pijesz",function(plr,cmd)
  1295.     if (isPedInVehicle(plr)) then
  1296.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1297.         return
  1298.     end
  1299.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1300.     setPedAnimation ( plr, "BAR", "dnk_stndM_loop", -1, true, false )
  1301. end)
  1302.  
  1303.  
  1304. addCommandHandler("taniec",function(plr,cmd)
  1305.     if (isPedInVehicle(plr)) then
  1306.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1307.         return
  1308.     end
  1309.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1310.     setPedAnimation ( plr, "CHAINSAW", "CSAW_Hit_2", -1, true, true )
  1311. end)
  1312.  
  1313. addCommandHandler("taniec2",function(plr,cmd)
  1314.     if (isPedInVehicle(plr)) then
  1315.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1316.         return
  1317.     end
  1318.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1319.     setPedAnimation ( plr, "SKATE", "skate_idle", -1, true, false )
  1320. end)
  1321.  
  1322. addCommandHandler("taniec3",function(plr,cmd)
  1323.     if (isPedInVehicle(plr)) then
  1324.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1325.         return
  1326.     end
  1327.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1328.     setPedAnimation ( plr, "STRIP", "strip_B", -1, true, false )
  1329. end)
  1330.  
  1331. addCommandHandler("taniec4",function(plr,cmd)
  1332.     if (isPedInVehicle(plr)) then
  1333.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1334.         return
  1335.     end
  1336.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1337.     setPedAnimation ( plr, "DANCING", "dance_loop", -1, true, false )
  1338. end)
  1339.  
  1340. addCommandHandler("taniec5",function(plr,cmd)
  1341.     if (isPedInVehicle(plr)) then
  1342.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1343.         return
  1344.     end
  1345.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1346.     setPedAnimation ( plr, "DANCING", "DAN_Down_A", -1, true, false )
  1347. end)
  1348.  
  1349. addCommandHandler("taniec6",function(plr,cmd)
  1350.     if (isPedInVehicle(plr)) then
  1351.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1352.         return
  1353.     end
  1354.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1355.     setPedAnimation ( plr, "STRIP", "strip_G", -1, true, false )
  1356. end)
  1357.  
  1358. addCommandHandler("taniec7",function(plr,cmd)
  1359.     if (isPedInVehicle(plr)) then
  1360.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1361.         return
  1362.     end
  1363.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1364.     setPedAnimation ( plr, "STRIP", "STR_C2", -1, true, false )
  1365. end)
  1366.  
  1367. addCommandHandler("taniec8",function(plr,cmd)
  1368.     if (isPedInVehicle(plr)) then
  1369.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1370.         return
  1371.     end
  1372.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1373.     setPedAnimation ( plr, "DANCING", "dnce_M_b", -1, true, false )
  1374. end)
  1375.  
  1376. addCommandHandler("taniec9",function(plr,cmd)
  1377.     if (isPedInVehicle(plr)) then
  1378.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1379.         return
  1380.     end
  1381.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1382.     setPedAnimation ( plr, "DANCING", "DAN_Loop_A", -1, true, false )
  1383. end)
  1384.  
  1385. addCommandHandler("taniec10",function(plr,cmd)
  1386.     if (isPedInVehicle(plr)) then
  1387.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1388.         return
  1389.     end
  1390.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1391.     setPedAnimation ( plr, "DANCING", "dnce_M_d", -1, true, false )
  1392. end)
  1393.  
  1394. addCommandHandler("taniec11",function(plr,cmd)
  1395.     if (isPedInVehicle(plr)) then
  1396.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1397.         return
  1398.     end
  1399.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1400.     setPedAnimation ( plr, "STRIP", "strip_D", -1, true, false )
  1401. end)
  1402.  
  1403. addCommandHandler("taniec12",function(plr,cmd)
  1404.     if (isPedInVehicle(plr)) then
  1405.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1406.         return
  1407.     end
  1408.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1409.     setPedAnimation ( plr, "STRIP", "strip_E", -1, true, false )
  1410. end)
  1411.  
  1412. addCommandHandler("taniec13",function(plr,cmd)
  1413.     if (isPedInVehicle(plr)) then
  1414.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1415.         return
  1416.     end
  1417.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1418.     setPedAnimation ( plr, "STRIP", "STR_Loop_A", -1, true, false )
  1419. end)
  1420.  
  1421. addCommandHandler("taniec14",function(plr,cmd)
  1422.     if (isPedInVehicle(plr)) then
  1423.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1424.         return
  1425.     end
  1426.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1427.     setPedAnimation ( plr, "STRIP", "STR_Loop_B", -1, true, false )
  1428. end)
  1429.  
  1430. addCommandHandler("taniec15",function(plr,cmd)
  1431.     if (isPedInVehicle(plr)) then
  1432.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1433.         return
  1434.     end
  1435.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1436.     setPedAnimation ( plr, "FINALE", "FIN_Cop1_Stomp", -1, true, false )
  1437. end)
  1438.  
  1439. addCommandHandler("taniec16",function(plr,cmd)
  1440.     if (isPedInVehicle(plr)) then
  1441.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1442.         return
  1443.     end
  1444.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1445.     setPedAnimation ( plr, "DANCING", "dnce_M_a", -1, true, false )
  1446. end)
  1447.  
  1448. addCommandHandler("taniec17",function(plr,cmd)
  1449.     if (isPedInVehicle(plr)) then
  1450.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1451.         return
  1452.     end
  1453.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1454.     setPedAnimation ( plr, "GFUNK", "Dance_G10", -1, true, false )
  1455. end)
  1456.  
  1457. addCommandHandler("taniec18",function(plr,cmd)
  1458.     if (isPedInVehicle(plr)) then
  1459.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1460.         return
  1461.     end
  1462.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1463.     setPedAnimation ( plr, "GFUNK", "Dance_G11", -1, true, false )
  1464. end)
  1465.  
  1466. addCommandHandler("taniec19",function(plr,cmd)
  1467.     if (isPedInVehicle(plr)) then
  1468.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1469.         return
  1470.     end
  1471.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1472.     setPedAnimation ( plr, "GFUNK", "Dance_G12", -1, true, false )
  1473. end)
  1474.  
  1475. addCommandHandler("taniec20",function(plr,cmd)
  1476.     if (isPedInVehicle(plr)) then
  1477.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1478.         return
  1479.     end
  1480.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1481.     setPedAnimation ( plr, "RUNNINGMAN", "Dance_B1", -1, true, false )
  1482. end)
  1483.  
  1484. addCommandHandler("palisz",function(plr,cmd)
  1485.     if (isPedInVehicle(plr)) then
  1486.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1487.         return
  1488.     end
  1489.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1490.     setPedAnimation ( plr, "LOWRIDER", "M_smklean_loop", -1, true, false )
  1491. end)
  1492.  
  1493. addCommandHandler("lezysz",function(plr,cmd)
  1494.     if (isPedInVehicle(plr)) then
  1495.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1496.         return
  1497.     end
  1498.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1499.     setPedAnimation ( plr, "BEACH", "Lay_Bac_Loop", -1, true, false )
  1500. end)
  1501.  
  1502. addCommandHandler("lezysz2",function(plr,cmd)
  1503.     if (isPedInVehicle(plr)) then
  1504.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1505.         return
  1506.     end
  1507.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1508.     setPedAnimation ( plr, "CRACK", "crckidle2", -1, true, false )
  1509. end)
  1510.  
  1511. addCommandHandler("lezysz3",function(plr,cmd)
  1512.     if (isPedInVehicle(plr)) then
  1513.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1514.         return
  1515.     end
  1516.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1517.     setPedAnimation ( plr, "CRACK", "crckidle4", -1, true, false )
  1518. end)
  1519.  
  1520. addCommandHandler("lezysz4",function(plr,cmd)
  1521.     if (isPedInVehicle(plr)) then
  1522.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1523.         return
  1524.     end
  1525.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1526.     setPedAnimation ( plr, "BEACH", "ParkSit_W_loop", -1, false, false )
  1527. end)
  1528.  
  1529. addCommandHandler("lezysz5",function(plr,cmd)
  1530.     if (isPedInVehicle(plr)) then
  1531.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1532.         return
  1533.     end
  1534.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1535.     setPedAnimation ( plr, "BEACH", "SitnWait_loop_W", -1, true, false )
  1536. end)
  1537.  
  1538. addCommandHandler("siedzisz",function(plr,cmd)
  1539.     if (isPedInVehicle(plr)) then
  1540.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1541.         return
  1542.     end
  1543.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1544.     setPedAnimation ( plr, "BEACH", "ParkSit_M_loop", -1, true, false )
  1545. end)
  1546.  
  1547. addCommandHandler("siedzisz2",function(plr,cmd)
  1548.     if (isPedInVehicle(plr)) then
  1549.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1550.         return
  1551.     end
  1552.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1553.     setPedAnimation ( plr, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, true, false )
  1554. end)
  1555.  
  1556. addCommandHandler("siedzisz3",function(plr,cmd)
  1557.     if (isPedInVehicle(plr)) then
  1558.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1559.         return
  1560.     end
  1561.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1562.     setPedAnimation ( plr, "JST_BUISNESS", "girl_02", -1, false, false )
  1563. end)
  1564.  
  1565. addCommandHandler("siedzisz4",function(plr,cmd)
  1566.     if (isPedInVehicle(plr)) then
  1567.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1568.         return
  1569.     end
  1570.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1571.     setPedAnimation ( plr, "INT_HOUSE", "LOU_Loop", -1, false, false )
  1572. end)
  1573.  
  1574. addCommandHandler("klekasz",function(plr,cmd)
  1575.     if (isPedInVehicle(plr)) then
  1576.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1577.         return
  1578.     end
  1579.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1580.     setPedAnimation ( plr, "CAMERA", "camstnd_to_camcrch", -1, false, false )
  1581. end)
  1582.  
  1583. addCommandHandler("klekasz2",function(plr,cmd)
  1584.     if (isPedInVehicle(plr)) then
  1585.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1586.         return
  1587.     end
  1588.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1589.     setPedAnimation ( plr, "COP_AMBIENT", "Copbrowse_nod", -1, true, false )
  1590. end)
  1591.  
  1592. addCommandHandler("czekasz",function(plr,cmd)
  1593.     if (isPedInVehicle(plr)) then
  1594.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1595.         return
  1596.     end
  1597.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1598.     setPedAnimation ( plr, "COP_AMBIENT", "Coplook_loop", -1, true, false )
  1599. end)
  1600.  
  1601. addCommandHandler("akrobata",function(plr,cmd)
  1602.     if (isPedInVehicle(plr)) then
  1603.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1604.         return
  1605.     end
  1606.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1607.     setPedAnimation ( plr, "DAM_JUMP", "DAM_Dive_Loop", -1, false, false )
  1608. end)
  1609.  
  1610. addCommandHandler("msza",function(plr,cmd)
  1611.     if (isPedInVehicle(plr)) then
  1612.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1613.         return
  1614.     end
  1615.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1616.     setPedAnimation ( plr, "DEALER", "DEALER_IDLE", -1, true, false )
  1617. end)
  1618.  
  1619. addCommandHandler("msza2",function(plr,cmd)
  1620.     if (isPedInVehicle(plr)) then
  1621.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1622.         return
  1623.     end
  1624.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1625.     setPedAnimation ( plr, "GRAVEYARD", "mrnM_loop", -1, false, false )
  1626. end)
  1627.  
  1628. addCommandHandler("znakkrzyza",function(plr,cmd)
  1629.     if (isPedInVehicle(plr)) then
  1630.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1631.         return
  1632.     end
  1633.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1634.     setPedAnimation ( plr, "GANGS", "hndshkcb", -1, true, false )
  1635. end)
  1636.  
  1637. addCommandHandler("rzygasz",function(plr,cmd)
  1638.     if (isPedInVehicle(plr)) then
  1639.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1640.         return
  1641.     end
  1642.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1643.     setPedAnimation ( plr, "FOOD", "EAT_Vomit_P", -1, true, false )
  1644. end)
  1645.  
  1646. addCommandHandler("jesz",function(plr,cmd)
  1647.     if (isPedInVehicle(plr)) then
  1648.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1649.         return
  1650.     end
  1651.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1652.     setPedAnimation ( plr, "FOOD", "EAT_Burger", -1, true, false )
  1653. end)
  1654.  
  1655. addCommandHandler("cpun1",function(plr,cmd)
  1656.     if (isPedInVehicle(plr)) then
  1657.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1658.         return
  1659.     end
  1660.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1661.     setPedAnimation ( plr, "GANGS", "drnkbr_prtl", -1, true, false )
  1662. end)
  1663.  
  1664. addCommandHandler("cpun2",function(plr,cmd)
  1665.     if (isPedInVehicle(plr)) then
  1666.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1667.         return
  1668.     end
  1669.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1670.     setPedAnimation ( plr, "GANGS", "smkcig_prtl", -1, true, false )
  1671. end)
  1672.  
  1673. addCommandHandler("cpun3",function(plr,cmd)
  1674.     if (isPedInVehicle(plr)) then
  1675.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1676.         return
  1677.     end
  1678.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1679.     setPedAnimation ( plr, "CRACK", "Bbalbat_Idle_01", -1, true, false )
  1680. end)
  1681.  
  1682. addCommandHandler("cpun4",function(plr,cmd)
  1683.     if (isPedInVehicle(plr)) then
  1684.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1685.         return
  1686.     end
  1687.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1688.     setPedAnimation ( plr, "CRACK", "Bbalbat_Idle_02", -1, true, false )
  1689. end)
  1690.  
  1691. addCommandHandler("witasz",function(plr,cmd)
  1692.     if (isPedInVehicle(plr)) then
  1693.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1694.         return
  1695.     end
  1696.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1697.     setPedAnimation ( plr, "GANGS", "hndshkba", -1, true, false )
  1698. end)
  1699.  
  1700. addCommandHandler("rozmawiasz",function(plr,cmd)
  1701.     if (isPedInVehicle(plr)) then
  1702.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1703.         return
  1704.     end
  1705.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1706.     setPedAnimation ( plr, "GANGS", "prtial_gngtlkH", -1, true, false )
  1707. end)
  1708.  
  1709. addCommandHandler("rozmawiasz2",function(plr,cmd)
  1710.     if (isPedInVehicle(plr)) then
  1711.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1712.         return
  1713.     end
  1714.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1715.     setPedAnimation ( plr, "GANGS", "prtial_gngtlkG", -1, true, false )
  1716. end)
  1717.  
  1718. addCommandHandler("rozmawiasz3",function(plr,cmd)
  1719.     if (isPedInVehicle(plr)) then
  1720.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1721.         return
  1722.     end
  1723.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1724.     setPedAnimation ( plr, "GANGS", "prtial_gngtlkD", -1, true, false )
  1725. end)
  1726.  
  1727. addCommandHandler("nerwowy",function(plr,cmd)
  1728.     if (isPedInVehicle(plr)) then
  1729.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1730.         return
  1731.     end
  1732.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1733.     setPedAnimation ( plr, "GHANDS", "gsign2", -1, true, false )
  1734. end)
  1735.  
  1736. addCommandHandler("piszesz",function(plr,cmd)
  1737.     if (isPedInVehicle(plr)) then
  1738.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1739.         return
  1740.     end
  1741.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1742.     setPedAnimation ( plr, "INT_OFFICE", "OFF_Sit_Type_Loop", -1, true, false )
  1743. end)
  1744.  
  1745. addCommandHandler("gay",function(plr,cmd)
  1746.     if (isPedInVehicle(plr)) then
  1747.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1748.         return
  1749.     end
  1750.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1751.     setPedAnimation ( plr, "ped", "WOMAN_walksexy", -1, true, true )
  1752. end)
  1753.  
  1754. addCommandHandler("gay2",function(plr,cmd)
  1755.     if (isPedInVehicle(plr)) then
  1756.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1757.         return
  1758.     end
  1759.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1760.     setPedAnimation ( plr, "ped", "WOMAN_walkpro", -1, true, true )
  1761. end)
  1762.  
  1763. addCommandHandler("gay3",function(plr,cmd)
  1764.     if (isPedInVehicle(plr)) then
  1765.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1766.         return
  1767.     end
  1768.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1769.     setPedAnimation ( plr, "ped", "WOMAN_runsexy", -1, true, true )
  1770. end)
  1771.  
  1772. addCommandHandler("wreczasz",function(plr,cmd)
  1773.     if (isPedInVehicle(plr)) then
  1774.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1775.         return
  1776.     end
  1777.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1778.     setPedAnimation ( plr, "KISSING", "gift_give", -1, false, false )
  1779. end)
  1780.  
  1781. addCommandHandler("machasz",function(plr,cmd)
  1782.     if (isPedInVehicle(plr)) then
  1783.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1784.         return
  1785.     end
  1786.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1787.     setPedAnimation ( plr, "KISSING", "gfwave2", -1, true, false )
  1788. end)
  1789.  
  1790. addCommandHandler("walisz",function(plr,cmd)
  1791.     if (isPedInVehicle(plr)) then
  1792.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1793.         return
  1794.     end
  1795.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1796.     setPedAnimation ( plr, "PAULNMAC", "wank_loop", -1, true, false )
  1797. end)
  1798.  
  1799. addCommandHandler("walisz2",function(plr,cmd)
  1800.     if (isPedInVehicle(plr)) then
  1801.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1802.         return
  1803.     end
  1804.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1805.     setPedAnimation ( plr, "MISC", "Scratchballs_01", -1, true, false )
  1806. end)
  1807.  
  1808. addCommandHandler("sikasz",function(plr,cmd)
  1809.     if (isPedInVehicle(plr)) then
  1810.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1811.         return
  1812.     end
  1813.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1814.     setPedAnimation ( plr, "PAULNMAC", "Piss_loop", -1, true, false )
  1815. end)
  1816.  
  1817. addCommandHandler("pijany",function(plr,cmd)
  1818.     if (isPedInVehicle(plr)) then
  1819.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1820.         return
  1821.     end
  1822.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1823.     setPedAnimation ( plr, "ped", "WALK_drunk", -1, true, true )
  1824. end)
  1825.  
  1826. addCommandHandler("pijany2",function(plr,cmd)
  1827.     if (isPedInVehicle(plr)) then
  1828.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1829.         return
  1830.     end
  1831.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1832.     setPedAnimation ( plr, "PAULNMAC", "PnM_Loop_A", -1, true, false )
  1833. end)
  1834.  
  1835. addCommandHandler("pijany3",function(plr,cmd)
  1836.     if (isPedInVehicle(plr)) then
  1837.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1838.         return
  1839.     end
  1840.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1841.     setPedAnimation ( plr, "PAULNMAC", "PnM_Argue2_A", -1, true, false )
  1842. end)
  1843.  
  1844. addCommandHandler("rapujesz",function(plr,cmd)
  1845.     if (isPedInVehicle(plr)) then
  1846.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1847.         return
  1848.     end
  1849.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1850.     setPedAnimation ( plr, "SCRATCHING", "scmid_l", -1, true, false )
  1851. end)
  1852.  
  1853. addCommandHandler("rapujesz2",function(plr,cmd)
  1854.     if (isPedInVehicle(plr)) then
  1855.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1856.         return
  1857.     end
  1858.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1859.     setPedAnimation ( plr, "SCRATCHING", "scdldlp", -1, true, false )
  1860. end)
  1861.  
  1862. addCommandHandler("rapujesz3",function(plr,cmd)
  1863.     if (isPedInVehicle(plr)) then
  1864.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1865.         return
  1866.     end
  1867.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1868.     setPedAnimation ( plr, "Flowers", "Flower_Hit", -1, true, false )
  1869. end)
  1870.  
  1871. addCommandHandler("rapujesz4",function(plr,cmd)
  1872.     if (isPedInVehicle(plr)) then
  1873.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1874.         return
  1875.     end
  1876.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1877.     setPedAnimation ( plr, "RAPPING", "RAP_C_Loop", -1, true, false )
  1878. end)
  1879.  
  1880. addCommandHandler("rapujesz5",function(plr,cmd)
  1881.     if (isPedInVehicle(plr)) then
  1882.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1883.         return
  1884.     end
  1885.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1886.     setPedAnimation ( plr, "RAPPING", "RAP_B_Loop", -1, true, false )
  1887. end)
  1888.  
  1889. addCommandHandler("rapujesz6",function(plr,cmd)
  1890.     if (isPedInVehicle(plr)) then
  1891.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1892.         return
  1893.     end
  1894.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1895.     setPedAnimation ( plr, "SCRATCHING", "scdrdlp", -1, true, false )
  1896. end)
  1897.  
  1898. addCommandHandler("rapujesz7",function(plr,cmd)
  1899.     if (isPedInVehicle(plr)) then
  1900.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1901.         return
  1902.     end
  1903.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1904.     setPedAnimation ( plr, "SCRATCHING", "scdrulp", -1, true, false )
  1905. end)
  1906.  
  1907. addCommandHandler("rapujesz8",function(plr,cmd)
  1908.     if (isPedInVehicle(plr)) then
  1909.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1910.         return
  1911.     end
  1912.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1913.     setPedAnimation ( plr, "RAPPING", "RAP_A_Loop", -1, true, false )
  1914. end)
  1915. addCommandHandler("fsdfdsfdsfsd",function(plr,cmd)
  1916.     if (isPedInVehicle(plr)) then
  1917.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1918.         return
  1919.     end
  1920.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1921.     setPedAnimation ( plr, "SKATE", "skate_run", -1, true, true )
  1922. end)
  1923.  
  1924. addCommandHandler("dsgdsfdsf",function(plr,cmd)
  1925.     if (isPedInVehicle(plr)) then
  1926.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1927.         return
  1928.     end
  1929.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1930.     setPedAnimation ( plr, "SKATE", "skate_sprint", -1, true, true )
  1931. end)
  1932. addCommandHandler("umierasz",function(plr,cmd)
  1933.     if (isPedInVehicle(plr)) then
  1934.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1935.         return
  1936.     end
  1937.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1938.     setPedAnimation ( plr, "ped", "FLOOR_hit_f", -1, false, false )
  1939. end)
  1940.  
  1941. addCommandHandler("umierasz2",function(plr,cmd)
  1942.     if (isPedInVehicle(plr)) then
  1943.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1944.         return
  1945.     end
  1946.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1947.     setPedAnimation ( plr, "ped", "FLOOR_hit", -1, false, false )
  1948. end)
  1949.  
  1950. addCommandHandler("bijesz",function(plr,cmd)
  1951.     if (isPedInVehicle(plr)) then
  1952.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1953.         return
  1954.     end
  1955.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1956.     setPedAnimation ( plr, "BASEBALL", "Bat_M", -1, true, false )
  1957. end)
  1958.  
  1959. addCommandHandler("bijesz2",function(plr,cmd)
  1960.     if (isPedInVehicle(plr)) then
  1961.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1962.         return
  1963.     end
  1964.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1965.     setPedAnimation ( plr, "RIOT", "RIOT_PUNCHES", -1, true, false )
  1966. end)
  1967.  
  1968. addCommandHandler("bijesz3",function(plr,cmd)
  1969.     if (isPedInVehicle(plr)) then
  1970.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1971.         return
  1972.     end
  1973.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1974.     setPedAnimation ( plr, "FIGHT_B", "FightB_M", -1, true, false )
  1975. end)
  1976.  
  1977. addCommandHandler("bijesz4",function(plr,cmd)
  1978.     if (isPedInVehicle(plr)) then
  1979.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1980.         return
  1981.     end
  1982.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1983.     setPedAnimation ( plr, "MISC", "bitchslap", -1, true, false )
  1984. end)
  1985.  
  1986. addCommandHandler("bijesz5",function(plr,cmd)
  1987.     if (isPedInVehicle(plr)) then
  1988.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1989.         return
  1990.     end
  1991.     bindKey(plr, "ENTER", "down", stopAnimacja)
  1992.     setPedAnimation ( plr, "ped", "BIKE_elbowR", -1, true, false )
  1993. end)
  1994.  
  1995. addCommandHandler("wolasz",function(plr,cmd)
  1996.     if (isPedInVehicle(plr)) then
  1997.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  1998.         return
  1999.     end
  2000.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2001.     setPedAnimation ( plr, "RYDER", "RYD_Beckon_01", -1, true, false )
  2002. end)
  2003.  
  2004. addCommandHandler("wolasz2",function(plr,cmd)
  2005.     if (isPedInVehicle(plr)) then
  2006.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2007.         return
  2008.     end
  2009.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2010.     setPedAnimation ( plr, "POLICE", "CopTraf_Come", -1, true, false )
  2011. end)
  2012.  
  2013. addCommandHandler("wolasz3",function(plr,cmd)
  2014.     if (isPedInVehicle(plr)) then
  2015.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2016.         return
  2017.     end
  2018.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2019.     setPedAnimation ( plr, "RYDER", "RYD_Beckon_02", -1, true, false )
  2020. end)
  2021.  
  2022. addCommandHandler("zatrzymujesz",function(plr,cmd)
  2023.     if (isPedInVehicle(plr)) then
  2024.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2025.         return
  2026.     end
  2027.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2028.     setPedAnimation ( plr, "POLICE", "CopTraf_Stop", -1, true, false )
  2029. end)
  2030.  
  2031. addCommandHandler("wskazujesz",function(plr,cmd)
  2032.     if (isPedInVehicle(plr)) then
  2033.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2034.         return
  2035.     end
  2036.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2037.     setPedAnimation ( plr, "SHOP", "ROB_Loop", -1, true, false )
  2038. end)
  2039.  
  2040. addCommandHandler("rozgladasz",function(plr,cmd)
  2041.     if (isPedInVehicle(plr)) then
  2042.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2043.         return
  2044.     end
  2045.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2046.     setPedAnimation ( plr, "ON_LOOKERS", "lkaround_loop", -1, true, false )
  2047. end)
  2048.  
  2049. addCommandHandler("krzyczysz",function(plr,cmd)
  2050.     if (isPedInVehicle(plr)) then
  2051.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2052.         return
  2053.     end
  2054.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2055.     setPedAnimation ( plr, "ON_LOOKERS", "shout_in", -1, true, false )
  2056. end)
  2057.  
  2058. addCommandHandler("fuckyou",function(plr,cmd)
  2059.     if (isPedInVehicle(plr)) then
  2060.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2061.         return
  2062.     end
  2063.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2064.     setPedAnimation ( plr, "RIOT", "RIOT_FUKU", -1, true, false )
  2065. end)
  2066.  
  2067. addCommandHandler("tchorz",function(plr,cmd)
  2068.     if (isPedInVehicle(plr)) then
  2069.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2070.         return
  2071.     end
  2072.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2073.     setPedAnimation ( plr, "ped", "cower", -1, false, false )
  2074. end)
  2075.  
  2076. addCommandHandler("kopiesz",function(plr,cmd)
  2077.     if (isPedInVehicle(plr)) then
  2078.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2079.         return
  2080.     end
  2081.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2082.     setPedAnimation ( plr, "GANGS", "shake_carK", -1, true, false )
  2083. end)
  2084.  
  2085. addCommandHandler("kopiesz2",function(plr,cmd)
  2086.     if (isPedInVehicle(plr)) then
  2087.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2088.         return
  2089.     end
  2090.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2091.     setPedAnimation ( plr, "FIGHT_D", "FightD_G", -1, true, false )
  2092. end)
  2093.  
  2094. addCommandHandler("kopiesz3",function(plr,cmd)
  2095.     if (isPedInVehicle(plr)) then
  2096.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2097.         return
  2098.     end
  2099.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2100.     setPedAnimation ( plr, "FIGHT_C", "FightC_3", -1, false )
  2101. end)
  2102.  
  2103. addCommandHandler("wywazasz",function(plr,cmd)
  2104.     if (isPedInVehicle(plr)) then
  2105.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2106.         return
  2107.     end
  2108.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2109.     setPedAnimation ( plr, "GANGS", "shake_carSH", -1, true, false )
  2110. end)
  2111.  
  2112. addCommandHandler("wywazasz2",function(plr,cmd)
  2113.     if (isPedInVehicle(plr)) then
  2114.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2115.         return
  2116.     end
  2117.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2118.     setPedAnimation ( plr, "POLICE", "Door_Kick", -1, true, false )
  2119. end)
  2120.  
  2121. addCommandHandler("kieszen",function(plr,cmd)
  2122.     if (isPedInVehicle(plr)) then
  2123.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2124.         return
  2125.     end
  2126.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2127.     setPedAnimation ( plr, "GANGS", "leanIDLE", -1, true, false )
  2128. end)
  2129.  
  2130. addCommandHandler("celujesz",function(plr,cmd)
  2131.     if (isPedInVehicle(plr)) then
  2132.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2133.         return
  2134.     end
  2135.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2136.     setPedAnimation ( plr, "ped", "ARRESTgun", -1, false, false )
  2137. end)
  2138.  
  2139. addCommandHandler("kichasz",function(plr,cmd)
  2140.     if (isPedInVehicle(plr)) then
  2141.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2142.         return
  2143.     end
  2144.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2145.     setPedAnimation ( plr, "VENDING", "vend_eat1_P", -1, true, false )
  2146. end)
  2147.  
  2148. addCommandHandler("pocalunek",function(plr,cmd)
  2149.     if (isPedInVehicle(plr)) then
  2150.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2151.         return
  2152.     end
  2153.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2154.     setPedAnimation ( plr, "BD_FIRE", "Grlfrd_Kiss_03", -1, true, false )
  2155. end)
  2156.  
  2157. addCommandHandler("taxi",function(plr,cmd)
  2158.     if (isPedInVehicle(plr)) then
  2159.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2160.         return
  2161.     end
  2162.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2163.     setPedAnimation ( plr, "MISC", "Hiker_Pose", -1, false, false )
  2164. end)
  2165.  
  2166. addCommandHandler("taxi2",function(plr,cmd)
  2167.     if (isPedInVehicle(plr)) then
  2168.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2169.         return
  2170.     end
  2171.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2172.     setPedAnimation ( plr, "MISC", "Hiker_Pose_L", -1, false, false )
  2173. end)
  2174.  
  2175. addCommandHandler("noga",function(plr,cmd)
  2176.     if (isPedInVehicle(plr)) then
  2177.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2178.         return
  2179.     end
  2180.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2181.     setPedAnimation ( plr, "SHOP", "SHP_Jump_Glide", -1, false, false )
  2182. end)
  2183.  
  2184. addCommandHandler("pozegnanie",function(plr,cmd)
  2185.     if (isPedInVehicle(plr)) then
  2186.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2187.         return
  2188.     end
  2189.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2190.     setPedAnimation ( plr, "BD_FIRE", "BD_Panic_03", -1, true, false )
  2191. end)
  2192.  
  2193. addCommandHandler("cud",function(plr,cmd)
  2194.     if (isPedInVehicle(plr)) then
  2195.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2196.         return
  2197.     end
  2198.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2199.     setPedAnimation ( plr, "CARRY", "crry_prtial", -1, true, false )
  2200. end)
  2201.  
  2202. addCommandHandler("cud2",function(plr,cmd)
  2203.     if (isPedInVehicle(plr)) then
  2204.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2205.         return
  2206.     end
  2207.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2208.     setPedAnimation ( plr, "ON_LOOKERS", "Pointup_loop", -1, false, false )
  2209. end)
  2210.  
  2211. addCommandHandler("delirium",function(plr,cmd)
  2212.     if (isPedInVehicle(plr)) then
  2213.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2214.         return
  2215.     end
  2216.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2217.     setPedAnimation ( plr, "CRACK", "crckdeth1", -1, false )
  2218. end)
  2219.  
  2220. addCommandHandler("delirium2",function(plr,cmd)
  2221.     if (isPedInVehicle(plr)) then
  2222.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2223.         return
  2224.     end
  2225.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2226.     setPedAnimation ( plr, "CRACK", "crckdeth2", -1, true, false )
  2227. end)
  2228.  
  2229. addCommandHandler("delirium3",function(plr,cmd)
  2230.     if (isPedInVehicle(plr)) then
  2231.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2232.         return
  2233.     end
  2234.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2235.     setPedAnimation ( plr, "CRACK", "crckidle3", -1, true, false )
  2236. end)
  2237.  
  2238. addCommandHandler("delirium4",function(plr,cmd)
  2239.     if (isPedInVehicle(plr)) then
  2240.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2241.         return
  2242.     end
  2243.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2244.     setPedAnimation ( plr, "CHAINSAW", "csaw_part", -1, true, false )
  2245. end)
  2246.  
  2247. addCommandHandler("delirium5",function(plr,cmd)
  2248.     if (isPedInVehicle(plr)) then
  2249.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2250.         return
  2251.     end
  2252.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2253.     setPedAnimation ( plr, "CASINO", "Roulette_loop", -1, true, false )
  2254. end)
  2255.  
  2256. addCommandHandler("naprawiasz",function(plr,cmd)
  2257.     if (isPedInVehicle(plr)) then
  2258.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2259.         return
  2260.     end
  2261.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2262.     setPedAnimation ( plr, "CAR", "flag_drop", -1, true, false )
  2263. end)
  2264.  
  2265. addCommandHandler("naprawiasz2",function(plr,cmd)
  2266.     if (isPedInVehicle(plr)) then
  2267.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2268.         return
  2269.     end
  2270.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2271.     setPedAnimation ( plr, "CAR", "Fixn_Car_Loop", -1, true, false )
  2272. end)
  2273.  
  2274. addCommandHandler("placzesz",function(plr,cmd)
  2275.     if (isPedInVehicle(plr)) then
  2276.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2277.         return
  2278.     end
  2279.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2280.     setPedAnimation ( plr, "GRAVEYARD", "mrnF_loop", -1, true, false )
  2281. end)
  2282.  
  2283. addCommandHandler("kibicujesz",function(plr,cmd)
  2284.     if (isPedInVehicle(plr)) then
  2285.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2286.         return
  2287.     end
  2288.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2289.     setPedAnimation ( plr, "RIOT", "RIOT_ANGRY_B", -1, true, false )
  2290. end)
  2291.  
  2292. addCommandHandler("kibicujesz2",function(plr,cmd)
  2293.     if (isPedInVehicle(plr)) then
  2294.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2295.         return
  2296.     end
  2297.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2298.     setPedAnimation ( plr, "ON_LOOKERS", "wave_loop", -1, true, false )
  2299. end)
  2300.  
  2301. addCommandHandler("bioenergoterapeuta",function(plr,cmd)
  2302.     if (isPedInVehicle(plr)) then
  2303.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2304.         return
  2305.     end
  2306.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2307.     setPedAnimation ( plr, "WUZI", "Wuzi_Greet_Wuzi", -1, true, false )
  2308. end)
  2309.  
  2310. addCommandHandler("meteorolog",function(plr,cmd)
  2311.     if (isPedInVehicle(plr)) then
  2312.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2313.         return
  2314.     end
  2315.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2316.     setPedAnimation ( plr, "WUZI", "Wuzi_grnd_chk", -1, true, false )
  2317. end)
  2318.  
  2319. addCommandHandler("klepiesz",function(plr,cmd)
  2320.     if (isPedInVehicle(plr)) then
  2321.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2322.         return
  2323.     end
  2324.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2325.     setPedAnimation ( plr, "SWEET", "sweet_ass_slap", -1, true, false )
  2326. end)
  2327.  
  2328. addCommandHandler("cierpisz",function(plr,cmd)
  2329.     if (isPedInVehicle(plr)) then
  2330.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2331.         return
  2332.     end
  2333.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2334.     setPedAnimation ( plr, "SWEET", "Sweet_injuredloop", -1, true, false )
  2335. end)
  2336.  
  2337. addCommandHandler("starzec",function(plr,cmd)
  2338.     if (isPedInVehicle(plr)) then
  2339.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2340.         return
  2341.     end
  2342.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2343.     setPedAnimation ( plr, "ped", "WALK_shuffle", -1, true, true )
  2344. end)
  2345.  
  2346. addCommandHandler("starzec2",function(plr,cmd)
  2347.     if (isPedInVehicle(plr)) then
  2348.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2349.         return
  2350.     end
  2351.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2352.     setPedAnimation ( plr, "ped", "WOMAN_walkfatold", -1, true, true )
  2353. end)
  2354.  
  2355. addCommandHandler("starzec3",function(plr,cmd)
  2356.     if (isPedInVehicle(plr)) then
  2357.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2358.         return
  2359.     end
  2360.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2361.     setPedAnimation ( plr, "ped", "WOMAN_walkshop", -1, true, true )
  2362. end)
  2363.  
  2364. addCommandHandler("reanimujesz",function(plr,cmd)
  2365.     if (isPedInVehicle(plr)) then
  2366.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2367.         return
  2368.     end
  2369.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2370.     setPedAnimation ( plr, "MEDIC", "CPR", -1, false, false )
  2371. end)
  2372.  
  2373. addCommandHandler("myjesz",function(plr,cmd)
  2374.     if (isPedInVehicle(plr)) then
  2375.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2376.         return
  2377.     end
  2378.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2379.     setPedAnimation ( plr, "CASINO", "dealone", -1, true, false )
  2380. end)
  2381.  
  2382. addCommandHandler("zadowolony",function(plr,cmd)
  2383.     if (isPedInVehicle(plr)) then
  2384.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2385.         return
  2386.     end
  2387.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2388.     setPedAnimation ( plr, "CASINO", "manwind", -1, true, false )
  2389. end)
  2390.  
  2391. addCommandHandler("zadowolony2",function(plr,cmd)
  2392.     if (isPedInVehicle(plr)) then
  2393.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2394.         return
  2395.     end
  2396.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2397.     setPedAnimation ( plr, "CASINO", "manwinb", -1, true, false )
  2398. end)
  2399.  
  2400. addCommandHandler("zalamany",function(plr,cmd)
  2401.     if (isPedInVehicle(plr)) then
  2402.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2403.         return
  2404.     end
  2405.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2406.     setPedAnimation ( plr, "CASINO", "Roulette_lose", -1, true, false )
  2407. end)
  2408.  
  2409. addCommandHandler("zmeczony",function(plr,cmd)
  2410.     if (isPedInVehicle(plr)) then
  2411.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2412.         return
  2413.     end
  2414.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2415.     setPedAnimation ( plr, "FAT", "IDLE_tired", -1, true, false )
  2416. end)
  2417.  
  2418. addCommandHandler("ochnie",function(plr,cmd)
  2419.     if (isPedInVehicle(plr)) then
  2420.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2421.         return
  2422.     end
  2423.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2424.     setPedAnimation ( plr, "MISC", "plyr_shkhead", -1, true, false )
  2425. end)
  2426.  
  2427. addCommandHandler("cwaniak1",function(plr,cmd)
  2428.     if (isPedInVehicle(plr)) then
  2429.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2430.         return
  2431.     end
  2432.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2433.     setPedAnimation ( plr, "GHANDS", "gsign1", -1, true, false )
  2434. end)
  2435.  
  2436. addCommandHandler("cwaniak2",function(plr,cmd)
  2437.     if (isPedInVehicle(plr)) then
  2438.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2439.         return
  2440.     end
  2441.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2442.     setPedAnimation ( plr, "GHANDS", "gsign1LH", -1, true, false )
  2443. end)
  2444.  
  2445. addCommandHandler("cwaniak3",function(plr,cmd)
  2446.     if (isPedInVehicle(plr)) then
  2447.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2448.         return
  2449.     end
  2450.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2451.     setPedAnimation ( plr, "GHANDS", "gsign2", -1, true, false )
  2452. end)
  2453.  
  2454. addCommandHandler("cwaniak4",function(plr,cmd)
  2455.     if (isPedInVehicle(plr)) then
  2456.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2457.         return
  2458.     end
  2459.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2460.     setPedAnimation ( plr, "GHANDS", "gsign2LH", -1, true, false )
  2461. end)
  2462.  
  2463. addCommandHandler("cwaniak5",function(plr,cmd)
  2464.     if (isPedInVehicle(plr)) then
  2465.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2466.         return
  2467.     end
  2468.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2469.     setPedAnimation ( plr, "GHANDS", "gsign3", -1, true, false )
  2470. end)
  2471.  
  2472. addCommandHandler("cwaniak6",function(plr,cmd)
  2473.     if (isPedInVehicle(plr)) then
  2474.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2475.         return
  2476.     end
  2477.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2478.     setPedAnimation ( plr, "GHANDS", "gsign3LH", -1, true, false )
  2479. end)
  2480.  
  2481. addCommandHandler("cwaniak7",function(plr,cmd)
  2482.     if (isPedInVehicle(plr)) then
  2483.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2484.         return
  2485.     end
  2486.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2487.     setPedAnimation ( plr, "GHANDS", "gsign4", -1, true, false )
  2488. end)
  2489.  
  2490. addCommandHandler("cwaniak8",function(plr,cmd)
  2491.     if (isPedInVehicle(plr)) then
  2492.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2493.         return
  2494.     end
  2495.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2496.     setPedAnimation ( plr, "GHANDS", "gsign4LH", -1, true, false )
  2497. end)
  2498.  
  2499.  
  2500. addCommandHandler("cwaniak9",function(plr,cmd)
  2501.     if (isPedInVehicle(plr)) then
  2502.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2503.         return
  2504.     end
  2505.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2506.     setPedAnimation ( plr, "GHANDS", "gsign5", -1, true, false )
  2507. end)
  2508.  
  2509. addCommandHandler("cwaniak10",function(plr,cmd)
  2510.     if (isPedInVehicle(plr)) then
  2511.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2512.         return
  2513.     end
  2514.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2515.     setPedAnimation ( plr, "GHANDS", "gsign5LH", -1, true, false )
  2516. end)
  2517.  
  2518. addCommandHandler("pijak",function(plr,cmd)
  2519.     if (isPedInVehicle(plr)) then
  2520.         outputChatBox("* Najpierw wysiądź z pojazdu !", plr)
  2521.         return
  2522.     end
  2523.     bindKey(plr, "ENTER", "down", stopAnimacja)
  2524.     setPedAnimation ( plr, "CRACK", "crckidle4", -1, true, false )
  2525. end)
  2526.  
  2527. addCommandHandler("p", function(plr,cmd,name)
  2528.         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
  2529.                         if not name then return end
  2530.                         if veh then
  2531.                                 if getElementData(veh,"vehicle:spawn") then
  2532.                                         outputChatBox("#bf0101(✖) #FFFFFFNie możesz zmienić Sobie pojazdu prywatnego.", plr, 255,255,255, true)
  2533.                                         return
  2534.                                 end
  2535.                         end
  2536.  
  2537.                         if tonumber(name) ~= nil then
  2538.                                 outputChatBox("#ff6600(ⓘ) #FFFFFFMusisz wpisać nazwę, nie model.", plr, 255,255,255, true)
  2539.                                 return
  2540.                         end
  2541.  
  2542.         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
  2543.                                 outputChatBox("#bf0101(✖) #FFFFFFBrak dostępu do zakazanego modelu.", plr, 255, 255,255, true )
  2544.                                 return
  2545.                         end
  2546.  
  2547.                         local dim = getElementDimension(plr)
  2548.  
  2549.                         local x,y,z = getElementPosition(plr)
  2550.                         local rx,ry,rz = getElementRotation(plr)
  2551.                         local vehicle = createVehicle(getVehicleModelFromName(name), x, y, z, rx, ry, rz)
  2552.                         local model = getVehicleModelFromName(name)
  2553.  
  2554.                         setElementInterior(vehicle,getElementInterior(plr))
  2555.                         setElementDimension(vehicle,getElementDimension(plr))
  2556.                         setElementData(vehicle, "vehicle:fuel", 100)
  2557.                         outputChatBox("#06B200(✔) #FFFFFFZrespiłeś(aś) pojazd: #ff6600"..name, plr, 255,255,255, true)
  2558.         end
  2559. end)
  2560.  
  2561. addCommandHandler("dp", function(plr,cmd)
  2562.         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
  2563.                         local veh=getPedOccupiedVehicle(plr)
  2564.                         if not veh then
  2565.                                 outputChatBox("#ff6600(ⓘ) #FFFFFFMusisz siedzieć w pojeździe.", plr, 255,255,255, true)
  2566.                                 return
  2567.                         end
  2568.                         if getElementData(veh,"vehicle:spawn") then
  2569.                                 outputChatBox("#ff6600(ⓘ) #FFFFFFNie możesz usunąć tego pojazdu.", plr,255,255,255, true)
  2570.                                 return
  2571.                         end
  2572.                         destroyElement(veh)
  2573.                         outputChatBox("#06B200(✔) #FFFFFFUsunąłeś(aś) pojazd", plr,255,255,255, true)
  2574.                 --end
  2575.         else
  2576.                 outputChatBox("#bf0101(✖) #FFFFFFBrak uprawnień", plr, 255,255,255, true)
  2577.         end
  2578. end)
  2579.  
  2580. local stopChat = false
  2581. --[[
  2582. addCommandHandler("v", function(plr, cmd, ...)
  2583.   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
  2584.  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
  2585.  if not ... then
  2586.   local x = getElementData(plr,"player:pchatoff")
  2587.   if x == false then
  2588.   outputChatBox("#007aff(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium/premium+",plr, 255, 255, 255, true)
  2589.   setElementData(plr,"player:pchatoff",true)
  2590.   end
  2591.   if x == true then
  2592.   outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium/premium+",plr, 255, 255, 255, true)
  2593.   setElementData(plr,"player:pchatoff",false)
  2594.   end
  2595.   return end
  2596.   if stopChat then
  2597.         cancelEvent()
  2598.         outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
  2599.   return end
  2600.   if getElementData(plr,"player:pchatoff") then
  2601.         cancelEvent()
  2602.         outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium/premium+.', plr, 255, 255, 255, true)
  2603.         return end
  2604.   if ... then
  2605.     local message = table.concat ( { ... }, " " )
  2606.     local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
  2607.     for _,p in pairs(getElementsByType("player")) do
  2608.         local premkas = getElementData(plr, "player:premium")
  2609.         if premkas then premkas = "#ffcc00(P)#FFFFFF" else premkas = "" end
  2610.         local spremkas = getElementData(plr, "player:premiumplus")
  2611.         if spremkas then spremkas = "#FFD700(P+)#FFFFFF" else spremkas = "" end
  2612.  if getElementData(p,"player:premium") or getElementData(p,"player:premiumplus") and not getElementData(p,"player:pchatoff") then
  2613.         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)
  2614.  end
  2615.     end
  2616.         local desc = "(Czat Premium/Premium+) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
  2617.         triggerEvent("admin:addText", resourceRoot, RGBToHex(255,204,0)..desc..RGBToHex(255,255,255),math.random(0,99))
  2618.         triggerEvent("admin:logs", root, desc)
  2619.         outputServerLog(desc)
  2620.         end
  2621. end)
  2622. ]]
  2623. addCommandHandler("v", function(plr, cmd, ...)
  2624.  if getElementData(plr, "player:premium") == false then outputChatBox("* Musisz posiadać status premium by pisać na czacie globalnym!",plr,78,255,0) return end
  2625.  if not ... then
  2626.   local x = getElementData(plr,"player:pchatoff")
  2627.   if x == false then
  2628.   outputChatBox("#ff6600(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium",plr, 255, 255, 255, true)
  2629.   setElementData(plr,"player:pchatoff",true)
  2630.   end
  2631.   if x == true then
  2632.   outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium",plr, 255, 255, 255, true)
  2633.   setElementData(plr,"player:pchatoff",false)
  2634.   end
  2635.   return end
  2636.   if stopChat then
  2637.         cancelEvent()
  2638.         outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
  2639.   return end
  2640.   if getElementData(plr,"player:mute") then
  2641.         cancelEvent()
  2642.         outputChatBox('#ff6600(ⓘ) #FFFFFFMasz aktywne wyciszenie!', plr, 255, 255, 255, true)
  2643.         return end
  2644.   if getElementData(plr,"player:pchatoff") then
  2645.         cancelEvent()
  2646.         outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium.', plr, 255, 255, 255, true)
  2647.         return end
  2648.   if ... then
  2649.     local message = table.concat ( { ... }, " " )
  2650.     local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
  2651.     for _,p in pairs(getElementsByType("player")) do
  2652.  if getElementData(p,"player:premium") and not getElementData(p,"player:pchatoff") then
  2653.     --outputChatBox("#FFFF00"..getElementData(plr,"id").."#C0FF00> #C0FF00"..name.."#C0FF00: #C0FF00"..message:gsub("#%x%x%x%x%x%x",""), p, 255, 255, 255, true)
  2654.         --outputChatBox("#FFFF00"..getElementData(plr,"id").." > "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
  2655.         outputChatBox("#ffcc00(Premium)> [#FFFFFF"..getElementData(plr,"id").."#ffcc00] "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
  2656.  end
  2657.     end
  2658.         local desc = "(Premium) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
  2659.         triggerEvent("admin:addText", resourceRoot, RGBToHex(255,204,0)..desc..RGBToHex(255,255,255),math.random(0,99))
  2660.         triggerEvent("admin:logs", root, desc)
  2661.         --triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
  2662.         outputServerLog(desc)
  2663.         end
  2664. end)
  2665.  
  2666. addCommandHandler("vv", function(plr, cmd, ...)
  2667.  if getElementData(plr, "player:premiumplus") == false then outputChatBox("* Musisz posiadać status premium + by pisać na czacie globalnym!",plr,78,255,0) return end
  2668.  if not ... then
  2669.   local x = getElementData(plr,"player:pchatplusoff")
  2670.   if x == false then
  2671.   outputChatBox("#ff6600(ⓘ) #FFFFFFWyłączyłeś(aś) chat premium +",plr, 255, 255, 255, true)
  2672.   setElementData(plr,"player:pchatplusoff",true)
  2673.   end
  2674.   if x == true then
  2675.   outputChatBox("#06B200(✔) #FFFFFFWłączyłeś(aś) chat premium +",plr, 255, 255, 255, true)
  2676.   setElementData(plr,"player:pchatplusoff",false)
  2677.   end
  2678.   return end
  2679.   if stopChat then
  2680.         cancelEvent()
  2681.         outputChatBox('#ff6600(ⓘ) #FFFFFFChat premium jest aktualnie wyłączony.', plr, 255, 255, 255, true)
  2682.   return end
  2683.   if getElementData(plr,"player:mute") then
  2684.         cancelEvent()
  2685.         outputChatBox('#ff6600(ⓘ) #FFFFFFMasz aktywne wyciszenie!', plr, 255, 255, 255, true)
  2686.         return end
  2687.   if getElementData(plr,"player:pchatplusoff") then
  2688.         cancelEvent()
  2689.         outputChatBox('#ff6600(ⓘ) #FFFFFFPosiadasz wyłączony chat premium +.', plr, 255, 255, 255, true)
  2690.         return end
  2691.   if ... then
  2692.     local message = table.concat ( { ... }, " " )
  2693.     local name = getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
  2694.     for _,p in pairs(getElementsByType("player")) do
  2695.  if getElementData(p,"player:premiumplus") and not getElementData(p,"player:pchatplusoff") then
  2696.     --outputChatBox("#FFFF00"..getElementData(plr,"id").."#C0FF00> #C0FF00"..name.."#C0FF00: #C0FF00"..message:gsub("#%x%x%x%x%x%x",""), p, 255, 255, 255, true)
  2697.         --outputChatBox("#FFFF00"..getElementData(plr,"id").." > "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
  2698.         outputChatBox("#FF8B00(Premium +)> [#FFFFFF"..getElementData(plr,"id").."#FF8B00] "..name.."#ffffff: "..message:gsub("#%x%x%x%x%x%x","").."", p, 255, 255, 255, true)
  2699.  end
  2700.     end
  2701.         local desc = "(Premium +) ID: "..getElementData(plr,"id").." > "..name..": "..message:gsub("#%x%x%x%x%x%x","")..""
  2702.         triggerEvent("admin:addText", resourceRoot, RGBToHex(255,134,0)..desc..RGBToHex(255,255,255),math.random(0,99))
  2703.         triggerEvent("admin:logs", root, desc)
  2704.         --triggerEvent("admin:addText", resourceRoot, desc:gsub("#%x%x%x%x%x%x",""))
  2705.         outputServerLog(desc)
  2706.         end
  2707. end)
  2708.  
  2709. addCommandHandler("up", function(plr, cmd, value)
  2710.         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
  2711.         if (tonumber(value)==nil) then
  2712.             outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /up <ile>", plr, 255,255,255, true)
  2713.             return
  2714.         end
  2715.  
  2716.         local e = plr
  2717.         if (isPedInVehicle(plr)) then
  2718.             e = getPedOccupiedVehicle(plr)
  2719.         end
  2720.  
  2721.         local x,y,z = getElementPosition(e)
  2722.         setElementPosition(e, x, y, z+tonumber(value))
  2723.     end
  2724. end)
  2725.  
  2726. addCommandHandler("thru", function(plr, cmd, value)
  2727.         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
  2728.         if (tonumber(value)==nil) then
  2729.             outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /thru <ile>", plr, 255,255,255, true)
  2730.             return
  2731.         end
  2732.  
  2733.         local e = plr
  2734.         if getCameraTarget(plr) ~= plr then
  2735.             e = getCameraTarget(plr)
  2736.         end
  2737.  
  2738.         if (isPedInVehicle(plr)) then
  2739.             e = getPedOccupiedVehicle(e)
  2740.         end
  2741.  
  2742.         local x,y,z = getElementPosition(e)
  2743.         local _,_,rz = getElementRotation(e)
  2744.         local rrz = math.rad(rz)
  2745.         local x = x + (value * math.sin(-rrz))
  2746.         local y = y + (value * math.cos(-rrz))
  2747.         setElementPosition(e, x, y, z)
  2748.     end
  2749. end)
  2750.  
  2751.  
  2752. local zapisane_pozycje = {}
  2753. addCommandHandler("sp", function(plr,cmd)
  2754.         if getAdmin(plr) then
  2755.     local pos={}
  2756.     pos[1],pos[2],pos[3]=getElementPosition(plr)
  2757.     pos[4]=getElementInterior(plr)
  2758.     pos[5]=getElementDimension(plr)
  2759.         local uid = getElementData(plr,"player:sid")
  2760.     zapisane_pozycje[uid] = pos
  2761.     outputChatBox("#06B200(✔) #FFFFFFPozycja została zapisana.", plr, 255,255,255, true)
  2762.         end
  2763. end)
  2764.  
  2765. addCommandHandler("lp", function(plr,cmd)
  2766.         if getAdmin(plr) then
  2767.         local uid = getElementData(plr,"player:sid")
  2768.     local pos=zapisane_pozycje[uid]
  2769.     if (not pos) then
  2770.     outputChatBox("#bf0101(✖) #FFFFFFNie masz żadnej zapisanej pozycji.", plr, 255,255,255, true)
  2771.     return
  2772.     end
  2773.         local veh = getPedOccupiedVehicle(plr)
  2774.         if veh then plr = veh end
  2775.     setElementPosition(plr,pos[1],pos[2],pos[3])
  2776.     setElementInterior(plr,pos[4])
  2777.     setElementDimension(plr,pos[5])
  2778.     outputChatBox("#06B200(✔) #FFFFFFWczytano pozycję.", plr, 255,255,255, true)
  2779.         end
  2780. end)
  2781.  
  2782. addCommandHandler("pj",function(plr,cmd,pj)
  2783.         if getAdmin(plr,4) or getAdmin(plr, 7) then
  2784.         if not pj or not tonumber(pj) then outputChatBox("* Wpisz /pj <0-3> !",plr) return end
  2785.         local pj = tonumber(pj)
  2786.         if pj < 0 or pj > 3 then outputChatBox("* Wpisz /pj <0-3> !",plr) return end
  2787.         local veh = getPedOccupiedVehicle(plr)
  2788.         if not veh then outputChatBox("* Najpierw wsiądź do pojazdu !", plr) return end
  2789.         setVehiclePaintjob(veh,pj)
  2790.         end
  2791. end)
  2792.  
  2793. addCommandHandler("vinfo", function(plr,cmd,pojazd)
  2794.         if not getAdmin(plr) then outputChatBox("* Brak uprawnień !", plr) return end
  2795.     if not pojazd or not tonumber(pojazd) then
  2796.         outputChatBox("#ff6600(ⓘ) #FFFFFFUżyj: /vinfo <id pojazdu>", plr, 255,255,255, true)
  2797.         return
  2798.     end
  2799.     pojazd=tonumber(pojazd)
  2800.         local result = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=?",pojazd)
  2801.         if not result or #result < 1 then
  2802.         outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego pojazdu !", plr, 255,255,255, true)
  2803.         return end
  2804.         local query = exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=?",result[1].ownedPlayer)
  2805.         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)
  2806.     outputChatBox("Pojazd ID " .. result[1].id .. ", Model: " .. result[1].model .. " ["..getVehicleNameFromModel(result[1].model).."]", plr)
  2807.     outputChatBox("Własność gracza " .. query[1].login .. " ["..result[1].ownedPlayer.."]", plr)
  2808.     outputChatBox("Ostatni kierowca " .. result[1].driver .. "| Przebieg " .. result[1].mileage, plr)
  2809.     outputChatBox("PB: " .. result[1].fuel .. " L | Przechowalnia : " ..result[1].parking .." | Parking Policyjny: ".. result[1].police .. "", plr)
  2810.         outputChatBox("MK1: ".. result[1].mk1 .." | MK2: ".. result[1].mk2 .." | MK3: "..result[1].mk3.."", plr)
  2811.         outputChatBox("Pojemność Silnika: ".. result[1].pojemnosc_silnika .." | Rodzaj Paliwa: ".. result[1].rodzaj .." | Bak: "..result[1].bak.." L", plr)
  2812.         outputChatBox("Data utworzenia pojazdu "..result[1].createdate, plr)
  2813.         outputChatBox("Jest to "..#model.." pojazd tego modelu na serwerze!", plr)
  2814. end)
  2815.  
  2816. addCommandHandler("veh.list", function(plr,cmd,cel)
  2817.         if not getAdmin(plr) then outputChatBox("* Brak uprawnien", plr) return end
  2818.     if not cel then
  2819.         outputChatBox("* Użyj: /veh.list <id/nick>", plr)
  2820.         return
  2821.     end
  2822.         local target=exports["pystories-core"]:findPlayer(plr,cel)
  2823.                 if not target then
  2824.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  2825.                         return
  2826.                 end
  2827.         local resulte = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?",getElementData(target, "player:sid"))
  2828.         if not resulte or #resulte < 1 then
  2829.         outputChatBox("* Nie znaleziono pojazdu", plr)
  2830.         return end
  2831.         outputChatBox("--- Pojazdy Gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").."---",plr)
  2832.         for i,result in pairs(resulte) do
  2833.     outputChatBox("* Pojazd ID " .. result.id .. ", model " .. result.model .. " ("..getVehicleNameFromModel(result.model)..")", plr)
  2834.         end
  2835.         outputChatBox("------",plr)
  2836.         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","").."")
  2837. end)
  2838.  
  2839. addCommandHandler("ginfo", function(plr,cmd,cel)
  2840.         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
  2841.                 if not cel then
  2842.                         outputChatBox("#ff6600(ⓘ) #FFFFFFUzyj: /ginfo <id/nick>", plr, 255,255,255, true)
  2843.                         return
  2844.                 end
  2845.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  2846.                 if not target then
  2847.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  2848.                         return
  2849.                 end
  2850.     gracz=tonumber(gracz)
  2851.         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","").."")
  2852.         local result = exports['pystories-db']:dbGet("SELECT * FROM pystories_users WHERE id=?",getElementData(target, "player:sid"))
  2853.         if not result or #result < 1 then
  2854.         outputChatBox("* Nie znaleziono gracza", plr, 255, 255, 255)
  2855.         return end
  2856.     outputChatBox("#ff6600(ⓘ) #FFFFFFLogin: " .. result[1].login, plr,255, 255, 255, true)
  2857.     outputChatBox("#ff6600(ⓘ) #FFFFFFPieniądze: " .. result[1].money, plr,255, 255, 255, true)
  2858.     outputChatBox("#ff6600(ⓘ) #FFFFFFPieniądze w bankomacie: " .. result[1].bank_money, plr,255, 255, 255, true)
  2859.     outputChatBox("#ff6600(ⓘ) #FFFFFFREP: " .. result[1].srp, plr,255, 255, 255, true)
  2860.     outputChatBox("#ff6600(ⓘ) #FFFFFFMinuty: " .. result[1].hours, plr,255, 255, 255, true)
  2861.     outputChatBox("#ff6600(ⓘ) #FFFFFFMinuty na duty: " .. result[1].worker, plr,255, 255, 255, true)
  2862.     outputChatBox("#ff6600(ⓘ) #FFFFFFData rejestracji: " .. result[1].registered, plr,255, 255, 255, true)
  2863.     outputChatBox("#ff6600(ⓘ) #FFFFFFKonto premium do: " .. result[1].premiumdate, plr,255, 255, 255, true)
  2864.         outputChatBox("#ff6600(ⓘ) #FFFFFFKonto premium+ do: " .. result[1].premiumplusdate, plr,255, 255, 255, true)
  2865.         end
  2866. end)
  2867.  
  2868. addCommandHandler("paliwo", function(plr,cmd)
  2869.         if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr, 7)  then
  2870.                 local veh=getPedOccupiedVehicle(plr)
  2871.                 if not veh then
  2872.                         outputChatBox("#bf0101(✖) #FFFFFFNie znajdujesz się w pojeździe", plr, 255,255,255, true)
  2873.                         return
  2874.                 end
  2875.                 setElementData(veh, "vehicle:fuel", 100)
  2876.                 outputChatBox("#06B200(✔) #FFFFFFAuto zatankowane!",plr,255,255,255, true)
  2877.         end
  2878. end)
  2879.  
  2880. addCommandHandler("paliwo2", function(plr,cmd)
  2881.         if getAdmin(plr,8)  then
  2882.                 local veh=getPedOccupiedVehicle(plr)
  2883.                 if not veh then
  2884.                         outputChatBox("#bf0101(✖) #FFFFFFNie znajdujesz się w pojeździe", plr, 255,255,255, true)
  2885.                         return
  2886.                 end
  2887.                 setElementData(veh, "vehicle:fuel", 300)
  2888.                 outputChatBox("#06B200(✔) #FFFFFFAuto zatankowane!",plr,255,255,255, true)
  2889.         end
  2890. end)
  2891.  
  2892. addCommandHandler("daj.bron", function(plr,cmd,cel,bron,amunicja)
  2893.         if getAdmin(plr,4) or getAdmin(plr, 7) then
  2894.                 if not cel or not bron then
  2895.                         outputChatBox("* Użycie: /daj.bron <nick/ID> <bron> <amunicja>", plr)
  2896.                         return
  2897.                 end
  2898.                 if not tonumber(bron) then
  2899.                 outputChatBox("* Użycie: /daj.bron <nick/ID> <bron> <amunicja>", plr)
  2900.                         return
  2901.                 end
  2902.                 if not amunicja then local amunicja = 10 end
  2903.                 local target=exports["pystories-core"]:findPlayer(plr,cel)
  2904.                 if not target then
  2905.                         outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  2906.                         return
  2907.                 end
  2908.                 if giveWeapon(target,bron,amunicja,true) then
  2909.                         outputChatBox("* Nadałeś(aś) broń ("..getWeaponNameFromID(bron)..") dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr)
  2910.                         outputChatBox("* Otrzymałeś(aś) broń ("..getWeaponNameFromID(bron)..") od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""),target)
  2911.                 else
  2912.                         outputChatBox("* Wpisałeś(aś) złe id broni!",plr)
  2913.                 end
  2914.         end
  2915. end)
  2916.  
  2917.  
  2918. addCommandHandler("cfix", function(plr, cmd, range)
  2919.     if getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr, 7) then
  2920.         if (not range) then
  2921.             outputChatBox("Użyj: /cfix <zasieg>", plr)
  2922.         return end
  2923.                 if not tonumber(range) then
  2924.                 outputChatBox("* /cfix <zasieg>", plr)
  2925.                 return end
  2926.                 range = tonumber(range)
  2927.                 if range <= 0 then
  2928.                 outputChatBox("* Za mala odleglosc", plr)
  2929.                 return end
  2930.                 if range > 200 then
  2931.                 outputChatBox("* Za duza odleglosc", plr)
  2932.                 return end
  2933.                 local x,y,z = getElementPosition(plr)
  2934.                 local cub = createColSphere(x,y,z,range)
  2935.                 local pojazdy = getElementsWithinColShape( cub, "vehicle")
  2936.                 if #pojazdy == 0 then
  2937.                 outputChatBox("* Brak pojazdow w poblizu", plr)
  2938.                 return end
  2939.                 for i,pojazd in ipairs(pojazdy) do
  2940.                         fixVehicle(pojazd)
  2941.                         setVehicleOverrideLights(pojazd, 2)
  2942.                 end
  2943.                 setTimer(destroyElement,5000,1,cub)
  2944.         end
  2945. end)
  2946.  
  2947. addCommandHandler ( "erugergergkehrgjergeg", function(plr,cmd,ilosc )
  2948.         if getAdmin(plr, 4) or getAdmin(plr,3) then
  2949.                 if not tonumber(ilosc) then outputChatBox("To ma być liczba!",plr,255,0,0) return end
  2950.                 auto = getPedOccupiedVehicle ( plr )
  2951.                 id = getElementModel ( auto )
  2952.                 if not ilosc then outputChatBox("Nie podaleś liczby!", plr, 255,0,0) return end
  2953.                 if ilosc == "20" then
  2954.                         handlingTable = getOriginalHandling ( id )
  2955.                         wartosc = handlingTable ["maxVelocity"]
  2956.                         wartosc1 = handlingTable ["engineAcceleration"]
  2957.                         setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(75))
  2958.                         setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(20))
  2959.                 end
  2960.                 if ilosc == "10" then
  2961.                         handlingTable = getOriginalHandling ( id )
  2962.                         wartosc = handlingTable ["maxVelocity"]
  2963.                         wartosc1 = handlingTable ["engineAcceleration"]
  2964.                         setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(25))
  2965.                         setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(10))
  2966.                 end
  2967.                 if ilosc == "40" then
  2968.                         handlingTable = getOriginalHandling ( id )
  2969.                         wartosc = handlingTable ["maxVelocity"]
  2970.                         wartosc1 = handlingTable ["engineAcceleration"]
  2971.                         setVehicleHandling ( auto, "maxVelocity", tonumber(wartosc)+tonumber(600))
  2972.                         setVehicleHandling ( auto, "engineAcceleration", tonumber(wartosc1)+tonumber(600))
  2973.                 end
  2974.         end
  2975. end)
  2976.  
  2977. addCommandHandler ( "grniuergherhtguergerg", function(plr,cmd,ilosc )
  2978.         if getAdmin(plr, 4) or getAdmin(plr,5) then
  2979.                 if not tonumber(ilosc) then outputChatBox("To ma być liczba!",plr,255,0,0) return end
  2980.                 auto = getPedOccupiedVehicle ( plr )
  2981.                 id = getElementModel ( auto )
  2982.                 if not ilosc then outputChatBox("Nie podaleś liczby!", plr, 255,0,0) return end
  2983.                 if ilosc == "0" then
  2984.                      setVehicleVariant(auto, 0, 0)
  2985.                 end
  2986.                 if ilosc == "1" then
  2987.                      setVehicleVariant(auto, 1, 1)
  2988.                 end
  2989.                 if ilosc == "2" then
  2990.                      setVehicleVariant(auto, 2, 2)
  2991.                 end
  2992.                 if ilosc == "3" then
  2993.                      setVehicleVariant(auto, 3, 3)
  2994.                 end
  2995.                 if ilosc == "4" then
  2996.                      setVehicleVariant(auto, 4, 4)
  2997.                 end
  2998.                 if ilosc == "5" then
  2999.                      setVehicleVariant(auto, 5, 5)
  3000.                 end
  3001.                 if ilosc == "6" then
  3002.                         setVehicleVariant(auto, 0, 2)
  3003.                 end
  3004.         end
  3005.  
  3006. end)
  3007.  
  3008.  
  3009.