skonwertowa?em ale nadal nie dzia?a teraz tylko te b??dy wywala:
19-04-15 15:33:52] SCRIPT ERROR: TW-vehiclecommands/s.lua:1: '=' expected near 'w'
[19-04-15 15:33] ERROR: Loading script failed: TW-vehiclecommands/s.lua:1: '=' expected near 'w'
A meta to tutaj
<meta>
<script src="s.lua" type="server"/>
</meta>
-- Pierwotny w?a?ciciel i tw?rca kodu: AmaMa
-- Zakaz u?ywania / edycji kodu bez wcze?niejszej zgody ze strony w?a?ciciela
addCommandHandler("ttv", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono do pojazdu o ID: "..veh.."",plr,255,0,0,true)
warpPedIntoVehicle(plr,v)
end
end
end)
addCommandHandler("ttp", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono pojazd o ID: "..veh.."",plr,255,0,0,true)
local x,y,z = getElementPosition(plr)
setElementPosition(v,x,y,z)
setElementPosition(plr,x,y,z+2)
end
end
end)
addCommandHandler("vehowner", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=?", veh)
if result then
local result2=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", result[1].ownedPlayer)
outputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,true)
end
end
end
end)
function findveh(id)
for i,v in pairs(getElementsByType("vehicle")) do
if getElementData(v,"vehicle:id") == id then
return v
end
end
end
-- Pierwotny w?a?ciciel i tw?rca kodu: AmaMa
-- Zakaz u?ywania / edycji kodu bez wcze?niejszej zgody ze strony w?a?ciciela
addCommandHandler("ttv", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono do pojazdu o ID: "..veh.."",plr,255,0,0,true)
warpPedIntoVehicle(plr,v)
end
end
end)
addCommandHandler("ttp", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono pojazd o ID: "..veh.."",plr,255,0,0,true)
local x,y,z = getElementPosition(plr)
setElementPosition(v,x,y,z)
setElementPosition(plr,x,y,z+2)
end
end
end)
addCommandHandler("vehowner", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=?", veh)
if result then
local result2=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", result[1].ownedPlayer)
outputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,true)
end
end
end
end)
function findveh(id)
for i,v in pairs(getElementsByType("vehicle")) do
if getElementData(v,"vehicle:id") == id then
return v
end
end
end
teraZ takie co?:
INFO: TW-vehiclecommands started.
[19-04-15 16:44] startResource: Resource 'TW-vehiclecommands' started
[19-04-15 16:44] ERROR: Loading script failed: TW-vehiclecommands/s.lua:1: unexpected symbol near '-'
[19-04-15 16:44] SCRIPT ERROR: TW-vehiclecommands/s.lua:1: unexpected symbol near '-'
Jak wpisuje /ttv /ttp /vehowner czy cokolwiek to nic si? nie dzieje
function getAdmin(plr,level)
if level then
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=? AND level=?", getPlayerSerial(plr), level)
if result and #result > 0 then
return true
else
return false
end
else
local result=exports["ogrpg-db"]:dbGet("SELECT * from ogrpg_admins WHERE serial=?", getPlayerSerial(plr))
if result and #result > 0 then
return true
else
return false
end
end
end
addCommandHandler("ttv", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono do pojazdu o ID: "..veh.."",plr,255,0,0,true)
warpPedIntoVehicle(plr,v)
end
end
end)
addCommandHandler("ttp", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local v = findveh(veh)
if not v then
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0)
return
end
outputChatBox("Pomy?lnie przeniesiono pojazd o ID: "..veh.."",plr,255,0,0,true)
local x,y,z = getElementPosition(plr)
setElementPosition(v,x,y,z)
setElementPosition(plr,x,y,z+2)
end
end
end)
addCommandHandler("vehowner", function(plr,cmd,veh)
if getAdmin(plr,3) then
if not veh then
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
return
end
if tonumber(veh) then
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=?", veh)
if result then
local result2=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", result[1].ownedPlayer)
outputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,true)
end
end
end
end)
function findveh(id)
for i,v in pairs(getElementsByType("vehicle")) do
if getElementData(v,"vehicle:id") == id then
return v
end
end
end
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach