[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1736: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1737: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1738: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1739: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1740: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1741: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1742: Bad argument @ 'gettok' [Expected string at argument 1, got nil]
[2023-09-24 15:32:17] WARNING: [RevivedRP]\factionsCrp\factionsFunc.lua:1743: Bad argument @ 'createVehicle' [Expected vector3 at argument 2, got boolean]
[2023-09-24 15:32:17] ERROR: [RevivedRP]\factionsCrp\factionsFunc.lua:1744: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean]
function spawnCar ( Faction, tablePoz, tableCars, Data, r, g, b )
local vladelec = tostring( Faction )
local result = executeSQLQuery("SELECT ID, PLATE, PROBEG FROM Cars WHERE VLADELEC=?", tostring(vladelec))
for i, v in ipairs(result) do
local x = gettok ( tablePoz, 1, string.byte(", ") )
local y = gettok ( tablePoz, 2, string.byte(", ") )
local z = gettok ( tablePoz, 3, string.byte(", ") )
local rx = gettok ( tablePoz, 4, string.byte(", ") )
local ry = gettok ( tablePoz, 5, string.byte(", ") )
local rz = gettok ( tablePoz, 6, string.byte(", ") )
local rang = gettok ( tablePoz, 8, string.byte(", ") )
tableCars = createVehicle ( v.ID, x, y, z, rx, ry, rz )
setElementData ( tableCars, "Rang", tonumber(rang) )
setElementData ( tableCars, "FactionCar", tostring(Faction) )
setTimer(setElementRotation,1100,1,tableCars, rx, ry, rz )
setElementData (tableCars, "Fuel", 20 )
setElementData (tableCars, "Probeg", tonumber( v.PROBEG ) )
setVehiclePlateText( tableCars, tostring( v.PLATE ) )
addVehicleUpgrade ( tableCars, 1086 )
if Faction == "HLS" or Faction == "HSF" or Faction == "HLV" then
setVehicleColor( tableCars, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255 )
elseif Faction == "RM" or Faction == "Meria" or Faction == "LKN" then
setVehicleColor( tableCars, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255 )
elseif Faction == "FBI" then
setVehicleColor( tableCars, 50, 50, 50, 50, 50, 50, 255, 255, 255, 255, 255, 255 )
local fload = ( ( 90 * 0.6 ) / 100 ) + 0.4
setElementData ( tableCars, "toner", fload )
exports.auto:setTonCar ( tableCars )
elseif Faction ~= "RM" or Faction ~= "HLS" or Faction ~= "HSF" or Faction ~= "HLV" then
setVehicleColor( tableCars, r, g, b, 255, 255, 255, 255, 255, 255, 255, 255, 255 )
end
if v.ID == 415 then
exportHand ( tableCars )
local UpVeh = getVehicleOriginalProperty ( tableCars, "engineAcceleration" )
setVehicleHandling ( tableCars, "engineAcceleration", UpVeh+10 )
local UpVeh2 = getVehicleOriginalProperty ( tableCars, "suspensionLowerLimit" )
setVehicleHandling ( tableCars, "suspensionLowerLimit", UpVeh2+0.1 )
addVehicleUpgrade ( tableCars, 1001 )
addVehicleUpgrade ( tableCars, 1085 )
end
toggleVehicleRespawn ( tableCars, true )
setVehicleIdleRespawnDelay ( tableCars, 60000*60 )
setVehicleLocked ( tableCars, true )
setElementData (tableCars, Data, true )
if getElementModel ( tableCars ) == 451 and getElementData ( tableCars, "FBI" ) then
addVehicleSirens(tableCars, 1, 2, true, true, true, false)
end
end
end
Help Please :<