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

Wysłany: 2018-04-03, 01:51


Frosty







Wiek: 33
Na forum: 3095 dni
Posty: 16

Piwa: 2

Respekt: 50

ooo

Ostatnio zmieniony przez Frosty 2018-05-02, 15:12, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-03, 01:59


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"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(thePlayercommandName, ...) 
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]"thePlayer25519414outputChatBox("Job 1 = Delivery Job"thePlayer25519414outputChatBox("Job 2 = Taxi Driver"thePlayer25519414outputChatBox("Job 3 = Bus Driver"thePlayer25519414) 
else 
local vehicleID tonumber(args[1]) 
local col1col2job 

if not vehicleID then -- vehicle is specified as name 
local vehicleEnd 1 
repeat 
vehicleID getVehicleModelFromName(table.concat(args" "1vehicleEnd)) 
vehicleEnd vehicleEnd 1 
until vehicleID or vehicleEnd == #args 
if vehicleEnd == #args then 
outputChatBox("Invalid Vehicle Name."thePlayer25500) 
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(thePlayerlocal xygetElementPosition(thePlayerlocal interior getElementInterior(thePlayerlocal dimension getElementDimension(thePlayer+ ( ( math.cos math.rad ) ) ) * + ( ( math.sin math.rad ) ) ) * local letter1 string.char(math.random(65,90)) 
local letter2 string.char(math.random(65,90)) 
local plate letter1 .. letter2 .. math.random(09) .. " " .. math.random(10009999local veh createVehicle(idxyz00rplate) 
if not (vehthen 
outputChatBox("Invalid Vehicle ID."thePlayer25500) 
else 
local vehicleName getVehicleName(vehdestroyElement(vehlocal var1var2 exports['vehicle-system']:getRandomVariant(idlocal 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 (insertidthen 
exports.logs:logMessage("[MAKECIVVEH] " .. getPlayerNamethePlayer ) .. " created car #" .. insertid .. " (" .. getVehicleNameFromModelid ) .. ")"9reloadVehicle(insertidexports.logs:dbLog(thePlayer6, { "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"createCivilianPermVehiclefalsefalse)


Poka? w jaki spos?b u?ywasz komendy na spawn pojazdu

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
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

Respekt: 50

.oo

Ostatnio zmieniony przez Frosty 2018-05-02, 15:13, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-03, 02:11


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

"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

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Tagi: ooo
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Ooo 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