Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: dziala
41. Nie dziala UID
Witam, aktualnie mam zamiar stworzyc autorski projekt i podczas tworzenia, przy robieniu panelu logowania po rejestracji w DB nadaje mi UID 0 zamiast 1 i po stworzeniu paru kont zauwazylem, ze wszystkim nadaje UID 0 zamiast 1 2 3 4 5 itp
prosze o pomoc, w bazie danych UID mam ustawione jako int(11)
42. CreateObject nie dziala
Witam ot?? mam problem gdy? nie tworzy si? item po jego wywaleniu (dostarcza itemName2 bo sprawdza?em po przez wiadomo?? na czacie). Stawiam zimne Piwerko

kod:
function playerDropAItemLang(itemName2)
    
local x,y,getElementPosition(source)
    
    if 
itemName2 == "Wood" then
        local x
,y,getElementPosition(source)
        
local object2 createObject("Wood",x+math.random(-1.25,1.25),y+math.random(-1.25,1.25),z-0.875)
        
setObjectScale(object21)
        
setElementCollisionsEnabled(object2false)
        
setElementFrozen (object2,true)
        
local col2 createColSphere(x+math.random(-1.25,1.25),y+math.random(-1.25,1.25),z,0.75)
        
setElementData(col2,"item""Wood")
        
setElementData(col2,"parent",object2)
        
setTimer(function()
            if 
isElement(col2then
                destroyElement
(col2)
                
destroyElement(object2)
            
end    
        end
,900000,1)
        return 
object2
    end
end
addEvent
"playerDropAItemLang"true )
addEventHandler"playerDropAItemLang"getRootElement(), playerDropAItemLang )
43. Tune Mechaniczne nie dziala
Cze?? mam problem z tune mechanicznym z gm crpg dok?adnie problem istnieje w tym ?e jak chce co? kupi? to nie pobiera pieni?dzy i nie jest dodane do pojazdu.
DB3: [img]https://imgur.com/a/gD6ZCmF[/img]

Kody

Server:

[lua]--[[
Autor: Asper
Dla: .newMode
Skrypt: Tuning v?w
Typ: Server
]]

function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]

if value then
return value
end
end

return false
end

local marker = createMarker(2483.53, 1754.61, 10.82-3, "cylinder", 5, 255, 0, 0, 100)
local blip = createBlip(2496.00, 1761.14, 10.82, 23,2,255,0,0,255,0,100) -- PILGRIM LV

