Wysłany: 2018-04-03, 01:51
Frosty
Wiek: 33 Na forum: 3095 dni Posty: 16
Piwa : 2
ooo
Ostatnio zmieniony przez Frosty 2018-05-02, 15:12, w całości zmieniany 2 razy
Wysłany: 2018-04-03, 01:59
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"Frosty" napisał/a :Witam!
Mam problem, mianowicie szukam rozwi?zania b??du:
ERROR: advertisements/advertisements_s.lua:117: call: failed to call 'mysql:select' [string "?"]
ERROR: advertisements/advertisements_s.lua:117: bad argument #1 to 'ipairs' (table expected, got boolean)
(Tak jak w temacie wyst?puj?, pracuj? na paczce OWL Gaming v. 4.3.4.6 po r??nych serwisach kr???cej z podpisem "OWL DDAY")
Tutaj brakuje jak si? nie myl? modu??w, gdy? takie wymaga ten gamemode.
"Frosty" napisał/a :Z pojazdami urz?dowymi jest inny problem, poniewa? nie mog? stworzy? pojazdu dostawczego (nazwiemy go sobie kurierk?), a przy tworzeniu busa, w opisie pojazdu wyst?puje has?o firmy dostawczej. Po wpisaniu w komendzie "Delivery Job" pojawia si? b??d: Invalid Vehicle Name
Wycinek komendy:
-- / makecivveh
function createCivilianPermVehicle ( thePlayer , commandName , ...)
if ( exports . integration : isPlayerTrialAdmin ( thePlayer )) then
local args = {...}
if ( #args < 4) then
outputChatBox ( "SYNTAX: /" .. commandName .. " [id/name] [color1 (-1 for random)] [color2 (-1 for random)] [Job ID -1 for none]" , thePlayer , 255 , 194 , 14 )
outputChatBox ( "Job 1 = Delivery Job" , thePlayer , 255 , 194 , 14 )
outputChatBox ( "Job 2 = Taxi Driver" , thePlayer , 255 , 194 , 14 )
outputChatBox ( "Job 3 = Bus Driver" , thePlayer , 255 , 194 , 14 )
else
local vehicleID = tonumber ( args [ 1 ])
local col1 , col2 , job
if not vehicleID then -- vehicle is specified as name
local vehicleEnd = 1
repeat
vehicleID = getVehicleModelFromName ( table . concat ( args , " " , 1 , vehicleEnd ))
vehicleEnd = vehicleEnd + 1
until vehicleID or vehicleEnd == #args
if vehicleEnd == #args then
outputChatBox ( "Invalid Vehicle Name." , thePlayer , 255 , 0 , 0 )
return
else
col1 = tonumber ( args [ vehicleEnd ])
col2 = tonumber ( args [ vehicleEnd + 1 ])
job = tonumber ( args [ vehicleEnd + 2 ])
end
else
col1 = tonumber ( args [ 2 ])
col2 = tonumber ( args [ 3 ])
job = tonumber ( args [ 4 ])
end
local id = vehicleID
local r = getPedRotation ( thePlayer )
local x , y , z = getElementPosition ( thePlayer )
local interior = getElementInterior ( thePlayer )
local dimension = getElementDimension ( thePlayer )
x = x + ( ( math . cos ( math . rad ( r ) ) ) * 5 )
y = y + ( ( math . sin ( math . rad ( r ) ) ) * 5 )
local letter1 = string . char ( math . random ( 65 , 90 ))
local letter2 = string . char ( math . random ( 65 , 90 ))
local plate = letter1 .. letter2 .. math . random ( 0 , 9 ) .. " " .. math . random ( 1000 , 9999 )
local veh = createVehicle ( id , x , y , z , 0 , 0 , r , plate )
if not ( veh ) then
outputChatBox ( "Invalid Vehicle ID." , thePlayer , 255 , 0 , 0 )
else
local vehicleName = getVehicleName ( veh )
destroyElement ( veh )
local var1 , var2 = exports [ 'vehicle-system' ]: getRandomVariant ( id )
local smallestID = SmallestID ()
local insertid = mysql : query_insert_free ( "INSERT INTO vehicles SET id='" .. mysql : escape_string ( smallestID ) .. "', job='" .. mysql : escape_string ( job ) .. "', model='" .. mysql : escape_string ( id ) .. "', x='" .. mysql : escape_string ( x ) .. "', y='" .. mysql : escape_string ( y ) .. "', z='" .. mysql : escape_string ( z ) .. "', rotx='" .. mysql : escape_string ( "0.0" ) .. "', roty='" .. mysql : escape_string ( "0.0" ) .. "', rotz='" .. mysql : escape_string ( r ) .. "', color1='[ [ 0, 0, 0 ] ]', color2='[ [ 0, 0, 0 ] ]', color3='[ [ 0, 0, 0 ] ]', color4='[ [0, 0, 0] ]', faction='-1', owner='-2', plate='" .. mysql : escape_string ( plate ) .. "', currx='" .. mysql : escape_string ( x ) .. "', curry='" .. mysql : escape_string ( y ) .. "', currz='" .. mysql : escape_string ( z ) .. "', currrx='0', currry='0', currrz='" .. mysql : escape_string ( r ) .. "', interior='" .. mysql : escape_string ( interior ) .. "', currinterior='" .. mysql : escape_string ( interior ) .. "', dimension='" .. mysql : escape_string ( dimension ) .. "', currdimension='" .. mysql : escape_string ( dimension ) .. "',variant1=" .. var1 .. ",variant2=" .. var2 .. ", creationDate=NOW(), createdBy=" .. getElementData ( thePlayer , "account:id" ).. "" )
if ( insertid ) then
exports . logs : logMessage ( "[MAKECIVVEH] " .. getPlayerName ( thePlayer ) .. " created car #" .. insertid .. " (" .. getVehicleNameFromModel ( id ) .. ")" , 9 )
reloadVehicle ( insertid )
exports . logs : dbLog ( thePlayer , 6 , { "ve" .. insertid }, "SPAWNVEH '" .. vehicleName .. "' CIVILLIAN" )
local adminID = getElementData ( thePlayer , "account:id" )
local addLog = mysql : query_free ( "INSERT INTO `vehicle_logs` (`vehID`, `action`, `actor`) VALUES ('" .. tostring ( insertid ).. "', '" .. commandName .. " " .. vehicleName .. " (job " .. job .. ")', '" .. adminID .. "')" ) or false
if not addLog then
outputDebugString ( "Failed to add vehicle logs." )
end
end
end
end
end
end
addCommandHandler ( "makecivveh" , createCivilianPermVehicle , false , false )
Poka? w jaki spos?b u?ywasz komendy na spawn pojazdu
Więcej szczegółów
Wystawiono 1 piw(a):Frosty
Wysłany: 2018-04-03, 02:07
Frosty
Wiek: 33 Na forum: 3095 dni Posty: 16
Piwa : 2
.oo
Ostatnio zmieniony przez Frosty 2018-05-02, 15:13, w całości zmieniany 1 raz
Wysłany: 2018-04-03, 02:11
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"Frosty" napisał/a :Spr?buj? wgra? kt?ry? z modu??w.
Je?li chodzi o komend? to jest to dok?adnie /makecivveh Delivery Job -1 -1 1
Powinno wszystko gra? wed?ug formu?ki. Modu? wgrywasz w zale?no?ci gdzie trzymasz serwer. Jak na windows to *.dll i wersja bitowa komputera podajesz. Albo, na hostingu to *.so w zale?no?ci ile oni maj? bit?w
Tagi: ooo
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: