Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-04-15, 14:43


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

Cze??, skrypt na tepanie pojazd?w i nie tylko mi nie dzia?a, kto? pomo?e ? wywala nast?puj?ce b??dy:
Kod:

INFO: TW-vehiclecommands started.
[19-04-15 14] startResource: Resource 'TW-vehiclecommands' started
[19-04-15 14] ERROR: Loading script failed: TW-vehiclecommands/s.lua:1: unexpected symbol near '?'
[19-04-15 14] SCRIPT ERROR: TW-vehiclecommands/s.lua:1: unexpected symbol near '?'
[19-04-15 14] WARNING: Script 'TW-vehiclecommands/s.lua' is not encoded in UTF-8. Loading as ANSI...
[19-04-15 14] Starting TW-vehiclecommands
[19-04-15 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[19-04-15 14] Some files in 'TW-vehiclecommands' use deprecated functions.
[19-04-15 14] WARNING: TW-vehiclecommands/s.lua [Server] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8.
[19-04-15 14] Resource 'TW-vehiclecommands' changed, reloading and starting


Ostatnio zmieniony przez DsJ3 2019-04-15, 15:05, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 14:46


Dawcio77







Wiek: 22
Na forum: 3312 dni
Posty: 89
Nick w MP: cx_u

Piwa: 136

Respekt: 35,8

./upgrade TW-vehiclecommands

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 14:48


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"Dawcio77" napisał/a:

./upgrade TW-vehiclecommands

Nadal nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 14:59


Dawcio77







Wiek: 22
Na forum: 3312 dni
Posty: 89
Nick w MP: cx_u

Piwa: 136

Respekt: 35,8

Skonwertuj do UTF-8

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 15:22


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"Dawcio77" napisał/a:

Skonwertuj do UTF-8

Jak ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 15:31


AmaMa.

AmaMa.#3768






Wiek: 25
Na forum: 3207 dni
Posty: 182
Nick w MP: AmaMa.

Piwa: 1825

Respekt: 165,3
Respekt: 165,3Respekt: 165,3

DenyPL, poka? meta.xml

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 15:35


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"AmaMa." napisał/a:

DenyPL, poka? meta.xml

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>

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 15:37


AmaMa.

AmaMa.#3768






Wiek: 25
Na forum: 3207 dni
Posty: 182
Nick w MP: AmaMa.

Piwa: 1825

Respekt: 165,3
Respekt: 165,3Respekt: 165,3

DenyPL, poka? ca?o?? kodu s.lua

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 16:11


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"AmaMa." napisał/a:

DenyPL, poka? ca?o?? kodu s.lua

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,3then
    if not veh then
        outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
        return
    end
    if tonumber(vehthen
    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,3then
    if not veh then
        outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
        return
    end
    if tonumber(vehthen
    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,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,3then
    if not veh then
        outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0)
        return
    end
    if tonumber(vehthen
    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


Komentarz DsJ3 dodany 2019-04-15, 17:12Następnym razem dodaj załącznik[BBCode] [lua]Kod[./lua] bez kropki
Ostatnio zmieniony przez DsJ3 2019-04-15, 17:11, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 16:27


AmaMa.

AmaMa.#3768






Wiek: 25
Na forum: 3207 dni
Posty: 182
Nick w MP: AmaMa.

Piwa: 1825

Respekt: 165,3
Respekt: 165,3Respekt: 165,3

Spr?buj tak:

-- Pierwotny w?a?ciciel i tw?rca koduAmaMa 
-- Zakaz u?ywania edycji kodu bez wcze?niejszej zgody ze strony w?a?ciciela 

addCommandHandler("ttv", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truewarpPedIntoVehicle(plr,vend 
end 
endaddCommandHandler("ttp", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truelocal x,y,getElementPosition(plrsetElementPosition(v,x,y,zsetElementPosition(plr,x,y,z+2end 
end 
endaddCommandHandler("vehowner", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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].ownedPlayeroutputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,trueend 
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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 16:46


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"AmaMa." napisał/a:

Spr?buj tak:

-- Pierwotny w?a?ciciel i tw?rca koduAmaMa 
-- Zakaz u?ywania edycji kodu bez wcze?niejszej zgody ze strony w?a?ciciela 

addCommandHandler("ttv", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truewarpPedIntoVehicle(plr,vend 
end 
endaddCommandHandler("ttp", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truelocal x,y,getElementPosition(plrsetElementPosition(v,x,y,zsetElementPosition(plr,x,y,z+2end 
end 
endaddCommandHandler("vehowner", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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].ownedPlayeroutputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,trueend 
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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 17:08


AmaMa.

AmaMa.#3768






Wiek: 25
Na forum: 3207 dni
Posty: 182
Nick w MP: AmaMa.

Piwa: 1825

Respekt: 165,3
Respekt: 165,3Respekt: 165,3

DenyPL, przy informacji o mnie musz? by? dwa my?lniki "--" nie mo?e by? jeden.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 17:34


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"AmaMa." napisał/a:

DenyPL, przy informacji o mnie musz? by? dwa my?lniki "--" nie mo?e by? jeden.

OK, poprawi?em, Kurde nadal b??d wywala! taki:
[lua]ERROR: TW-vehiclecommands/s.lua:43: attempt to call global 'getAdmin' (a nil value)[lua][/lua]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-04-15, 17:44


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5



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,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truewarpPedIntoVehicle(plr,vend 
end 
endaddCommandHandler("ttp", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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,truelocal x,y,getElementPosition(plrsetElementPosition(v,x,y,zsetElementPosition(plr,x,y,z+2end 
end 
endaddCommandHandler("vehowner", function(plr,cmd,veh) 
if getAdmin(plr,3then 
if not veh then 
outputChatBox("* Nie poda?e? ID pojazdu.",plr,255,0,0) 
return 
end 
if tonumber(vehthen 
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].ownedPlayeroutputChatBox("Pojazd o ID: "..veh.." nale?y do gracza: "..result2[1].login.."(UID:"..result[1].ownedPlayer..")",plr,255,0,0,trueend 
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


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Wysłany: 2019-04-15, 17:45


AmaMa.

AmaMa.#3768






Wiek: 25
Na forum: 3207 dni
Posty: 182
Nick w MP: AmaMa.

Piwa: 1825

Respekt: 165,3
Respekt: 165,3Respekt: 165,3

SataN., Wystarczy jedynie uruchomi? zas?b dutyadmin.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
DenyPL
Tagi: skrypt :: pojazdy :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku