| Tematy otagowane jako: tepa |
| 1. Nie tepa do jaila |
Witam, mam problem poniewa? nie tepa gracza do jaila po wpisaniu /jail ID CZAS m/h POWOD
Ale po wpisaniu /unjail ID tepa gracza pod komende i ze jest wypuszczony
Pisze tylko na czacie ze jest w wiezieniu. Zero b??d?w w DB3.
Mo?e kto? to zmieni? aby dzia?a?o? Dam piwerko
[code]local cub = createColCuboid(1336.20, -1081.96, -60.85, 20, 20.75, 12.5)
function u(e)
getElementData(e, "player:sid")
end
local cele = { -- x,y,z,int,dim
{1323.62, -1093.68, -60.85,0,0},
{1336.14, -1096.00, -60.85,0,0},
{1347.56, -1094.26, -60.85,0,0},
{1345.27, -1072.97, -60.85,0,0},
}
local x,y,z = 1541.32, -1675.48, 13.55
local m=createElement("text")
setElementData(m, "name", "/jailn/unjailn(dla SAPD)")
setElementData(m, "scale", 1.3)
setElementPosition(m, 1467.00, 1189.99, 129.45)
local function wypusc(plr)
setElementDimension(plr,1)
setElementInterior(plr,0)
setElementPosition(plr,1467.00, 1189.99, 129.45)
outputChatBox("Zosta?e? wypuszczony z wi?zienia.",plr, 255, 255, 255)
end
function getPlayerName2(plr)
if not plr then return end
return getPlayerName(plr):gsub("#%x%x%x%x%x%x","")
end
local function sprawdz(plr)
if not plr then return end
if not getElementData(plr,"player:sid") then return end
local x = exports['pystories-db']:dbGet("SELECT * FROM saj WHERE Serial=?",getPlayerSerial(plr))
if not x or #x < 1 then return end
local x2=exports['py... |
| 2. nie tepa do radiowozu w kajdankach |
Witam mam problem : gdy jestem na duty sapd, zakuwam gracza w kajdanki to wszystko dziala ale gdy wchodze z nim do radiowozu Nie tepa go na miejsce pasazera tylko jest w masce i sie buguje i nie da sie jecha? przez to :
[lua]addEventHandler("onVehicleStartEnter", root, function(player, seat, jacked)
local kategoria = getElementData(player, "kajdanki")
if kategoria ~= false then
cancelEvent()
outputChatBox("Masz kajdanki i nie mo?esz wsi??? do tego pojazdu.",player)
end
end)
addEventHandler("onVehicleStartExit", root, function(player)
local kategoria = getElementData(player, "kajdanki")
if kategoria ~= false then
cancelEvent()
outputChatBox("Masz kajdanki i nie mo?esz wysi??? z tego pojazdu.",player)
end
end)
addEvent("kajdanki", true)
addEventHandler("kajdanki", resourceRoot, function(player, targetElement)
if isPedInVehicle(player) then return end
if getElementData(player,'player:rank') >= 4 then
local x, y, z = getElementPosition(player)
local tx, ty, tz = getElementPosition(targetElement)
local distance = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz)
if distance < 10 then
local dokogo = getElementData(targetElement,"kajdanki")
if not dokogo or not isElement(dokogo) then
outputChatBox("Za?o?y?e? kajdanki.",player, 255, 0, 0)
setElementData(targetElement, "kajdanki", player)
setElementData... |
| 3. Nie tepa pojazdów |
Witam ot?? mam taki problem i? nie tepa mi auta. My?l? ?e ?le podpi??em pod siebie skrypty. M?g? by mi kto? powiedzie? gdzie pope?ni?em b??d? Z g?ry stawiam browarka
[lua]
addEventHandler("onResourceStart",resourceRoot,function() -- Funkcja kt?ra sprawdza czy posiadamy tabel? w registry.db, je?li nie to j? tworzy
local state = executeSQLQuery("CREATE TABLE IF NOT EXISTS pojazdy (id INT, model INT, owner TEXT, kolor1 INT, kolor2 INT, kolor3 INT, kolor4 INT, kolor5 INT, kolor6 INT, posx FLOAT, posy FLOAT, posz FLOAT, rotz FLOAT)")
if state then
outputDebugString("* Utworzono tabel?")
else
outputDebugString("* Nie utworzono tabeli")
end
end)
--JE?LI NIE ZNASZ SI? NA MYSQL / SQL ANI LUA TO NIC NIE EDYTUJ!!!!!!
local auta = {} -- tabela z autami
addCommandHandler("pojazd",function(plr,cmd,modelid,gracz) -- komenda /pojazd <id pojazdu> <nick gracza>
if modelid and gracz then -- sprawdzamy czy podalismyy wszystkie argumenty
modelid = tonumber(modelid)
if modelid then
local x,y,z = getElementPosition(plr)
local pojazd = createVehicle(modelid,x,y,z,0,0,0) --tworzymy pojazd
if not pojazd then
outputChatBox("* Nie uda?o si? utworzy? pojazdu!",plr) return end
table.insert(auta,pojazd)
setElementData(pojazd,"pojazd:id",#auta)
local k1,k2,k3,k4,k5,k6 = getVehicleColor(pojazd,true)
local x,y,z = getElementPosition(pojazd)
local _,_,rotacjaz = getElementRotation(pojaz... |
|