function autoinfo(plr,cmd,id)
local account = getPlayerAccount(plr)
local name = getAccountName(account)
if not isObjectInACLGroup("user."..name, aclGetGroup("Admin")) then return end
if id then
local id = tonumber(id)
local v = znajdzpojazd(id)
if v then
local wlasciciel = getElementData(v,"car_owner")
local przebieg = getElementData(v,"pojazd_przebieg")
local marka = getElementModel ( v )
local carName = getVehicleNameFromModel ( id , marka )
outputChatBox("ID (Marki): "..marka,plr,222,222,222,true)
outputChatBox("Marka pojazdu: "..carName,plr,222,222,222,true)
outputChatBox("Pojazd o ID: "..id,plr,222,222,222,true)
outputChatBox("Przebieg pojazdu: "..math.floor(przebieg).."km" ,plr,222,222,222,true)
outputChatBox("W?a?ciciel pojazdu: "..wlasciciel,plr,222,222,222,true)
else
outputChatBox("Nie wykryto takiego pojazdu!",plr,255,5,5,true)
end
else
outputChatBox("Nie wpisa?e? ID pojazdu.",plr,255,0,0,true)
end
end
addCommandHandler("vinfo",autoinfo)
Jednak po komendzie pole o marce jest puste:
ID (Marki): 411
Marka pojazdu:
Pojazd o ID: 1
Przebieg pojazdu: 73km
W?a?ciciel pojazdu: BylemTu
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