Witam. Przeinstalowa?em sobie MTA i teraz jak pr?buje doda? panel admina w pliku acl to po uruchomieniu lokalnego serwera on z tego pliku znika. Przedtem jak dodawa?em funkcje odpowiedzialn? za panel to tam zawsze by?a, a teraz co? nie chce. Mo?e kto? wie o co z tym chodzi?
A wi?c tam jak kogo? banuje to wyrzuca go z serwera ale za to mo?e wej?? na serwer i w konsoli mu pisze kto go zbanowa? na ile i pow?d,powodem pewnie jest panel logowania ale nie wiem jak to zrobi? zeby dzia?a?o
Prosz? o szybk? pomoc
Dodaje skrypt na panel logowania https://www98.zippyshare.com/v/XWjv8aFf/file.html
Siema mam problem jak daje komu? premk? komendom to nie dzia?a tylko jak rc zrobi to wszystko dzia?a. Za pomoc postawie piwo
[lua]function loadPlayerData(plr)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", getElementData(plr,"player:uid"))
if result and #result > 0 then
local v=result[1]
setPlayerMoney(plr,v.money)
setElementModel(plr,v.skin)
setElementData(plr,"status","Aktywny")
setElementData(plr,"user:nickname",v.login1)
setElementData(plr,"player:logged",true)
--setElementData(plr,"player:shoe",toJSON(v.prize))
setElementData(plr,"player:license:pjA",v.pjA)
setElementData(plr,"player:license:pjB",v.pjB)
setElementData(plr,"player:license:pjC",v.pjC)
setElementData(plr,"player:license:pjL",v.pjL)
setElementData(plr,"player:reputation",v.reputation)
setElementData(plr,"player:workinjob",v.worker)
setElementData(plr,"player:registerdate",v.registered)
setElementData(plr,"player:hours",v.hours)
setElementData(plr,"p:title",v.rp_tytul)
setElementData(plr,"nanky:x",v.nankyx)
setElementData(plr,"nanky:y",v.nankyy)
setElementData(plr,"nanky:z",v.nankyz)
-...
Siema mam problem daje premke tylko jak kto? dostanie nie wczytuje si? od razu
[lua]addCommandHandler("vip",function(plr,cmd,cel,dni)
if exports['dutyadmin']:getAdmin(plr,7) then
if not cel then outputChatBox("/komenda [gracz] [dni]",plr) return end
if not dni then outputChatBox("/komenda [gracz] [dni]",plr) return end
if not tonumber(dni) then outputChatBox("/komenda [gracz] [dni]",plr) return end
local target=exports["ogrpg-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setPremiumDay(target,dni)
outputChatBox("Nadano konto premium na "..dni.." dni!", plr, 255, 8, 0)
outputChatBox("Otrzymales konto premium na "..dni.." dni!", target, 255, 8, 0)
outputChatBox("Aby wszystko dzia?a?o wykonaj reconnect", target, 255, 8, 0)
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
end
end)[/lua]
A TUTAJ CORE
[lua]function loadPlayerData(plr)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?", getElementData(plr,"player:uid"))
if result and #result > 0 then
local v=result[1]
setPlayerMoney(plr,v.money)
setElementModel(plr,v.skin)
setElementData(plr,"status","Aktywny")
se...
Witam, ot?? wykorzystuj? pewn? animacje, po kilku sekundach, gui si? w??cza(powoli, na spokojnie alpha si? podwy?sza), aczkolwiek gdy chcemy wy??czy?, to ju? tej animacji nie ma.
local a = interpolateBetween(0,0,200,200,0,255,((getTickCount()-tick)/2600),"Linear")
Siemam mam problem jak wchodz? w marker nie rozpoczyna si? praca za pom?c postawie piwo
Client:
[lua]addEventHandler("onClientMarkerHit",resourceRoot,function(el,dim)
if el~=localPlayer and dim then return end
if getElementType(el) ~= "player" then return end
if getPedOccupiedVehicle(el) then return end
if getElementData(localPlayer,"player:license:pjC") ~= 1 then
exports.noti:showBox("warning", "Aby tu pracowa? potrzebujesz prawo jazdy kategorii C.")
return
end
end)[/lua]
Server:
[lua]addEventHandler("onMarkerHit", m, function(el,dim)
if getElementType(el) ~= "player" and dim then
if getElementData(el,"player:job") then
outputChatBox("* Ju? posiadasz aktywn? prac?: "..getElementData(el,"player:job"),el,255,0,0)
return
end
local veh=createVehicle(getVehicleModelFromName("Benson"), -1755.09, 951.63, 24.74, 359.4, 359.9, 270.0)
setElementData(veh,"vehicle:desc","Praca Kuriera")
setElementData(veh,"temporary", true)
setElementData(veh,"spawnedBy", el)
setElementData(veh,"vehicle:mileage",0)
setElementData(veh,"vehicle:fuel",120)
warpPedIntoVehicle(el,veh)
setElementData(el,"playerr","Kurier")
triggerClientEvent(el, "benson:startJOB",...
Witam ot?? owa praca g?rnika nie daj? pieni?dzy pomo?e ktos?
KOD
[lua]local weapon_id = 7
local category_animation = "BASEBALL"
local digging_animation = "bat_4"
str=""
local t=createElement("text")
setElementData(t,"name",str)
setElementPosition(t,-981.93, -1361.30, 116.80+4)
function aktualizujText()
local q=exports["ogrpg-db"]:dbGet("select * from job_top_gornik order by ilosc desc limit 10")
str=""
for i,v in ipairs(q) do
iii=i
local nick=exports["ogrpg-db"]:dbGet("select login,login2 from ogrpg_users where id=?", v["uid"])
for i2,v2 in ipairs(nick) do
if i2 < 1 then return end
if v2["login2"] == false then
str=""..str.."n"..iii..". "..v2["login"].." - "..v["ilosc"].." wydobytych surowc?w"
else
str=""..str.."n"..iii..". "..v2["login2"].." - "..v["ilosc"].." wydobytych surowc?w"
end
end
end
setElementData(t, "name", str)
end
setTimer(aktualizujText, 10000, 0)
function give_weapon()
giveWeapon(source, weapon_id, 1)
setPedWeaponSlot(source, 1)
end
addEvent("kilof", true)
addEventHandler("kilof", getRootElement(), give_weapon)
function animation()
setPedAnimation(source, "BASEBALL", "Bat_4")
end
addEvent("animation"...
Tak jak w temacie nie musze chyba przedstawia? kodu kazdy go zna czekam na odpowied? w debugu wyskakuje kickplayer jago warning ale nic si? nie dzieje z graczem
Mam co? nie tak z syrenami Dzwi?kowymi do OSP nie wiem dlaczego nie dzia?a
o to kodzik
[lua]
addEvent("broadcastSound3D", true)
addEventHandler("broadcastSound3D", root, function(sound,range,minrange, bliskiKomunikat, dalekiKomunikat)
local el=source
if getElementDimension(localPlayer)~=getElementDimension(el) then return end
if getElementInterior(localPlayer)~=getElementInterior(el) then return end
local x,y,z=getElementPosition(localPlayer)
local x2,y2,z2=getElementPosition(el)
local dist=getDistanceBetweenPoints3D(x,y,z,x2,y2,z2)
if dist<range*2 then
if bliskiKomunikat and minrange and dist<minrange then
triggerEvent("onCaptionedEvent", root, bliskiKomunikat, 10)
outputChatBox(" * " .. bliskiKomunikat)
elseif dalekiKomunikat and dist<range then
triggerEvent("onCaptionedEvent", root, dalekiKomunikat, 10)
outputChatBox(" * " .. dalekiKomunikat)
end
local s=playSound3D(sound, x2,y2,z2)
setSoundMinDistance(s, minrange or 5)
setSoundMaxDistance(s, range)
end
end)
local soundSwitch_lu=getTickCount()-2000
local function soundSwitch()
outputDebugString("sw0")
if getTickCount()-soundSwitch_lu<2000 then return end
soundSwitch_lu=getTickCount()
local pojazd=getPedOccupiedVehicle(localPlayer)
outputDeb...
Siema zrobi?em wszystko dobrze i powinno dzia?a ale c?? co? musia?o si? sta? i nie wiem co jest ?le.
Za pomoc postawie piwo
Serwer:
function isPlayerInFaction1(plr) local sid=getElementData(plr,'player:sid')
if not sid then return end
local result=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;', "SARA", sid)
if result[1] then return true else
return false
end
end
local bramaSARA = createObject(971, -489.29,-562.46,25.52, 0, 0, 180) local bramaSARAm = createMarker(-488.72,-561.89,25.52, "cylinder", 8, 255, 255, 255, 0)
addEventHandler("onMarkerHit", bramaSAPD, function(el)
if not isPlayerInFaction1(el) then return end
local px, py, pz = getElementPosition(bramaSARA) moveObject(bramaSARA, 4000, px, py, pz-15) end)
addEventHandler("onMarkerLeave", bramaSAPDm, function(el)
if not isPlayerInFaction1(el) then return end
moveObject(bramaSARA, 4000, -488.72,-561.89,25.52) end)
Siema mam problem wszystko dobrze jest zrobione pod pys 3.0 i nie dzia?a macie doda?em si? do SAMD i nie dzia?a to o co chodzi mo?ecie pom?c postawie piwo
[lua]unction isPlayerInPomocFaction(plr)
local uid=getElementData(plr,'player:sid')
if not uid then return end
local result=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;', "SASD", sid)
if result[1] then
return true
else
return false
end
end
addEventHandler('onMarkerHit', marker, function(el,md)
if isPlayerInPomocFaction(el) then
if not getElementData(el,'player:duty') then
setElementModel(el,6)
--setPlayerNametagColor(el,255,255,0)
exports['pystories-frakcja-ustawienia']:rozpocznijnaliczanie(el)
setElementData(el,'player:duty','SASD')
local rank = exports['pystories-frakcja-ustawienia']:getPlayerFactionRank(el,'SASD')
setElementData(el,"player:rank",rank)
setElementData(el,"last:nick",getPlayerName(el))
setElementData(el,"last:color",tostring(getPlayerNametagColor(el)))
setPlayerName(el,"#FF7100"..getPlayerName(el):gsub("#%x%x%x%x%x%x",""))
else
exports['frakcja']:zatrzymajnaliczanie(el)
setElementData(el,'player:duty', false)
setElementData(el,"player:rank",false)
local skin=getElementData(el,"player:skin")
setElementModel(el, skin)
setPlayerName(el,getElementData(el,"last:nick"))
end
else
...
function endOfWork()
if destinationMarker and isElement(destinationMarker) then
destroyElement(destinationMarker)
destinationMarker = nil
end
if destBlip and isElement(destBlip) then
destroyElement(destBlip)
destBlip = nil
end
end
function takeFurniture(he, md, plr)
if he ~= localPlayer then return end
if not getPedOccupiedVehicle(he) then return end
local car = getPedOccupiedVehicle(he)
if getElementData(car, "pojazd_opis") == "Dostawca Gazu - Firma GAZOL" then
if getElementData(he, "zaladowany") == false then
setElementFrozen(car,true)
outputChatBox("* Ladujesz Butle z gazem na pake. Prosze Czekac!", 255, 255, 255)
setTimer(function()
setElementData(car, "pojazd_opis", "Dostawca Gazu - Firma GAZOL")
...
Cze?? ! Mam malutki k?opot poniewa? po wpisaniu komendy nie respi mi pojazdu :
addCommandHandler("kupauto", function(plr) local veh = getPedOccupiedVehicle(plr)
if not veh or not getElementData(veh, "wSalonie") then outputChatBox("Nie jeste? w poje?dzie na sprzeda?!", plr) return end if not getElementData(veh, "cena") then return end
outputChatBox("Kupi?e? pojazd marki " .. getVehicleName(veh) .. ", gratulacje!", plr) local kupiles = createVehicle(getVehicleName(veh),1465.57, -1729.80, 13.06, 360.0, 360.0, 88.4) -- tu te? mo?esz
Z g?ry dzi?ki
[ Dodano: 2018-09-09, 20:19 ]
DB 3 : WARNING: [skrypty]elife-salon_lssalon.lua:27: Expected number, got non-convertible string. This warning may be an error in future versions
[lua]
local szept = {}
local maxznak = 150
local czaswyswietlanianadglowa = 10000
local maxilosclini_nadglowa = 3
function getSzept(p)
if szept[p] then
return "n#DDDDDD"..table.concat({unpack(szept[p])},"n")
end
return ""
end
addCommandHandler("l",function(p,c,...)
if isPlayerMuted(p) then
return outputChatBox("Zosta?e?/a? uciszony/a!",p);
end
local t = table.concat({...}," ")
if #t > maxznak then return outputChatBox("szept nie moze by? d?u?szy niz "..maxznak.." znak?w",p,255,0,0) end
table.insert(szept[p], t)
if #szept[p] > maxilosclini_nadglowa then table.remove(szept[p],1) end
local pp = createColSphere(p.position,15)
local txt = string.format("%s*SZEPT* [%d] %s #AAAAAA%s",string.format("#%.2X%.2X%.2X",getPlayerNametagColor(p)),
p.sampid,p.name,t);
outputServerLog(txt);
for _,plr in pairs(getElementsWithinColShape(pp,"player")) do
outputChatBox(txt,plr,255,255,255,true)
end
pp:destroy()
Witam mam zakup vip przez strone serverproject.pl i gdy podaje kod pisze ?e hosting nie odpowiada co moze byc nie tak ?
Za pomoc daje Piwo i repe !
strona servera:
[lua]
local evip = createElement("VIP","VIP");
local vippos = {}
local buycost = {
-- CENA NETTO , ILE DNI VIP
{1, 2},
{2, 7},
{3, 7},
{4, 15},
{5, 15},
{6, 30},
{9, 30},
{19, 80},
{25, 125}
}
--k6k244
local function queryphp(r,e,client,k,n)
if e == 0 then
outputServerLog("VIPresponsehttp: money:"..buycost[n][1].." "..client.name..":key: "..k.." => "..r)
--triggerClientEvent(p,"ResVipTestKey",p,r)
local rtabvip = fromJSON(r);
if rtabvip.status == "ok" then
triggerClientEvent(client,"ResVipTestKey",client,"OK: KOD POPRAWNY: OTRZYMUJESZ KONTO VIP NA OKRES "..buycost[n][2].." dni")
if client.isvip then
outputDebugString("if client.isvip ".. client.name .." => "..client.vip.." + "..getRealTime().timestamp + (buycost[n][2] * 86400));
client.vip = client.vip + getRealTime().timestamp + (buycost[n][2] * 86400)
else
client.isvip = true
client.vip = getRealTime().timestamp + (buycost[n][2] * 86400)
outputDebugString("if NOT client.isvip ".. client.name .." => "..client.vip);
end
else
if n < #buycost then
api_http(c...
addEventHandler("onClientMarkerHit", Marker3, function(el)
if getPedOccupiedVehicle(el) then return end if el ~= getLocalPlayer() then return end
end) addEventHandler("onClientMarkerHit", Marker3, function(el) outputChatBox("Chwilowo nieczynne...") end)
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? ?
Witam ! M?j znajomy ma problem z wej?ciem na jaki kolwiek serwer. Wyskakuje b?ad Ten mod nie jest zainstalowany (deatmatch) reinstall nic nie da?. Za pomoc
Witam.
Ot?? mam problem z przyciskiem do nowego okna GUI.
Chodzi mi o to ?e jak klikniemy w przycisk (LABEL) to powinno nam zamkn?? okno nr.1 a wy?wietli? okno nr.2 i tutaj jest problem w tym ?e nie wywala mi b??du a okno nr.2 si? nie wy?wietla oto niezb?dny kod:
A wi?c tak.. Pr?buj? si? zalogowa?, i pisz? ?e ?le poda?em login/haslo. A jak si? zarejestruje na te has?o i na inny nick i si? pr?buje zalogowa? to nie mog?.
ogrpg-db, DB2. Pod??czone!
DB3, nie pokazuj? b??d?w.
Kod z s_logging.lua
[lua]--[[
Panel Logowania by Kurianusz @2016 .
Regulamin /Licencja
Korzystanie z tego kodu tylko je?eli posiadasz tzw. copyrights. Zakaz usuwania tej notatki!
Pami?taj ?e nielegalne korzystanie z kodu podpada pod kodeks karny :> Tak samo jak usuni?cie tej notatki!
]]
function sprawdzorganizacje(plr)
local x = exports['ogrpg-db']:dbGet("SELECT spawn from ogrpg_organization_list join ogrpg_organizations on ogrpg_organizations.code = ogrpg_organization_list.id WHERE uid=? and not(spawn=?)",getElementData(plr,"player:uid"),"0,0,0")
if x and #x > 0 then
local t = split(x[1].spawn, ",")
return t
end
return false
end
addEvent("logging:checkAccount", true)
addEventHandler("logging:checkAccount", resourceRoot, function(login,pass)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE login=?", login)
if result and #result > 0 then
if result[1].login == login and result[1].pass == teaEncode(pass,"achujmnieto") then
for i,player in pairs(getElementsByType("player")) do
if getElementData(player,"player:uid") == result[1].id then
triggerClientEvent(client, &q...
Witam, mam taki problem poniewa? posiadam paczke pseudolife v.3 Jest to jaka? sklejka z pysem, MK 1, MK2 Normalnie funkcjonuje, Lecz jak si? doda mk3, gz, nap?d 4x4 Wtedy Nie dzia?a jak si? odda do przecho, zawsze jak si? odda to przecho to pokazuje za?adowano mk1, mk2, lecz mk3, gz naped 4x4 Nie pokazuje, Prosi?bym o pomoc, z g?ry dzi?ki
ogrpg-core/vehicles.lua:
[lua]--[[
Resource: OURGame v2
Developers: Split <[email protected]>
You have no right to use this code without my permission.
(c) 2015 <[email protected]>. All rights reserved.
]]
-- Get vehicle keys
function getVehicleKey(plr,veh)
if plr and veh then
local uid=getElementData(plr,"player:uid")
if not uid then return end
if getElementData(plr,"player:admin") or uid == getElementData(veh,"vehicle:ownedPlayer") then
return true
else
return false
end
end
end
local categoryL={[592] = true,[553] = true,[577] = true,[488] = true,[511] = true,[497] = true,[548] = true,[563] = true,[512] = true,[476] = true,[593] = true,[447] = true,[425] = true,[519] = true,[520] = true,[460] = true,[417] = true,[469] = true,[487] = true,[513] = true}
addEventHandler("onVehicleStartEnter", root, function(plr,seat,jacked)
if getElementHealth(source) < 302 then
setElementHealth(source,302)
end
end)
function jestwtabeli(***,truj)
for k,v in pairs(***) do
if v == truj then
return true
end
end
return false
end
addCommand...
Not starting resource ogrpg-db as this server version is too low (1.5.2-9.07903 required)
Kod:
[lua]
--[[
Resource: OURGame v2
Developers: Split <[email protected]>
You have no right to use this code without my permission.
(c) 2015 <[email protected]>. All rights reserved.
]]
-- Functions
function dbSet(...)
if not {...} then return end
local qh = dbQuery(DBHandler, ...)
if not qh then return false end
local result, num_affected_rows, last_insert_id = dbPoll(qh, -1)
return result, num_affected_rows, last_insert_id
end
function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbQuery(DBHandler, stringe)
local result,num_affected_rows, last_insert_id =dbPoll(query, -1)
return result
end
addEventHandler("onResourceStart", resourceRoot, function()
DBHandler=dbConnect("mysql", "dbname="..DBName..";host="..DBHost.."", DBUser, DBPass, "share=1;autoreconnect=1")
if DBHandler then
outputDebugString("* Po??czono pomy?lnie! (MySQL)")
dbSet("SET NAMES utf8")
else
outputDebugString("* Brak po??czenia! (M...
witam pisze skrypt na osiagniecia ale gui nie chce sie wyswietlic oto kod:
--[[ Autor Skryptu: bover. Prawa: Creative commons ]]-- local screenW, screenH = guiGetScreenSize()] tak = false
addCommandHandler("og", function(plr)
if tak == true then
tak = false else tak = true
end
end)
function pokaz(plr)
if tak == false then return end
dxDrawRectangle(screenW * 0.3661, screenH * 0.0004, screenW * 0.2690, screenH * 0.9999, tocolor(0, 0, 0, 168), false) end
Nie dziala mi scoreboard w gamemodzie... probowalem wszystko od restartu serwera do zmieniania go na inny ale z tej paczki... Nie chce go zmieniac bo nie potrafie zmienic element dat i ich nie znam ... z gory dziekuje za pomoc dam zimne piwo za pomoc. Czesc!