addEvent("mTuning", true)
addEventHandler("mTuning", root, function(v, i, c)
if not v and not i and not c then return end
local hand = getVehicleHandlingProperty(v, "driveType")
local hajs = getElementData(source, "pieniadze")
local bak = getElementData(v, "bak")
bak = tonumber(bak)
if i == "Zawieszenie hydrauliczne" then
if getElementData(v, "zawieszenie") then
local cx = c/2
cx = string.format("%1.2f", cx)
setElementData(source, "pieniadze", hajs+cx)
exports["nm-noti"...
44. Niezniszczalny plotek nie dziala po reconnect
Witam ot?? mam problem z p?otkiem kt?ry gracz postawi?, i funkcja odrazu daje mu niezniczalno??
    setObjectBreakable(object,false)
, i nie moge zniszczyc a po reconnect moge zniszczyc (gdy zresetuje skrpyt juz znowu nie moge, objekty zapisuja sie w db). Stawiam zimne Piwerko
45. radar mi nie dziala
witam pomoze mi ktos ? gdy wgrywam radar z paczki stories rpg pod pysa to mi nie dziala nie wyswietla sie tu kod


[code]local enableBlips = true
local renderNorthBlip = true
local alwaysRenderMap = false


local worldW, worldH = 3072, 3072 --map image dimensions - if map image changed, please edit appropriately
local blip = 12 --Blip size, pixels relative to 1366x768 resolution

------------------------------------------------------------------------------------
--Do not modify anything below unless you're absolutely sure of what you're doing.--
------------------------------------------------------------------------------------

local sx, sy = guiGetScreenSize()
local rt = dxCreateRenderTarget(290, 175)
local xFactor, yFactor = sx/1366, sy/768
local yFactor = xFactor --otherwise the radar looses it's 2:3 ratio.

local w, h=(sx/1680), (sy/1050)


-- Useful functions --
function findRotation(x1,y1,x2,y2) --Author: Doomed_Space_Marine & robhol
local t = -math.deg(math.atan2(x2-x1,y2-y1))
if t < 0 then t = t + 360 end;
return t;
end
function getPointFromDistanceRotation(x, y, dist, angle) --Author: robhol
local a = math.rad(90 - angle);
local dx = math.cos(a) * dist;
local dy = math.sin(a) * dist;
return x+dx, y+dy;
end

function drawRadar()
if not getElementData(localPlayer,"player:logged") then return end
if getElementData(localPlayer,"hud:visible") then
setPlayerHudComponentVisible(&qu...
46. IT's /tt itd. nie dziala
Siema mam tutaj taki kod z ITS'a i nie wiem dla czego /tt /vth itd. nie dzia?a.
Szuka?em b??d?w w kodzie ale nic nie znalaz?em.
Je?li kto? ma dzia?aj?cy to prosze.


[lua]addCommandHandler("kick", function(plr,cmd,cel,...)
if getAdmin(plr,4) or getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) then
local reason = table.concat({...}, " ")
if not cel or not reason then
outputChatBox("* U?ycie: /kick <nick/ID> <pow?d>", plr)
return
end
local target = exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
triggerClientEvent(plr, "iyw_notifications:send", plr, "error", "Nie znaleziono podanego gracza.")
return
end
exports["ogrpg-db"]:dbSet("insert into kartoteka (typ,karajacy,data,powod,ofiara) VALUES(?,?,NOW(),?,?)", "KICK", plr.name:gsub("#%x%x%x%x%x%x",""), reason, getElementData(target, "player:uid"))
triggerClientEvent(root, "adminRender", root, "Gracz "..getPlayerName(target).." zosta? wyrzucony przez "..plr.name..", pow?d: "..reason.."")
exports["ogrpg-db"]:dbSet("INSERT INTO admin_logs_cmd (uid,moderator,cmd) VALUES (?,?,?)", getElementData(plr,"player:uid"), plr.name:gsub("#%x%x%x%x%x%x",""), "kick "..getPlayerName(target).."")
kickPlayer(target, plr, r...
47. Trigger eventu do serwera nie dziala
Witam mam problem z triggerem eventu do serwera, wywala b??d w db3, kod i db3 podane poni?ej. Stawiam zimne Piwerko!!

Kod:
function sprawdzanieslot(source)
    if 
getPlayerCurrentSlots() <= getPlayerMaxAviableSlots() then
        triggerServerEvent 
(source"slotymax"source)
        
outputChatBox("Sprawdzenie")
    else
        
triggerServerEvent (source"slotypuste"source)
        
outputChatBox("Sprawdzenie2")
    
end
end
addCommandHandler
("spp",sprawdzanieslot)



db3:
Bad argument 'triggerServerEvent'[Expected element at argument 2got string 'slotymax'']
48. brama nie dziala
na moim serwerze nie dziala brama
ta pierwsza dziala ale ta druga juz nie(ta druga z dopiskiem 1 nie dziala)
[lua]
local gate={
-- var
object=createObject(969, 1544.70,-1630.85,12.51,0,0,90),
marker=createMarker(1544.29,-1626.99,13.38-1, "cylinder", 9, 0, 0, 0, 0),
close=true,
animation=false,
}

gate.open=function()
if gate.animation or not gate.close then return end

gate.animation=true
moveObject(gate.object, 5000, 1544.70,-1630.85,9.01,0,0,0, "OutQuad")

setTimer(function()
gate.animation=false; gate.close=false
end, 6000, 1)
end

gate.close=function()
if gate.animation or gate.close then return end

gate.animation=true
moveObject(gate.object, 2000, 1544.70,-1630.85,12.51,0,0,0, "OutQuad")

setTimer(function()
gate.animation=false; gate.close=true
end, 6000, 1)
end
--------------------------------------------------------------------------------------------

local gate1={
-- var
object=createObject(969, 1584.75,-1637.87,12.54),
marker1=createMarker(1589.04,-1637.47,13.44-1, "cylinder", 9, 0, 0, 0, 0)
close1=true,
animation1=false,
}

gate1.open=function()
if gate.animation1 or not gate.close1 then return end

gate.animation1=true
moveObject(gate.object, 5000, 1584.75,-1637.87,8.54, "OutQuad")
setTimer(function()
gate.animation1=false; gate.close1=false
end, 6000, 1)
end

gate1.close=function()
if gate.animation1 or gate.close1 then retu...
49. Trigger nie dziala
Witam ot?? mam problem z Triggerem eventu do clienta (gracza) ten napis "przeprzekroczy?es limit" dzia?a. Stawiam Piwerko



kod do wysylania eventu:
function newObject(thePlayer)
    if 
maxobjectysciany[client] >= 5 then
        outputChatBox
("przekroczy?es limit"client)
        
triggerClientEvent (thePlayer"wylgui"thePlayer)
    
end 
end
addCommandHandler
("spr",newObject)




odbi?r eventu od servera:
addEvent("wylgui",true)
function 
wylaczgui ()
    
guiSetVisible(baseCPanel.window[1], not guiGetVisible baseCPanel.window[1] ))
    
showCursor false )
end
addEventHandler
("wylgui"rootwylaczgui)
50. Sprawdzanie dwóch if`ów nie dziala
Witam mam problem z sprawdzaniem dw?ch if`?w kt?re s? poni?ej a chce, aby dziala? skrypt kt?ry jest oznaczony *(Nie ma b??d?w w db3). Stawiam Piwerko
(Tiggery mam po stronie clienta, bo gdy mam sam if model == 3260 then... to dziala, a jak z tym ranga == "Founder" to nie dziala )


dwa if`y: (* to niedzia?a, chce ?eby dziala?)

local objekty 
= {}
function 
newObject(model,player)
local ranga exports.Skrypt2:getPlayerGroupRank(player)
if 
model == 3260 and ranga == "Founder" then
    objekty
[client] = objekty[client]+1
end
addEvent
("addon.basecreator:newObject"true)
addEventHandler("addon.basecreator:newObject"rootnewObject)



jeden if: (dziala)
function sprawdzenie(player
    
local ranga exports.Skrypt2:getPlayerGroupRank(player)
    if 
ranga == "Founder" then
        outputChatBox
("dziala"player)
    
end
end
addCommandHandler
("spr2"sprawdzenie)



jeden if: (dziala)

local objekty 
= {}
function 
newObject(model)
if 
model == 3260  then
    objekty
[client] = objekty[client]+1
end
addEvent
("addon.basecreator:newObject"true)
addEventHandler("addon.basecreator:newObject"rootnewObject)
51. Nie dziala podmienienie
witam mam koszary z gtao (model) wykonany przez Garru i chcialem przeniesc to do mta i w tym celu napisalem mete i client.lua client jest o tresci:

local txd engineLoadTXD("safd.txd")
engineImportTXD(txd17551)
local dff engineLoadDFF("safd.dff"17551)
engineReplaceModel(dff17551)
local col engineLoadCOL("safd.col")
engineReplaceCOL(col17551)


ale nie dziala
52. Nie dziala anty spam do
Witam mam mianowicie problem kiedy chce dodac tak? funkcj?:

 function cmd_blokada(plr)
  if 
getElementData(plr"mutespamer") == 2 then return end
  setElementData
(plr"mutespamer"2)
  
setTimer(function()
    
setElementData(plr"mutespamer"false)
  
end30001


Do komendy -

addCommandHandler('do', function(sourcecmd, ...)
    
local text=table.concat({...}, ' ')
    if 
not text then return end
        
if ninjaban(textthen
        triggerClientEvent
(root"admin:rendering"root"* "..getPlayerName(source).."("..getElementData(source,"id")..") zosta?(a) wyrzucony(a) przez system. Powod: Reklama")
        
kickPlayer (source"System:Reklama")
        return 
end
    local msg
=table.concat({...}, " ")
    
local x,y,z=getElementPosition(source)
    
local sphere=createColSphere(x,y,z30)
    
local players=getElementsWithinColShape(sphere'player')
    
destroyElement(sphere)

    for 
i,v in ipairs(players) do
        
outputChatBox("*(( "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." "..msg.."))"v25551102)
        
triggerClientEvent("onDebugMessage"resourceRoot"*(( "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." "..msg.."))",1"/ME")
    
end
end
)


Mo?e kto? pom?c? :/ Wynagrodz? piwkiem + respekt.
53. Nie dziala laweta
witam mam skrypt marcina z gtao. lecz nie dziala w db3 pojawia sie komunikat ze w linjce 191 jest blad (s_lua)

s_lua:
[lua] --[[
Autor: bover.
Zakaz zmiany autora, je?li go zmienisz, to przyjedzie do ciebie bover i zje ci siusiaka :x .
--]]
pozycje = { -- x,y,z zaladowania pojazdu, y rozladowania pojazdu
[429] = {0,-0.9,0.4, 6}, -- banshee
[402] = {0,-0.9,0.6, 6}, -- buffalo
[541] = {0,-0.9,0.4,6}, -- bullet
[475] = {0,-0.9,0.4,6}, -- sabre
[457] = {0,-1.3,0.4,6}, -- caddy wozek golfowy
[568] = {0,-0.8,0.6,6}, -- bandito
[426] = {0,-0.7,0.5,6}, -- premier
[602] = {0,-0.9,0.6,6}, -- alpha
[415] = {0,-0.9,0.6,6}, -- cheetah
[480] = {0,-0.9,0.6,6}, -- comet
[562] = {0,0.9,0.6,6}, -- elegy
[587] = {0,0.9,0.6,6}, -- euros
[565] = {0,0.9,0.6,6}, -- flash
[411] = {0,0.9,0.6,6}, -- infernus
[559] = {0,0.9,0.6,6}, -- jester
[603] = {0,0.9,0.6,6}, -- pheonix
[560] = {0,0.9,0.6,6}, -- sultan
[506] = {0,0.9,0.6,6}, -- super gt
[451] = {0,0.9,0.6,6}, -- turismo
[558] = {0,0.9,0.6,6}, -- uranus
[555] = {0,0.9,0.6,6}, -- windsor
[477] = {0,0.9,0.6,6}, -- zr 350
[536] = {0,0.9,0.6,6}, -- blade
[575] = {0,0.9,0.6,6}, -- brodway
[518] = {0,0.9,0.6,6}, -- buccaner
[419] = {0,0.9,0.6,6}, -- esperanto
[534] = {0,0.9,0.6,6}, -- remington
[567] = {0,0.9,0.6,6}, -- savanna
[535] = {0,0.9,0.6,6}, -- slamvan
[576] = {0,0.9,0.6,6}, -- tornado
[412] = {0,0.9,0.6,6}, -- voodo
[496] = {0,0.9,0.6,6}, -- blista
[401] = {0,0.9,0.6,6}, -- bravura
[527] = {0,0.9,0.6,6}...
54. laczenie z db nie dziala
witam, nie dziala mi lacznosc z db a dokladniej gdy skrypt czegos potrzebuje to w db3 pokazuje sie dlugi blad :/

kod:
-- Settings
DBHandler
=nil
DBName
="nazwa"
DBUser="nick"
DBPass="haslo"
DBHost="host"

-- Functions
function dbSet(...)
    if 
not {...} then return end
    local query
=dbExec(DBHandler, ...)
    return 
query
end

function dbGet(...)
    if 
not {...} then return end
    local query
=dbQuery(DBHandler, ...)
    
local result=dbPoll(query, -1)
    return 
result
end

addEventHandler
("onResourceStart"resourceRoot, function()
    
DBHandler=dbConnect("mysql""dbname="..DBName..";host="..DBHost..""DBUserDBPass"share=1")
    if 
DBHandler then
        outputDebugString
("* Connect to server MYSQL...")
    else
        
outputDebugString("* No Connecting to server MYSQL..")
    
end
end
)

Oczywiscie luki dbPass itp sa dobrze wypisane tylko tutaj tak zrobilem bo nie chce podawac danych

blad w db3: fire-db/s_db.lua:18: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' fire-admin WHERE serial="mojserial" at line 1
55. Dashboard dziala ale nie do konca
Witam, pisze dashboard ale nie dziala, po kliknieciu w dane miejsce nie pokazuje img menu postaci

kod:

[lua]--[[
Info Author: flyBoi_
For resource: InvisibleGame
All rights reserved by InvisibleGame and flyBoi_
----------------------------------------------------
Info Autor: flyBoi_
Dla zasob?w: InvisibleGame
Wszystkie prawa zastrze?one przez InvisibleGame i flyBoi_
]]--

local amercian10 = dxCreateFont("font/american.ttf", 10)
local sx, sy = guiGetScreenSize()
wlaczone = false
aktualnie = glowna

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end

addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if wlaczone == true then
if isMouseIn(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy) then
aktualnie = postac
end
end
end
end)

addEventHandler("onClientRender", root, function(plr)
if wlaczone == true then
if aktualnie == glowna then
dxDrawImage(0/1780*sx, 0/860*sy, 1780/1780*sx, 860/860*sy, "img/db_glowna.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
--dxDrawRectangle(20/1780*sx, 250/1780*sy, 180/1780*sx, 60/860*sy, tocolor(255, 0, 0, 180)) -- to bylo pomoc...
56. Komenda nie dziala
Witam, pisze skrypt aby po napisaniu komendy tworzyl sie 3dtext, ale nie dzia?a kod:


&#65279;addCommandHandler("dodaj.opis", function(...)
local tresc table.concat(arg" ")
local xygetElementPosition(plr)
local t createElement(text)
setElementData(t"name"""..tresc.."")
setElementPosition(txyz)
end)


Db3:
Kod:

invalid value (userdata) at index 1 in table for 'concat'.


//Znacznik lua sie zepsul i pokazuje jakies &58745 (tego nie ma w kodzie)
57. Nie dziala mi respienie pojazdu
Witam chce zeby pojazd kolejny respic po paru minutach lecz cos mi to nie wychodzi..

addCommandHandler("cars",function(p,c,...)
    if 
police == getElementParent(pthen
        createVehicle
(490,(p.position p.matrix.forward 5));
    
       

    
end
end
)
58. IT'S YOUR WORLD nie dziala mi
Witam, wgra?em wszystko z IT'S YOUR WORLD na ftp a nastepnie importowalem baze danych i wszytko poszlo pomyslnie, w DB2 i ogp-db edytowalem na moje dane do mysql i po wejsciu na serwer jak klikam zarejestruj sie to jest napisane ze pomyslnie zarejestrowano ale jak dam zaloguj potem to mam ze nie ma takiego w bazie, a gdy wpisze jakis nick z bazy danych z tabelki user to pokazuje ze zle haslo wiec wydaje mi sie ze gdy robie zarejestruj te konto nie zapisuje sie w bazie danych w tym user i mam pytanie i prosbe jak to naprawic bo utkna?em na logowaniu. Dzi?kuje z g?ry za pomoc.
Dobry dzia? ?
59. nie dziala zabieranie prawka, bany
Witam, nie dzialaja mi zabieranie prawka, bany
60. Premium nie dziala
Jak w temacie premium nie zapisuje sie ani nic Your Adventure paczka
tak ta z ASA itp itd
61. Zabieranie prawa jazdy nie dziala
Witam, nie dzia?a mi zabieranie prawa jazdy, lecz jak uzyje komendy zpj to jak klikne F to pisze ze zabrane ale jak drugi raz F to juz moge wsiasc

probowalem z innymi skryptami/ z innych paczek

zdj z db3 to https://imgur.com/a/WNknLsb
62. Porownanie liczb nie dziala
Witam ! Chodzi mi o to ?e w debugscripcie mam blad systemSurvivor.lua:1542: attempt to compare number with boolean

JEST TO LINIJKA [lua]if getElementData(getLocalPlayer(), "blood") >= 9000 then
dxT = dxDrawBorderedText ( " Zdrowie",screenWidth*0.840,screenHeight*0.04, screenHeight*0.20, screenHeight*0.022, tocolor ( 0, 255, 0, 80), 0.8, 1, "bankgothic", "left", "top",false,false,false, statsWindows)
elementeat = dxDrawImage ( screenWidth*0.840,screenHeight*0.01, screenHeight*0.20, screenHeight*0.022, "img/blood/10000.png", 0, 0, 0, tocolor(0, 255, 0, 80), true, statsWindows)[/lua]

[lua]function ui ()
statsWindows = dxDrawImage ( screenWidth*0.957 , screenHeight*0.010, screenWidth*-0.12, screenHeight*0.340, "img/Fon.png",0,0,0,tocolor(0,0,0, 80))

dxDrawImage ( screenWidth*0.840,screenHeight*0.01, screenHeight*0.20, screenHeight*0.022, "img/blood/Fon.png", 0, 0, 0, tocolor(255, 255, 255, 80), true, statsWindows)

if getElementData(getLocalPlayer(), "blood") >= 9000 then
dxT = dxDrawBorderedText ( " Zdrowie",screenWidth*0.840,screenHeight*0.04, screenHeight*0.20, screenHeight*0.022, tocolor ( 0, 255, 0, 80), 0.8, 1, "bankgothic", "left", "top",false,false,false, statsWindows)
elementeat = dxDrawImage ( screenWidth*0.840,screenHeight*0.01, screenHeight*0.20, screenHeight*0.022, "img/blood/10000.png&qu...
63. Gielda, nie dziala
Witam, mam gielde z og-gielda

i jest jeden problem bo jak pr?buje sprzedac komus auto to pisze ze nie znaleziono podanego gracza:

Kod:

[lua] local LIMIT=300 -- tylko gracz mo?e kupi? trzy pojazdy

local cmd="sprzedaj.pojazd"
local cmd2="akceptuj"
local sprzedazPojazdu={}
marker2=nil
local timer=nil

local pozycjeMarkerowv2={
-- Opis nad markerem, x,y,z, int, dim
{"Gie?danSprzeda? pojazd?w", 2169.53, 1416.61, 10.82},
}

for i,v in pairs(pozycjeMarkerowv2) do
mkr=createMarker(v[2], v[3], v[4]-0.90, "cylinder", 2, 255, 11, 11, 125)
setElementDimension(mkr2, v[6] or 0)
setElementInterior(mkr2, v[5] or 0)

marker2=mkr

local t=createElement("text")
setElementData(t,"name",v[1])
setElementPosition(t,v[2],v[3],v[4])
setElementDimension(t, v[6] or 0)
setElementInterior(t, v[5] or 0)
end


function checkVehiclePlayer(plr)
-- Pobieramy tabel? i nast?pnie zwracamy j?
local result=exports["og-db"]:getRekord("SELECT * FROM og_vehicles")
local number=0
-- Uruchamiamy p?tl? spradzaj?c? pojazdy z bazy danych i
-- por?wnujemy w?a?ciciela z UID osoby kt?ra chce zakupi?
for i,v in ipairs(result) do
if result[1].ownedPlayer == getElementData(plr,"player:uid") then
number=number+1
end
end
-- Zwracamy ilo?? pojazd?w gracza je?eli nie ma zwr?ci
-- mu false.
return number
end

local function pokazOperacje(plr)
if not sprzedazPo...
64. [MYSQL] Nie dziala podpiecie mysql
A wiec tak, dostalismy owl'a odbugowanego w calosci albo 3/4, pobralismy baze z neta do owla i nie dziala, jest taki blad

[2018-06-04 15] ERROR: Unable to connect to mysql: (1045) Access denied for user 'db_32958'@'rbx2.serverproject.eu' (using password: YES)

da ktos gotowa baze albo za oplata?
65. Tune nie dziala
To tak dodalem w bazie danych w ogrpg ofice i zatrudniam sie i nie dziala chyba cos zle w mysql zrobilem
66. runcode nie dziala
Witam wpisalem runcode na dodanie konta do acl jak komend? /addaccount i nie dziala


addAccount("nick","haslo")

co mam tu zmienic aby dzialalo?
67. Nie dziala autostart
Po sci?gnieciu skryptu na autostart i odpaleniu go nie wlaczaja sie skrypty:

wyciag z konsoli

Kod:

[2018-03-13 15:58] WARNING: autostart/server.lua:14: Access denied @ 'startResource'
68. XyzzyRP Nie dziala panel logowania
Sci?g?em skrypt na rejestracje i jak nacisam stworz postac to nie ma zadnej reakcji.
Prosz? o to wyci?g z konsoli.
Je?li kto? chce pom?c moge podac haslo do ftp.

Wyci?g z konsoli:

[code][2018-03-12 15:56:22] Some files in 'lss-tempomat' use deprecated functions.
[2018-03-12 15:56:22] Use the 'upgrade' command to perform a basic upgrade of resources.
[2018-03-12 15:56:22] SyncMapElementData is now disabled
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:4: Bad argument @ 'createPed' [Expected bool at argument 6, got number '225']
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:7: Bad argument @ 'setElementDimension' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:8: Bad argument @ 'setElementInterior' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:9: Bad argument @ 'setElementFrozen' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:10: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:11: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] INFO: obiektow: 326
[2018-03-12 15:56:22] ERROR: [XyzzyRP...
69. zmienilem core i nie dziala
jak zmienilem w powitaniu Nazwe serwera to juz nie dzialalo i wgl
Kod:

addEventHandler("onPlayerJoin", root, function()
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("", source)
outputChatBox("* Witaj, je?eli jeste? nowy/a na serwerze City Center to polecamy ci poradnik pod przyciskiem F1 :) ", source)
end)
70. Skrypt do autostartu zasobow nie dziala
Sciaglem skrypt od Haze. , ale po odpaleniu tego wyskakuje mi takie cos:

Kod:


[2018-03-06 20] start: Requested by Console
[2018-03-06 20] Starting autostart
[2018-03-06 20] ERROR: autostart/server.lua:16: bad argument #1 to 'lower' (string expected, got nil)
[2018-03-06 20] start: Resource 'autostart' started



Pomo?e kto? ?

KOD:

tag 
getResourceInfo getThisResource(), "tag" )
tag tostring(tag)
addEventHandler("onResourceStop"getResourceRootElement(getThisResource()), function()
    for 
k,v in ipairs(getResources()) do
    if 
string.find(getResourceName(v), tag) or string.lower(string.find(getResourceName(v), tag)) or string.upper(string.find(getResourceName(v), tag)) then
        stopResource
(v)
        
outputDebugString(getResourceName(v).." stopped.")
    
end
    end
end
)


addEventHandler("onResourceStart"getResourceRootElement(getThisResource()), function()
    for 
k,v in ipairs(getResources()) do
    if 
string.find(getResourceName(v), tag) or string.lower(string.find(getResourceName(v), tag)) or string.upper(string.find(getResourceName(v), tag)) then
        startResource
(v)
        
outputDebugString(getResourceName(v).." started.")
        
end
    end
end
)
71. przecho nie dziala
Witam. mam problem z przecho z Owna a mianowicie jak dodam kolejne przecho to one nie chc? dzia?a?. jak doda? kolejne przecho tak by ono dzia?a?o i mo?na by?o odda? auto do przecho. Narazie jak mam tabele "przechowalnie" to tylko pierwsza dzia?a czyli LS a FC ju? nie dzia?a.

[lua]
local markers = {}

local przechowalnie = {
["LS"] = {
odbior = {1683.4189453125, -1463.4309082031, 14.429717063904-0.98},
oddaj = {1687.2406005859, -1464.8287353516, 14.061058998108-1},
respawn = {137.4479675293, 1129.0451660156, 19.870532989502, 90},

},
["FC"] = {
odbior = {-135.07150268555, 1121.0645751953, 18.7},
oddaj = {-136.4204864502, 1124.5512695313, 19.749988555908-1},
respawn = {-137.4479675293, 1129.0451660156, 19.870532989502, 90},
},

}

local vehicles = {}
local vehs = {}

for i,v in pairs(przechowalnie) do
print("Stworzono przechowalnie w: "..i)
odbior = createMarker(v.odbior[1], v.odbior[2], v.odbior[3], "corona", 1.1, 255, 255, 255, 75)
setElementData(odbior, "respawn", v.respawn)
oddaj = createMarker(v.oddaj[1], v.oddaj[2], v.oddaj[3], "cylinder", 3, 255, 75, 0, 75)

end

addEvent("wyjmij:auto", true)
addEventHandler("wyjmij:auto", resourceRoot, function(player, uid)
if not markers[player] then return end

for i,v in ipairs(getElementsByType("vehicle")) do
local id = getElementData(v, "veh:uid")
if id and id...
72. Raz dziala raz nie
Ktos powie co w tym jest zle? Kiedys cos takiego udostepni?em na internety ale nie znalaz?em tego i robie nowe xD Cos nie dziala...

Nie wiem jak to opisa? co nie dzia?a, bo raz nie dzia?a praca, raz nie dziala pickup raz nie dziala checkpoint raz nie dziala wczytywanie XD

pastebin.com/raw/QtmuLzaM
73. Nie dziala system pojemnosci w samochodach - ogrpg - aspire
Witam, posiadam problem z systemem pojemno?ci w pojazdach. Mianowicie zapisuj? si? one w bazie danych, lecz na serwerze do pojazd?w nie dodaj? si? ?aden handling.
Mo?e tutaj kto? b?dzie w stanie odszuka? b??d w skrypcie/skryptach.

Poni?ej wrzucam kody:

pojemnosc.lua
[code]function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]
if value then
return value
end
end
return false
end

function lalal(vehicle)
local pojemnosc = getElementData(vehicle,"vehicle:pojemnosc")
local engineacc = getVehicleHandlingProperty(vehicle,"engineAcceleration")
local maxspeed = getVehicleHandlingProperty(vehicle,"maxVelocity")
if getElementData(vehicle, "vehicle:pojemnosc") == 1 then
setElementData(vehicle, "vehicle:pojemnosc", 1.2)
setVehicleHandling(vehicle, "maxVelocity", velocity+3)
setVehicleHandling(vehicle, "engineAcceleration", acceleration+1)
elseif getElementData(vehicle, "vehicle:pojemnosc") == 2 then
setElementData(vehicle, "vehicle:pojemnosc", 1.4)
setVehicleHandling(vehicle, "maxVelocity", velocity+3.5)
setVehicleHandling(vehicle, "engineAcceleration", acceleration+1.25)
elseif getElementData(vehicle, "vehicle:p...
74. Nie dziala ACL
Czesc nie dziala mi admin w ACL poniewaz konto zarejestrowane mam ale admina nie mam a all dodane
ACL:

[ Dodano : 2018-02-01, 12:32 ]
<acl>
<group name="Everyone">
<acl name="Default"></acl>
<object name="user.*"></object>
<object name="resource.*"></object>
</group>
<group name="Moderator">
<acl name="Moderator"></acl>
</group>
<group name="SuperModerator">
<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
</group>
<group name="Admin">
<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
<acl name="Admin"></acl>
<acl name="RPC"></acl>
<object name="resource.admin"></object>
<object name="resource.webadmin"></object>
<object name="user.Nerix"></object>
<object name="resource.*"></object>
</group>
<group name="Console">
<acl name="Moderator"></acl>
<acl name="SuperModerator"></acl>
<acl name="A...
75. Checkpoint nie dziala
Kod:
[pawn]
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == przechoCP)
{
SendClientMessage(playerid, -1, "{FF0000}FCAR: {FFFFFF}Wszedles w cp.");
new znalezione, plik3[2048];
znalezione=0;
strcat(plik3, "{FFFFFF}", 256);
printf("debug1");
for(new i; i < 9999; i++)
{
printf("debug2");
new plik[256], plik2[256];
format(plik, 256, "/FCAR/%d.ini", i);
if(dini_Exists(plik))
{
printf("debug3");
format(plik2, 256, "%dt%st%dn", i, VehicleNames[dini_Int(plik, "Model") + 400], dini_Int(plik, "Model"));
strcat(plik3, plik2, 256);
znalezione++;
return 1;
}
}
if(znalezione <= 0)
{
printf("debug5");
SendClientMessage(playerid, -1, "{FF00 00}FCAR: {FFFFFF}Nie posiadasz zadnych pojazdow.");
}
if(znalezione > 0)
{
printf("debug6");
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CAR, DIALOG_STYLE_LIST, "{00FF00}Przechowywalnia", plik3, "Wyjmij", "Anuluj");
SendClientMessage(playerid, -1, "{FF0000}FCAR: {FFFFFF}Pokazuje auta.");
}
}
return 1;
}
[/pawn]

Debug:
[code]
[17:32:51] debug1
[17:32:51] debug2
[17:32:51] debug2
[17:32:51] debug3
[/code]

[ Dodano : 2018-01-31, 17:36 ]
//edit
W folderze scriptfiles jest /FCAR/1.ini
A w nim:
[code]
Wlasciciel=**Zakazane ;p **
Mode...
76. Nie dziala CollidableWith
[center]Witam mam problem z CollidableWith. Mianowicie chdzi mi o to ze chce zrobic aby pojazdy przenikaly przez siebie w pracy.. Ale po dodaniu funkcji CollidableWith nie tepa gracza do pojazdu. Kod jest robiony po stronie serwera. Za pomoc daje :piwo: i R*
Kod:
[lua]local m1 = createMarker(1227.81,181.58,20.41-1, "cylinder", 1.5, 0, 138, 255, 0)
local t = createElement('text')
setElementData(m1, "custom_prace", true)
setElementPosition(t, 1227.81,181.58,20.41+1.2)
setElementData(t,"name","Praca DorywczanKierowca AutobusunZarobek: 150PLN")
local vehs = {}

local code = "Autobusy"
local zone = createColCuboid(1178.59167, -1806.40845, 12.57031, 8.710205078125, 25.461059570313, 4.6140350341797)

local linie = {2,4,8}





addEventHandler("onMarkerHit", m1, function(el, md)
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end

if getElementData(el,"player:job") then return end
if #getElementsWithinColShape(zone,"vehicle") >= 1 then outputChatBox("*Parking zaj?ty czekaj a? wyjedzie!",el) return end
local x,y,z = getElementPosition(el)
local autbus = createVehicle(431, 1220.41,190.85,19.98,354.6,360.0,336.4)
setElementFrozen(el,true)
local linia = math.random(1,#linie)
setElementData(autbus, "vehicle:linia",linie[linia])
setElementData(autbus, "vehicle_job_owner", el)
...
77. Nie dziala outputChatBox
Witam mam problem z outputChatBox'em w pewnej pracy. Jak zaczne prace to po prostu outputChatBox nie dziala... daje wam kawalek kodu moze cos wam uda sie wywnioskowac, dla czego nie ma tego outputChatBoxa.
Kod:
function nielegalna (theplayer)
        if 
getElementData (theplayer"oddalall") == true then
            local pojazd 
createVehicle (482, -1723.16,-85.07,3.68,359.2,0.2,132.6)
            
warpPedIntoVehicle (theplayerpojazd)
            
setVehiclePlateText (pojazd"DOSTAWCA")
            
setVehicleColor (pojazd000)
            
setElementData (pojazd"vehicle:desc""Praca NIE LEGALNA")
            
addVehicleUpgrade (pojazd1025)
            
setElementData (theplayer"oddalall"false)
            
setElementData (theplayer"dojazdnielegalna"true)
            
outputChatBox ("* Wybra?es prace nie legaln?! Udaj sie do pistoletu na mapie!"theplayer255255255)
    
end
78. Skrypt nie dziala
Siema robie serwer zabawy i pisalem skrypt na duty chatmoda i nie dziala
Wiecie w czym problem?


function zalogDuty(plrcmd)
local accName getAccountName (getPlayerAccount (plr))
    if 
accName then
        
if isObjectInACLGroup("user."..accNameaclGetGroup("chatmod")) then
        setElementData
(plr"gracz:dutycm")
        
giveWeapon(plr28100)
       
setElementHealth(plr100)
       
end
       outputChatBox
("****Gratulacje zalogowac, chatmoda! Powodzenia"plr)
       else 
       
outputChatBox("Niestety, nie jestes uprawniony"plr)
        
end
    end 
end
addCommandHandler
("dutycm"zalogDuty)
79. Praca nie dziala
Prosze powiedzcie mi co tu jest zle bo nie mam sil :/ (chcialbym aby na komende /praca usuwaly sie te wszystkie elementy)

function praca ( praca )
if getElementData(source,"AGJob") == "postman" then
local player = getPlayerFromName(getElementData(source,"JobOwner"))
if isElement(ptVehicle[player]) then
destroyElement(ptVehicle[player])
end
if isElement(ptVehicleBlip[player]) then
destroyElement(ptVehicleBlip[player])
end
if isElement(ptJobMarker[player]) then
destroyElement(ptJobMarker[player])
end
if isElement(ptJobBlip[player]) then
destroyElement(ptJobBlip[player])
end
if isElement(newMarker[player]) then
destroyElement(newMarker[player])
end
if isElement(nMBlip[player]) then
destroyElement(nMBlip[player])
end


ptNumber[player] = nil
setElementData(player,"AGJob",nil)
setElementModel (player, "0",nil)
end

addCommandHandler ( "praca", praca )
80. tablica nie dziala
Witam, co w tym kodzie jest nie tak? Chcia?bym, ?eby w miejscach podanych w tablicy i po wpisaniu /testx tworzy? si? marker.
Kod:
local tablica = {
{
1803.988041543.887946.74199},
{
1807.866821595.325076.25253},
{
1808.740111628.408816.25906},
{
1809.565061659.209476.26056},
{
1810.813601705.870366.26084},
}

addCommandHandler("testx", function(plr,cmd)
    
createMarker(tablica[1], tablica[2], tablica[3], "checkpoint"3)
end)