addCommandHandler("checkplayervehicle",
function(source, cmd, target)
if not (target) then
outputChatBox("/checkplayervehicle [Player]")
return false
end
local target, targetName = exports["serverCore"]:findPlayer(source,target)
if target then
local targetAccount = getAccountName(getPlayerAccount(target))
local playercar1 = executeSQLQuery("SELECT Model FROM vehicleSlot1 WHERE PlayerName = ?",targetAccount)
if #playercar1 > 1 then
outputChatBox(getVehicleNameFromModel(playercar2[1].Model),source)
else
outputChatBox("slot 1 empty",source)
end
local playercar2 = executeSQLQuery("SELECT Model FROM vehicleSlot2 WHERE PlayerName = ?",targetAccount)
if #playercar2 > 1 then
outputChatBox(getVehicleNameFromModel(playercar2[1].Model),source)
else
outputChatBox("slot 2 empty",source)
end
end
end
)