Wysłany: 2018-02-15, 15:34
Dani3l_105
Wiek: 26 Na forum: 3754 dni Posty: 21
Nick w MP: Dziki
Siemka, mam problem z przecho magic story
przecho dla niektorych dziala i te? nie,
[2018-02-15 15:32] ERROR: [podstawa]/msrpg-parking/s_parking.lua:23: attempt to get length of local 'result' (a boolean value)
wie ktos co tu zrobic?
Wysłany: 2018-02-15, 15:42
Nexisten
Moderator
Wiek: 22 Na forum: 4107 dni Posty: 551
Nick w MP: Nexisten
Piwa : 1479
Wiesz, fajnie by by?o jak by? poda? kod kt?ry znajduje si? w pliku s_parking.lua w odpowiednich znacznikach. Nikt tutaj nie jest jasnowidzem - niestety.
Wysłany: 2018-02-15, 15:52
Dani3l_105
Wiek: 26 Na forum: 3754 dni Posty: 21
Nick w MP: Dziki
& #65279;--[[
Resource : OURGame v2
Developers : Split < split . programista @ gmail . com >
You have no right to use this code without my permission .
( c ) 2015 < split . programista @ gmail . com >. All rights reserved .
]]
local mdestroy = createMarker (- 228.02 , 1162.51 , 19.74 - 3 , "cylinder" , 6 , 200 , 25 , 25 , 75 )
createBlipAttachedTo ( mdestroy , 35 )
local t = createElement ( "text" )
setElementData ( t , "scale" , 1 )
setElementData ( t , "name" , "Pozostawianie pojazd?w" )
setElementPosition ( t ,- 228.02 , 1162.51 , 19.74 )
addEvent ( "onParkingGetRekords" , true )
addEventHandler ( "onParkingGetRekords" , root , function()
local uid = getElementData ( source , "player:uid" )
if not uid then return end
local org = getElementData ( source , "player:organization" )
local result = exports [ "ogrpg-db" ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1" , uid , org or "Brak" )
if #result > 0 then
triggerClientEvent ( source , "onParkingGetVehicles" , source , result )
end
end )
addEventHandler ( "onMarkerHit" , mdestroy , function( el , md )
if getElementType ( el ) == "player" then
local veh = getPedOccupiedVehicle ( el )
if not veh then return end
if getVehicleController ( veh ) ~= el then return end
local id = getElementData ( veh , "vehicle:id" )
if not id then return end
if isTimer ( timeroddania ) then return end
setElementFrozen ( veh , true )
triggerClientEvent ( el , "dodaj:powiadomienie" , root , "* Pojazd wje?dza do przechowywalni..." )
toggleControl ( el , "enter_exit" , false )
timeroddania = setTimer (function()
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1 WHERE id=?" , id )
toggleControl ( el , "enter_exit" , true )
triggerClientEvent ( el , "dodaj:powiadomienie" , root , "* Pojazd zosta? zapisany w przechowywalni." )
end , 3000 , 1 )
end
end )
addEvent ( "onParkingVehicleSpawn" , true )
addEventHandler ( "onParkingVehicleSpawn" , root , function( id )
if not id then return end
local spawn = exports [ "ogrpg-vehicles" ]: onRespawnVehicles ( _ , id ,{- 234.44 , 1154.45 , 19.45 , 359.5 , 0.0 , 2.7 })
if spawn then
end
end )
Wysłany: 2018-02-15, 19:25
Eitho
Wiek: 24 Na forum: 3489 dni Posty: 330
Nick w MP: Eitho
Piwa : 746
Ostatnio zmieniony przez Eitho 2018-02-15, 23:21, w całości zmieniany 2 razy
Wysłany: 2018-02-15, 20:35
Grace
Kierowca Pralki
Wiek: 24 Na forum: 3436 dni Posty: 168
Nick w MP: Grace
Piwa : 1031
"Eitho" napisał/a : if result and result > 0 then
Jak podawaj to poprawnie
if result and #result > 0 then
a tak pozmieniaj zapytanie:
ocal result = exports [ "ogrpg-db" ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE ownedPlayer=? OR ownedGroup=? AND parking=1" , ownedPlayer , ownedGroup )
Wysłany: 2018-02-15, 23:21
Eitho
Wiek: 24 Na forum: 3489 dni Posty: 330
Nick w MP: Eitho
Piwa : 746
"Grace" napisał/a : "Eitho" napisał/a : if result and result > 0 then
Jak podawaj to poprawnie
if result and #result > 0 then
a tak pozmieniaj zapytanie:
ocal result = exports [ "ogrpg-db" ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE ownedPlayer=? OR ownedGroup=? AND parking=1" , ownedPlayer , ownedGroup )
Faktycznie si? waln??em, przeoczy?em # , zapytanie jest napisane poprawnie. Zauwa?, i? w twoim zapytaniu odwo?ujesz si? do nieistniej?cych (w tym skrypcie) rzeczy:
Tagi: przecho :: ogrpg/story
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: