Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1. addCommandHandler("p", function(plr,cmd,...)
  2. if getAdmin(plr,6) or getAdmin(plr,3) or getAdmin(plr,4) or getAdmin(plr,2) or getAdmin(plr,1) then
  3. local text=table.concat({...}, " ")
  4. outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 16, 255, 0,true)
  5. outputServerLog('Chat /p> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
  6. end
  7. end)
  8.  
  9. addCommandHandler("s", function(plr,cmd,...)
  10. if getAdmin(plr,4) then
  11. local text=table.concat({...}, " ")
  12. outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 66, 119, 244,true)
  13. outputServerLog('Chat /ü> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
  14. end
  15. end)
  16.  
  17. addCommandHandler("o", function(plr,cmd,...)
  18. if getAdmin(plr,5) or getAdmin(plr,4) then
  19. local text=table.concat({...}, " ")
  20. outputChatBox(">> "..text.." #ffffff- "..getPlayerName(plr):gsub("#%x%x%x%x%x%x",""), root, 153, 190, 229,true)
  21. outputServerLog('Chat /o> '..text:gsub("#%x%x%x%x%x%x","")..' - '..getPlayerName(plr):gsub('#%x%x%x%x%x%x',''))
  22. end
  23. end)
  24.  
  25. -- Komendy rconów
  26. addCommandHandler("przepisz.gracz", function(plr,cmd,value)
  27. if getAdmin(plr,4) or getAdmin(plr,5) then
  28. local veh=getPedOccupiedVehicle(plr)
  29. if not veh then
  30. outputChatBox("#bf0101(✖) #FFFFFFNie siedzisz w pojeździe.", plr, 255,255,255, true)
  31. return
  32. end
  33. setElementData(veh,"vehicle:ownedPlayer",tonumber(value))
  34. outputChatBox("#06B200(✔) #FFFFFFPrzepisałeś(aś) pojazd do gracza: "..value, plr, 255,255,255, true)
  35. --outputServerLog('Komenda /przepisz.gracz> Gracz '..getPlayerName(plr):gsub('#%x%x%x%x%x%x','')..' przepisał pojazd na Gracza o UID: '..value..' '))
  36. end
  37. end
  38.  
  39. addCommandHandler("aconf", function(plr,cmd,name,value)
  40. if getAdmin(plr,4) and name and value then
  41. setServerConfigSetting(tostring(name),tostring(value),false)
  42. end
  43. end)
  44.  
  45. function pobierzOrga (plr,cmd,cel,nazwa)
  46. 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
  47. if not cel or not nazwa then outputChatBox("* Użyj /stworz.organizacje <id/nick lidera> <nazwa>", plr) return end
  48. local target=exports["pystories-core"]:findPlayer(plr,cel)
  49. if not target then
  50. outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
  51. return
  52. end
  53. outputChatBox("#06B200(✔) #FFFFFFZałożono organizacja dla "..getPlayerName(target):gsub("#%x%x%x%x%x%x","").." o nazwie "..nazwa.."",plr, 255,255,255, true)
  54. outputChatBox("#06B200(✔) #FFFFFFOtrzymałeś organizacje "..nazwa.." od "..getPlayerName(plr):gsub("#%x%x%x%x%x%x","")..".",target, 255,255,255, true)
  55. local name = getPlayerName(target):gsub("#%x%x%x%x%x%x","")
  56. exports["pystories-db"]:dbSet("INSERT INTO ms_organizacje (code,uid,login,rank) VALUES (?,?,?,4)", nazwa, getElementData(target,"player:sid"), name)
  57. setElementData(target,"player:organization",nazwa)
  58. --takePlayerMoney(target,25000)
  59. end
  60. end
  61. addCommandHandler("stworz.organizacje",pobierzOrga)
  62.  
  63. function pobierzDomki (plr,cmd,id,nazwa)
  64. if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 4 or getElementData(plr,"player:sid") == 44 then
  65. if not id or not nazwa then outputChatBox("* Użyj /dom <id> <nazwa>", plr) return end
  66. local x,y,z=getElementPosition(plr)
  67. kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
  68. outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
  69. exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,221,15000)", id, nazwa, id, kordy, kordy)
  70. end
  71. end
  72. addCommandHandler("dom",pobierzDomki)
  73.  
  74. function pobierzDomki (plr,cmd,id,nazwa)
  75. if getElementData(plr,"player:sid") == 1 or getElementData(plr,"player:sid") == 2 or getElementData(plr,"player:sid") == 538 or getElementData(plr, "player:sid") == 162 then
  76. if not id or not nazwa then outputChatBox("* Użyj /dom.1 <id> <nazwa>", plr) return end
  77. local x,y,z=getElementPosition(plr)
  78. kordy=string.format("%.2f,%.2f,%.2f",x,y,z)
  79. outputChatBox("* Utworzono dom id "..id.." o nazwie "..nazwa.."!!")
  80. exports["pystories-db"]:dbSet("INSERT INTO lss_domy (id,descr,vwi,drzwi,punkt_wyjscia,interiorid,koszt) VALUES (?,?,?,?,?,31,25000)", id, nazwa, id, kordy, kordy)
  81. end
  82. end
  83. addCommandHandler("dom.1",pobierzDomki)
  84.  
  85.  
  86. -- Komendy adminów
  87.  
  88. function xd(gracz)
  89. local rep = getElementData(gracz, "player:rep")
  90. outputDebugString("Ilość REP: "..tonumber(rep))
  91. end
  92. addCommandHandler("checkrp", xd)
  93.  
  94. addCommandHandler("jp", function(plr,cmd)
  95. if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) or getAdmin(plr,4) or getAdmin(plr,5) or getAdmin(plr,6) then
  96. if isPedInVehicle(plr) then
  97. removePedFromVehicle(plr)
  98. end
  99. if doesPedHaveJetPack(plr) then
  100. removePedJetPack(plr)
  101. outputChatBox ("#bf0101(✖) #FFFFFFZabrałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
  102. else
  103. givePedJetPack(plr)
  104. outputChatBox ("#007aff(ⓘ) #FFFFFFOtrzymałeś(aś) JetPack'a. [/jp]",plr, 255,255,255, true)
  105. end
  106. end
  107. end)
  108.  
  109. addCommandHandler("ch.niewidka", function(plr,cmd)
  110. if getAdmin(plr,4) or getAdmin(plr, 5) then
  111. if not getElementData(plr, "p:inv") then
  112. setElementData(plr, "p:inv", true)
  113. outputChatBox("* Włączyłeś system niewidki, nikt Cię nie widzi !", plr, 255,255,255)
  114. else
  115. setElementData(plr, "p:inv", false)
  116. outputChatBox("* Wyłączyłeś system niewidki, każdy Cię widzi !", plr, 255,255,255)
  117. end
  118. end
  119. end)
  120.  
  121. addCommandHandler("tune", function(plr,cmd,cel,value)
  122. if getAdmin(plr,4) or getAdmin(plr,3) then
  123. if not cel or not tonumber(value) then
  124. outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /tune <nick/ID> <id>", plr, 255,255,255, true)
  125. return
  126. end
  127. local target=exports["pystories-core"]:findPlayer(plr,cel)
  128. if not target then
  129. outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255,255,255, true)
  130. return
  131. end
  132. local veh=getPedOccupiedVehicle(target)
  133. addVehicleUpgrade(veh,value)
  134. outputChatBox("#007aff(ⓘ) #FFFFFFDo twojego pojazdu dodano tuning, o id: "..value.."", target, 255,255,255, true)
  135. 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)
  136. end
  137.  
  138. end)
  139.  
  140. addCommandHandler("przeladuj", function(plr,cmd,cel,...)
  141. if getAdmin(plr,4) or getAdmin(plr,5) then
  142. local reason=table.concat({...}, " ")
  143. if not cel or not reason then
  144. outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /przeladuj <nick/ID>", plr,255,255,255, true)
  145. return
  146. end
  147. local target=exports["pystories-core"]:findPlayer(plr,cel)
  148. if not target then
  149. outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  150. return
  151. end
  152. triggerEvent("save:player",root,target)
  153. triggerEvent("load:player",root,target)
  154. outputChatBox("#06B200(✔) #FFFFFFPrzeładowano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr,255,255,255, true)
  155. end
  156. end)
  157.  
  158. addCommandHandler("psr.all", function(plr,cmd)
  159. if getAdmin(plr,4) then
  160. for i,v in ipairs(getElementsByType("player")) do
  161. if isElement(v) then
  162. triggerEvent("save:player",root,v)
  163. end
  164. end
  165. outputChatBox("#06B200(✔) #FFFFFFAdministrator zapisał wszystkim statystyki.", root, 255,255,255, true)
  166. end
  167. end)
  168.  
  169. addCommandHandler("przeladuj.all", function(plr,cmd,cel,...)
  170. if getAdmin(plr,4) or getAdmin(plr,5) then
  171. for i,v in ipairs(getElementsByType("player")) do
  172. if isElement(v) then
  173. triggerEvent("save:player",root,v)
  174. triggerEvent("load:player",root,v)
  175. end
  176. end
  177. outputChatBox("* Administrator przeładował wszystkim statystyki.", root, 21,0,170,true)
  178. end
  179. end)
  180.  
  181. addCommandHandler("wczytaj", function(plr,cmd,cel,...)
  182. if getAdmin(plr,4) or getAdmin(plr,5) then
  183. local reason=table.concat({...}, " ")
  184. if not cel or not reason then
  185. outputChatBox("#007aff(ⓘ) #FFFFFFUżycie: /wczytaj <nick/ID>", plr, 255,255,255, true)
  186. return
  187. end
  188. local target=exports["pystories-core"]:findPlayer(plr,cel)
  189. if not target then
  190. outputChatBox("#bf0101(✖) #FFFFFFNie znaleziono podanego gracza.", plr, 255, 255, 255, true)
  191. return
  192. end
  193. triggerEvent("load:player",root,target)
  194. outputChatBox("* Wczytano statystyki gracza: "..getPlayerName(target):gsub("#%x%x%x%x%x%x","")..".", plr)
  195. end
  196. end)
  197.  
  198. addCommandHandler("zapiszall", function(plr,cmd)
  199. if getAdmin(plr,4) or getAdmin(plr,3) then
  200. for i,v in ipairs(getElementsByType("player")) do
  201. if isElement(v) then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement