Czesc, przychodze z problemem takim, gdzie przy tworzeniu organizacji przestepczej komendą, trzeba restartowac skrypt z organizacjami, po reconnect i tak znika. W db2 nie ma błędu tylko czasem wyskakuje [img]https://imgur.com/a/KD5Kp2h[/img]
tutaj kod z organizacji po stronie clienta i servera client -
[lua]local sx, sy = guiGetScreenSize()
local zoom = exports["borsuk-gui"]:getZoom()
local font1 = exports["borsuk-gui"]:getFont("Lato-Regular", 15/zoom)
local font2 = exports["borsuk-gui"]:getFont("Lato-Regular", 18/zoom)
local font3 = exports["borsuk-gui"]:getFont("Lato-Regular", 13/zoom)
Witam nie dzia?a mi przepisywanie aut na moj? organizacj? nie wiem czemu w db3 nie ma nic:
s_org:
[code]
--[[
Developed by Yolos . You dont have agree to use this code! ;3
]]
function refreshgui(element)
local uid=getElementData(element,"player:sid")
if not uid then return end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?", uid)
triggerClientEvent(element, "org:refresh", resourceRoot, result)
end
addEvent("org:check", true)
addEventHandler("org:check", resourceRoot, function(id,name)
-- Pobieramy SID gracza
local uid=getElementData(client,"player:sid")
if not uid then return end
-- Sprawdzamy czy jest jeszcze w?‚a?›cicielem
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND ownedPlayer=?", id, uid)
if #result < 0 then
outputChatBox("#ff0000âś #ffffffNie jeste?› w?‚a?›cicielem pojazdu.", client, 255, 0, 0, true)
return
end
local org = getElementData(client,"player:organization")
if not org then outputChatBox("* Nie jeste?› w organizacji !",client,255,0,0) return end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND parking=0", id, org)
if #result > 0 then
outputChatBox("#ff0000âś #ffffffPojazd nie znajd...
Witam a wi?c robie serverek z koleg?, i mam problem taki i? gdy zrobie organizacje po czym wyjde i wejde na server nie ma jej a w bazie danych jest prosze o piln? pomoc
PROBLEM POLEGA NA TYM, ZE ZAKLDAM ORGANIZACJE PO ZROBIENIU RECONNECTA JEST BRAK ORGANIZACJI ALE W BAZIE DANYCH JEST ALE W GIERCE JEJ NIE MA WIEC SIE NIE ZAPISUJA PROSZE DAJE LINJKI W LOGOWANIU Z WCZYTANIEM ORG
local org = exports["nrpg_db"]:dbGet("SELECT * FROM pystories_organizacje WHERE uid=? LIMIT 1", getElementData(client,"new:sid")) -- pobieramy tylko JEDEN rekord if org and #org > 0 then setElementData(client, "player:organization", org[1].code) local orgtag = exports["nrpg_db"]:dbGet("SELECT * FROM pystories_organizacje_info WHERE nazwa=? LIMIT 1", org[1].code) -- pobieramy tylko JEDEN rekord if orgtag and #orgtag > 0 then setElementData(client, "player:organizationtag", orgtag[1].tag) outputChatBox("??” #ffffffJestes w organizacji "..org[1].code.." ("..orgtag[1].tag..")", client, 0, 255, 0, true) exports['nrpg_db']:dbSet("UPDATE pystories_organizacje SET aktywny=curdate() WHERE uid=?", getElementData(client,"new:sid"))
Witam, mam problem u?ywam paczki EggRPG gdzie s? tam org przestepcze od dmta
by?a tam luka w sql doda?em potrzebne tabelki bo wyskakiwa? b w debugscipt
teraz baza od dmta czyli inaczej "dmta_xdb" wczytuje si? elegancko. p polega na tym ?e zwyk?? organizacje wiem jak stworzy? a przestepcza juz nie, fajnie by by?o jak by kto? wyt?umaczy? <3 dam piwko
Witam pisz? skrypt pod przepisywanie pojazd?w.
natomiast.
zrobi?em przycisk przepisywania i on nie przepisuje mi pojazdu na moj? organziacje. KOD:
addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then
if office2_draw_menu == true then
if isMouseIn(855*px, 720*py, 203*px, 64*py) then
triggerServerEvent("org:check", resourceRoot, id, name)
local selectedRow=guiGridListGetSelectedItem(wm.gridlist)
if selectedRow < 0 then return end
local id=tostring(guiGridListGetItemText(wm.gridlist, selectedRow, 1))
local name=tostring(guiGridListGetItemText(wm.gridlist, selectedRow, 2))
end
end
end
end)
sam skrypt opieram na podstawie pysa.
[ Dodano: 2020-07-15, 07:09 ]
naprawi?em, do usuni?cia.
Witam wiecie jak zrobi? brame na cz?onk?w organizacji? Chodzi mi o to ?e jak osoba z mojej organizacji podejdzie do bramy to si? otwiera, a jak odejdzie - zamyka. Daje
Witam mam mianowicie problem taki, ?e po przepisaniu auta do organizacji.
( Tak s?ysza?em bo nie widzia?em na oczy ) To potem gracz nie mo?e kupowa? aut,
Nie widzi ich w przechowywalni itd. G??wny problem niby polega w przechowywalni.
Wy?le tutaj lua na przepisywanie i przechowywalni i wy?le co mi si? pokazuje w bazie, je?li gracz wchodzi do blipu.
> Je?li gracz wejdzie do blipu ( ten kt?ry przepisa? auto na org )
[18-10-20 16:00:42] ERROR: [Skrypty]/pystories-parking/s_parking.lua:32: attempt to get length of local 'result' (a boolean value)
[18-10-20 16:00:42] WARNING: [pystories]/[Bazydanych]/pystories-db/s_db.lua:18: dbPoll failed; Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
A tutaj jest kod na przecho i urzad.
Przecho >
[lua]
local marker=createMarker(-2668.60, 6.46, 4.35-2, "cylinder", 6.4, 255,255,255,20)
createBlip(-2668.60, 6.46, 4.35, 35,2,0,0,0,0,0,250)
local mdestroy = createColCuboid(-2672.3869628906, 3.2640442848206, 3.3535442352295, 6.25,7.25,2.5)
local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-2668.60, 6.46, 4.35)
addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local sid=getElementData(source,"player:sid")
if not sid then return end
local org = ...
Cze?? posiadam wgrane dwa osobne skrypty, jeden na zarz?zdanie panelem organizacji z paczki pystories (mam t? paczke wgran? w serwer) i drugi z jakiego? innego serwera z ogrpg chyba, na za?o?enie organizacji w urzedzie, problem jest taki ?e nie dzia?a komenda jak to pisze w skrypcie: /panel.organizacji, nic si? nie wy?wietla po wpisaniu a powinien by? panel:
kod:
[lua] local zaproszenia = {}
local max_people_in_org = 55 ---- MAKSYMALNA LICZBA LUDZI W ORGANIZACJI!
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
for _,thePlayer in ipairs(getElementsByType("player")) do
if getElementData(thePlayer,"player:sid") == tonumber(cel) then target = thePlayer end
end
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("* Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end
addEvent("lidero:editUser", true)
addEventHandler("lidero:editUser", resourceRoot, function(text,rank,faction)
local result1=exports["pystories-db"]:dbGet("SELECT * FROM pystories_user...
Witam, posiadam paczke z PYSA, oraz mam wgrany skrypt na organizacje, w sensie w tym skrypcie jest wypisane ?e wgrywa panely liderskie, wyrzucanie itd cz?onk?w organizacji. Lecz nie widz? w urz?dzie pystories-office, markerku z tworzeniem organizacji, lub jako? inaczej si? tworzy organizacje? pomo?ecie?
pystories-ms-organizacje:
s_zarzadzanie: [lua] local zaproszenia = {}
local max_people_in_org = 55 ---- MAKSYMALNA LICZBA LUDZI W ORGANIZACJI!
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
for _,thePlayer in ipairs(getElementsByType("player")) do
if getElementData(thePlayer,"player:sid") == tonumber(cel) then target = thePlayer end
end
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("* Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end
addEvent("lidero:editUser", true)
addEventHandler("lidero:editUser", resourceRoot, function(text,rank,faction)
local result1=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?"...
Witam!
Mam problem z organizacjami, a dok?adniej chcia?em ogarnac jakies fajne tworzenie organiazcji na pysa, ale mam problem, poniewa? gdy tworze org, to wyskakuje mi jakis error w db3. Pom?g?by kto??
db3:
ERROR: organizacje/s.lua:49 attemp to index global 'source; (a userdata value)
Linijka 49:
[lua]
local uid = source:getData("player:sid")
[/lua]
ca?y kod:
[lua]
local data = {cost = 250000}
function refreshgui(element)
local uid = element:getData("player:sid")
if not uid then return false end
local result = exports["DB2"]:dbGet("SELECT pystories_vehicles.model,pystories_vehicles.id,pystoriesvehicles.ownedGroup,ogrpg_organization_list.name FROM pystoriesvehicles left join ogrpg_organization_list on ogrpg_organization_list.id=pystories_vehicles.ownedGroup WHERE ownedPlayer=?", uid)
triggerClientEvent(element, "org:refresh", resourceRoot, result)
end
addEvent("org:download", true)
addEventHandler("org:download", resourceRoot, refreshgui)
addEvent("org:check", true)
addEventHandler("org:check", resourceRoot, function(id, name)
local uid = client:getData("player:sid")
if not uid then return false end
local result = exports["DB2"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND ownedPlayer=?", id, uid)
if #result < 0 then
return triggerClientEvent(client, "onClientAddNotification", client,...
Jeszcze 1 pytanie do organizacji.
[lua] local result1=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", text)
if not result1 or #result1 < 0 then outputChatBox("* Podany u?ytkownik nie istnieje w bazie danych.", client, 255, 0, 0) return end
local result2=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE code=? AND uid=? LIMIT 1;", faction, text) -- pobieramy tylko JEDEN rekord
if not result2 or #result2 < 0 then outputChatBox("*Podany u?ytkownik nie znajduje si? w tej organizacji",client,255,0,0) return end
local ranke=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE code=? AND uid=? LIMIT 1;", faction, getElementData(client,"player:uid")) -- pobieramy tylko JEDEN rekord
if not ranke or #ranke < 0 then outputChatBox("*Nie znajdujesz si? w tej organizacji!",client,255,0,0) return end
if tonumber(ranke[1].rank) <= 3 and (tonumber(rank) > 2) then outputChatBox("*Posiadasz za ma?? range!",client,255,0,0) return end
local query1=exports["ogrpg-db"]:dbSet("UPDATE ogrpg_organizations SET rank=? WHERE uid=? AND code=?", rank, text, faction)
if query1 then
local resulted=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE code=?", faction)
triggerClientEvent(client,"lidero:refresh",resourceRoot,resulted)
outputChatBox(...
Witam, ot?z posiadam taki problem i? normalnie organizacje dzia?aj? lecz gdy przepisuje pojazd na organizacje i z niej odejde lub zostane wyrzucony to moje pojazdy w niej zostaja i mozna nimi jezdzic. Za pomoc stawiam
s.zarz?dzanie
[lua]local zaproszenia = {}
local max_people_in_org = 55 ---- MAKSYMALNA LICZBA LUDZI W ORGANIZACJI!
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
for _,thePlayer in ipairs(getElementsByType("player")) do
if getElementData(thePlayer,"player:sid") == tonumber(cel) then target = thePlayer end
end
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("* Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end
addEvent("lidero:editUser", true)
addEventHandler("lidero:editUser", resourceRoot, function(text,rank,faction)
local result1=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE id=?", text)
if not result1 or #result1 < 0 then outputChatBox("* Podany u?ytkownik nie istnieje w ba...
Witam, Pobra?em paczk? Your Adventure 2.3. I mam problem z organizacjami.
1.Nie chce mi si? ustawi? marker w urz?dzie do zak?adania org.
2.Gdy dodaje do Mysql to i tak nie jestem w org HELP.
Witam, Pobra?em gm'a FutureCityStories, pod??czy?em pod mysql i organizacje mi nie dzia?aj?.Wydaj? mi si? ?e wszystko zrobi?em dobrze. Prosz? o szybk? odpowied?.
Pomo?e mi kto? zrobi? org na paczce OWN bo chce zrobi? serwer na tej paczce.
Ale nie dzia?aj? mi Organizacje.
Tak wiem, ?e nie ten dzia? tylko potrzebuje szybko pomocy.
Napiscie w jakim skrypcie jest b??d i jak go naprawi? b?d? wdzi?czny.
Zrobi?em takie ?eczy ale i tak nie dzia?a?o:
-doda?em si? do organizacji.
Oto kody
[lua]--[[
System kont graczy w oparciu o MySQL
@author value <[email protected]>
Nie masz prawa u?y? tego kodu bez mojej zgody
]]
addEvent("onPlayerAccountLogin", true)
local defpos = "-1503.07,920.32,7.19, 90, 0, 0" -- Domy?lna pozycja musi by? w stringu!
function auth(username, password)
if not username then
exports.rpg_noti:createNotification(source, "error", "B??d podczas pr?by logowania, zg?o? to administratorowi na forum [ERR01]")
return
end
if not password then
exports.rpg_noti:createNotification(source, "error", "B??d podczas pr?by logowania, zg?o? to administratorowi na forum [ERR02]")
return
end
local q = exports.rpg_mysql:mysql_query("SELECT * FROM rpg_accounts WHERE username=? AND password=?", username, md5(password))
if #q > 1 then -- Znaleziono wi?cej ni? 1 usera o podanej kombinacji loginu i has?a
exports.rpg_noti:createNotification(source, "error", "B??d podczas pr?by logowania, zg?o? to administratorowi na forum [ERR03]")
elseif #q < 1 then -- Nie znaleziono ?adnego usera o podanej ko...
Witam, mam pewien problem poniewa? posiadam skrypt na organizacje i tabele do niego i itp. - Dzisiaj zrobi?em koledze organizacje i co? mu nie dzia?a, a natomiast moja organizacja wszystko dzia?a. Jestem pewien ?e wszystko dobrze uzupe?ni?em.
Z MYSQL:
Noi moja organizacja z ID 2 dzia?a a z ID 5 nie, prosz? o pomoc.
Witam. M?j problem pochodzi o tym ?e... na serwerze dzia?a premka a org nie a jak zabiore komus prawo jazdy to moze wsiadac do pojazdu wszystko wgra?em modu? tez owszem mam wgrany nwm o co chodzi a acl itd mam tez dodane /k i /b tez dziala :?
Witam mam problem z kodem wykonanym przez Malentasa chodzi o to ze jak wchodz? w marker ?eby mnie tp do int to mi wyskakuje gui za?o?enia organizacji pierwszy raz sie z takim b??dem spotykam wiec prosz? o pomoc z tym.
S:
[lua]local markerek = createMarker(-218.43,1406.58,27.77-2, "cylinder", 1.5, 128, 160, 0)
setElementInterior(markerek, 18)
addEvent("zalozs", true)
addEventHandler("zalozs", root, function(nazwa)
if tonumber(getElementData(source, "player:hours")) < 300 then
outputChatBox("Nie posiadasz 5h(300min) online",source)
return
end
if getElementData(source, "player:organization") then
outputChatBox("Posiadasz organizacje",source)
return
end
if tonumber(getPlayerMoney(source)) < 99999 then
outputChatBox("Nie sta? cie na za?o?enie organizacji",source)
return
end
takePlayerMoney(source,100000)
setElementData(source, "player:organization", nazwa)
exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_organizations SET uid=?, code=?, rank=?", getElementData(source, "player:uid"), nazwa, "4")
outputChatBox("Pomy?lnie za?o?y?e? organizacje o nazwie "..nazwa.." koszt 100000 PLN.", source, 0, 255, 0)
end)
-------------------------------------------------------------------------------------------------------------------------------------------
wejscie = createMarker (693.61,1967.69,5.54+1, "arrow",...
Czesc problem polega na tym i? jak wlacze premium to organizacje sie wylaczaja.. jak wylacze premke to organizacje sie wlaczaja.. wiecie moze o co chodzi? to podobno w ogrpg-core sie tam cos robi ale ja tego nie umiem i zrobi? by mi ktos zeby to dzia?a?o? pls
Mam problem bo mam skrypt organizacje ogrpg i jest po??czony z Msql itp ale jak si? dodaje w Msql to pisze nie jeste? w organizacji i nie ma db wiecie Czm?
Witam i? na serwerze mam skrypt na ORGANIZACJE z It's your world i kompletnie nie wiem jakie s? do tego skryptu komendy?! Czy mogliby?cie pom?c? Bardzo Prosz?.
[lua]local zaproszenia = {}
local max_people_in_org = 15 ---- MAKSYMALNA LICZBA LUDZI W ORGANIZACJI!
function findPlayer(plr,cel)
local target=nil
if (tonumber(cel) ~= nil) then
for _,thePlayer in ipairs(getElementsByType("player")) do
if getElementData(thePlayer,"player:uid") == tonumber(cel) then target = thePlayer end
end
else -- podano fragment nicku
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), cel:lower(), 0, true) then
if (target) then
outputChatBox("Znaleziono wiecej niz jednego gracza o pasujacym nicku, podaj wiecej liter.", plr)
return nil
end
target=thePlayer
end
end
end
if target and getElementData(target,"p:inv") then return nil end
return target
end
addEvent("lidero:editUser", true)
addEventHandler("lidero:editUser", resourceRoot, function(text,rank,faction)
local result1=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", text)
if not result1 or #result1 < 0 then outputChatBox("* Podany u?ytkownik nie istnieje w bazie danych.", client, 255, 0, 0) return end
local result2=exports["ogrpg-d...
Mam all podpi?te pod baze danych skrypt na organizacje te? mam odpowiednie exporty s? w mysql dodany jestem lecz jak wbije na serwer to pisze ze nie jestem w zadnej organizacji. Prosze o szybk? odpowie?!
Witam mam problem z organizacjami z YA chodzi o to ze jak ustawie spawn organizacji w MySQL to normalnie przy logowaniu mog? sie zrespi? w bazie a jak wpisuje komend? np.opusc to mi wyskakuje ze nie nalez? do gangu.
c_zarzadzanie:
[lua]local wm={
window={},
added={},
edit={},
close={},
delete={},
gridlist={},
faction=nil,
}
Witam mam taki problem z skryptem na organizacje z paczki ya chodzi o to ze jak wgram ten skrypt i jestem dodany do org w mysql i si? loguje to nie mam ?adnych uprawnie?.
c_zarzadzanie:
[lua]local wm={
window={},
added={},
edit={},
close={},
delete={},
gridlist={},
faction=nil,
}
Witam mam taki problem z skryptem na organizacje z paczki NewWorldRPG chodzi o to ze jak wygram na serwer uzupe?ni? mysql to jak sie loguje na serwer to nienale?e do ?adnej organizacji.
c_zarzadzanie:
[lua]local wm={
window={},
added={},
edit={},
close={},
delete={},
gridlist={},
faction=nil,
}
Witam, mam pytanie odno?nie organizacji z gm YA 3.0 b?d? IYW. Czy kto? ju? to ogarn??? wie jak to uruchomi?? problem polega na tym ze skrypt nie zczytuje z sql czy gracz jest w organizacji. w scoreboardzie w tabeli tak?e nie ma nazwy organizacji. db podpi?te,w db3 ?adnych b??d?w nie ma, prosi? bym o komentarze os?b kt?re mia?y z tym problem i sobie poradzi?y. zale?y mi na jak najszybszym rozwi?zaniu problemu. za pomoc nagradzam i