addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if not pracaPanelGUI then return end
if Mysz(x, y, x, y) then
outputChatBox("Rozpocz??e? prac?")
ukryjGUI(localPlayer)
end
end
end)
addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if Mysz(x, y, x, y) then
showCursor(false)
removeEventHandler("onClientRender",root,pracaGUI)
end
end
end)
function pokazGUI(plr)
if plr ~= localPlayer then return end
addEventHandler("onClientRender",root,pracaGUI)
showCursor(true,true)
pracaPanelGUI = true
end
addEvent("pracaPanelGUI:pokaz",true)
addEventHandler("pracaPanelGUI:pokaz",root,p...
Witam chcia?em przenie?? przechowywalnie z PYS i przenios?em blipy napisy itd tylko problem jest taki ?e jak wjad? w blip do chowania pojazdu to on nie reaguje.
Chodzi o Cuboid
Kod:
[code]--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1951.8657226563, 613.52954101563, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]
--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1966.6160888672, 613.84454345703, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]
local marker=createMarker(-1983.70, 479.06, 35.17-2, "cylinder", 6.4, 255,255,255,20)
createBlip(-1983.70, 479.06, 35.17, 35,2,0,0,0,0,0,250)
local mdestroy = createColCuboid(-1983.70, 479.06, 35.17, 14.4, 7.3, 6.2)
local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-1983.70, 479.06, 35.17)
addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local sid=getElementData(source,"player:sid")
if not sid then return end
local org = getElementData(source,"player:organization")
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",sid,org or "Brak")
if #result &...
local licz = {}
local t=createElement('text')
setElementData(t,'name','Rozpocz?cie s?u?bynLVPD')
setElementDimension(t, 0)
setElementInterior(t, 0)
setElementPosition(t,-2442.32,3786.94,300.57)
function isPlayerInPoliceFaction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end
local result=exports['ogrpg-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;', "LVPD", uid)
if result[1] then
return true
else
return false
end
end
addEventHandler('onMarkerHit', marker, function(el,md)
if isPlayerInPoliceFaction(el) then
--if getPlayerSerial(el) == "8FE50105E2AB81DFA78E08780A079292" then
if not getElementData(el,'player:duty') then
--setPlayerNametagColor(el,0,0,255)
exports['frakcja']:rozpocznijnaliczanie(el)
setElementData(el,'player:duty','LVPD')
local rank = exports['frakcja']:getPlayerFactionRank(el,'LVPD')
setElementData(el,"player:rank",rank)
giveWeapon(el,23,9999)
giveWeapon(el,3,9999)
setElementData(el,"last:nick",getPlayerName(el))
setElementData(el,"last:color",tostrin...
Witam mam problem tak jak opisa?em w temacie paczka ogrpg dutyadmin doda?em do acl tak jak czyta?em ale mam b??d z mysql_query i mysql_connect . Reszta dzia?a ale zpj nie pr?bowa?em to naprawi? ale nic to nie da?o tak jakby mysql nie chcia? zapisa? mi danych o zabraniu prawa jazdy jak zabiore na chwile pojawia si? ?e zosta?o odebrane ale po drugim klikni?ciu na wejscie do pojazdu znika i w debugu pokazuje "pobierzwyniki" stawiam
Cze??. Mam taki problem z kodem mianowicie zrobi?em tak, aby nie mo?na by?o wsi??? do pojazdu gdy si? nie ma prawa jazdy (r?wnie? zrobi?em ?eby wyrzuca?o z pojazdu jak kto? jakim? cudem wsi?dzie). Ale gdzie? pope?ni?em b??d i podczas pr?by wej?cia do pojazdu jako pasa?er bez prawka na G jest to nie mo?liwe. Prosz? o pomoc, dam piwo i repk?!
[lua]addEventHandler("onClientVehicleEnter",getRootElement(),
function (player,seat)
if player ~= localPlayer then return end
if seat ~= 0 then return end
if getElementData(localPlayer, "VehSchool") == source then return end
if getElementData(source, "OwnerSchool") then
if getElementData(source, "OwnerSchool") ~= player then
setPedControlState(player, "enter_exit", true )
outputChatBox("To nie jest tw?j pojazd!",255,64,0,true)
return
end
end
for _,src in pairs(id_Lic) do
if getElementModel(source) == src[1] then
if getElementData(player, src[2]) ~= true then
outputChatBox("Nie posiadasz uprawnie? dla tej kategorii pojazdu!",255,64,0,true)
setTimer(function()
setPedControlState(player, "enter_exit", true )
end,50,10)
end
end
end
end
)
addEventHandler("onVehicleStartEnter",getRootElement(),
function (player,seat, jack, door)
if getElementData(player, "VehSchool") == sourc...
Witam, mam na serwerze prosty skrypt na nosze i wszystko super dzia?a. Lecz problem zaczyna si? gdy doda si? drugi marker, wtedy nie da si? ich w og?le wzi???.
Kod server:
[lua]
function dodajnoszedokaretki(plr)
if getElementData(plr, "player:admin") then
x,y,z = getElementPosition(plr)
x2,y2,z2 = getElementRotation(plr)
veh = getPedOccupiedVehicle(plr)
if not veh then return end
mrk = createMarker(0, 0, 0, "cylinder", 2, 255, 0, 0, 50)
attachElements(mrk, veh, 0, -4, -1)
objectnosze = createObject(1997, 0, 0, 0, 0, 0, 0)
setElementCollisionsEnabled(objectnosze, false)
attachElements(objectnosze, veh, 0, -1, -0.5)
outputChatBox("Dodano nosze do karetki!", plr)
end
end
addCommandHandler("dodaj-nosze-do-karetki", dodajnoszedokaretki)
function weznosze(plr)
if isElementWithinMarker(plr, mrk) then
if not getElementData(plr, "player:nosze") and getElementData(plr, "player:duty") == "SAMD" then
setElementData(plr, "player:nosze", true)
outputChatBox("Wzi??e? nosze.", plr)
outputChatBox("Aby je postawi?/wzi??? kliknij wpisz /pusc-nosze.", plr)
outputChatBox("Aby kogo? na nie po?o?y? wpisz /na-nosze <ID/NICK>.", plr)
outputChatBox("Aby kogo? z nich zdj?? wpisz /z-noszy <ID/NICK>.", plr)
detachElements(objectnosze, veh)
attachElements(objectnosze, plr, 0, 1.5, -1)
toggleControl(plr, "jump", false)
toggleControl(pl...
Cze??, mam ma?y problem, ot?? komenda si? nie wykonuje. Oto kod:
addCommandHandler("parkuj", function(plr, cmd) local veh = getPedOccupiedVehicle(plr) local vid = getElementData(vid, "privcar:uid")
if vid then if getElementData(veh, "privcar:owner") == getElementData(plr, "player:uid") then
local x, y, z = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) local query = exports.db:dbSet("UPDATE privcars SET pos='%.2f,%.2f,%.2f,%.2f,%.2f,%.2f' WHERE uid='%d'", x, y, z, rx, ry, rz, vid)
if query then
outputChatBox("Zaparkowa?e? pojazd!", plr, 0, 255, 0)
else outputChatBox("Nie uda?o si? zaprawkowa? pojazdu...", plr, 255, 0, 0) end else outputChatBox("Pojazd nie nalezy do ciebie!", plr, 255, 0, 0) end else outputChatBox("Pojazd nie jest prywatny!", plr, 255, 0, 0) end
end)
DB3 nie pluje nic, w konsoli czystka.
Chcia?bym zapisa? pozycj? pojazdu do bazy, w kt?rej mam "pos", kt?ry jest TEXT'em o d?ugo?ci 600
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...
Siema pod??czy?em paczk? RPG w FTP i wgra?em SQL do PHPMYADMIN po zarejestrowaniu si? pokazuj si? ?e zosta?em zarejsetrowany a przy logowaniu jest: https://imgur.com/hTx8K2l
Siema, wraz z koleg? robimy serwer mta i mamy problem z baz? danyc. Korzystamy z paczki xyzzyrp.
My dopiero zaczynamy i nie wiemy jeszcze wszystkiego.
Bardzo bym prosi? o pomoc. Daje
Sciaglem skrypt od Haze. , ale po odpaleniu tego wyskakuje mi takie cos:
[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)
Witam,bo mam taki problem ?e chcia?bym doda? grafike do panel logowania ale jako? mi nie idze.Panel logowania wtedy nie dzia?? ale grafika o nazwe "przycisk.png" nie dzia?a.
KOD:
[lua]
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
Witam mam problem ot??, mam napisany skrypt na autobusy lecz nie dziala a dokladniej gdy wjade w punkt to nie dostaje ani hajsu ani nie znika ten punkt pom?g?by kto? oto kody:
[b][color=red]bus.lua[/color][/b]
[code]createBlip(1742.97, -1861.93, 13.58,46,2,255,0,0,255,0,100)
local m1 = createMarker(1742.97, -1861.93, 13.58-1, "cylinder", 1.2, 0,200,0,150)
local t = createElement('text')
setElementPosition(t,1742.97, -1861.93, 13.58)
setElementData(t,"name","Praca: Kierowca MZKnZarobki:nZwyk?y Gracz od 2750PLN do 2650PLN n Premium: x1.3 Wi?cej.")
local vehs = {}
local code = "Autobusy"
local zone = createColSphere( 1732.85, -1857.30, 13.54, 6 )
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "vehicle_job_owner") then
return
end
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("[#00ff00INFORMACJA#ffffff]Kto? ju? zajmuje to miejsce, poczekaj a? odjedzie.",el,255,255,255,true) return end
local x,y,z = getElementPosition(el)
local autbus = createVehicle(431, 1732.85, -1857.30, 13.54, 0.00, 0, 270 )
setElementFrozen(el,true)
setElementData(autbus,"vehicle:desc","Miejski Zarz?dnKomunikacji")
setEleme...
Witam tak jak w temacie mam pytanko odno?nie jak doda? grafike do panelu logowania mam grafike tylko ?e niewiem jak doda? j? do panelu logowania.
Czy by kto? mug? mi da? linijke z kodem co doda mi doda do panelu logowania te grafike? Wiem ?e musze potem tam zmieni? nazwe.
Pozdrawiam
Za pomoc daje
Siema, chcia?bym zrobi? system stacjii paliw, lecz w tym problem, ?e nie wiem jak zrobi? "oddawanie" pistoletu na jego miejsce, tzn. mamy sobi? takie tabelki:
[lua]
local obiekty = {
{-1622.29272, 416.45471, 7.03905, 0, 0, 0}, -- tabela dotyczڣa deagli.
{-1618.85156, 412.58276, 7.17969, 0, 0, 0},
{-1626.43823, 420.43106, 7.03125, 0, 0, 0},
}
for i,v in ipairs(markery) do
local marker = createMarker(v[1], v[2], v[3]-1, "cylinder", 1.5, 0, 0, 255, 75)
setElementData(marker, "type", v[4])
end
for i,v in ipairs(obiekty) do
obiekt = createObject( 348, v[1], v[2], v[3]+1, v[4], v[5], v[6])
end
[/lua]
I chcia?bym aby przy braniu "pistoletu" na paliwo, bra?o ten, kt?ry jest najbli?ej markera, tak samo przy odk?adaniu. Bo jak na razie to bierze ten, kt?ry jest pierwszy w tabeli. Kod na branie pistoletu:
[lua]
function giveWeaponsX(hit)
local data = getElementData(hit, "linia:stacje")
if data then
xx,yy,zz = getElementPosition(obiekt)
attachElements(obiekt, hit, 0, 0, 2)
else
detachElements(obiekt, hit)
setElementPosition(obiekt,xx,yy,zz)
setElementFrozen(obiekt, true)
end
end
A wi?c tak, mam gamemode Your Adventure , doda?em do ACL Admin resource.ogrpg-core wraz z dutyadmin, i dalej nie dzia?a, szuka?em na gtao taki temat ale ci?gle pisz? ?e bla bla dodaj do acl resource.dutyadmin... - ju? to zrobi?em, mo?ecie pom?c? by?bym wdzi?czny.
Witam,tak jak w temacie nie dzia?a mi grafika do panelu logowania,chodzi o to ?e sie nie wy?wietla.Jakby co to logo dzia?a ale te przycisk nie dzia?a
KOD:f
[lua] f getElementData(localPlayer, "player:sid") then return end
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
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.
Witam, mam pewien problem, a mianowicie ucze sie na paczce pysa, przerabiam go na moj serwer. Lecz, gdy jade na streetview, to pisze ze otrzymuje X kasy, a w hudzie nie pokazuje sie, ze ja otrzymalem. Druga sprawa - gdy chce uzyc na sobie komendy /daj.kase, to pisze, ze musze byc zalogowany, lecz ja jestem zalogowany. Uzywam panelu logowania ze skygame (tak, podpialem go pod pysa)
Witam, zrobi?em gui w dx i funkcje na zamykanie tego gui, ale co? nie dzia?a
kod:
addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then if isMouseIn(screenW * 0.6211, screenH * 0.6896, screenW * 0.1406, screenH * 0.0604) and naprawa == true then
naprawa = false
setPlayerHudComponentVisible("all", true) setElementData(localPlayer, "hud:enabled", true) fadeCamera(false) showCursor(false) showChat(true) end
end
end)
Cze??, jak dzisiaj chcia?em zapisa? map? to si? nie da?o i wyskoczy? error:
Niczego nie zapisywa?em/przesy?a?em teraz, a nie chc? straci? 4 godzin pracy :v
Licz? na pomoc!!
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...
Siema!
Zrobi?em taki skrypt, aby usuwa?o samoch?d po wyj?ciu z serwera.
Lecz gdy dzi? to przetestowa?em, to nie wa?ne kto wyjdzie z serwera, to i tak usunie ten pojazd, a chcia?bym ?eby usuwa?o, tylko wtedy gdy wyjdzie osoba, kt?ra w nim siedzia?a.
B??d?w w DB3 Nie ma.
Kod ServerSide:
addEvent("onPlayerQuit", true) addEventHandler ( "onPlayerQuit", getRootElement(), function()
if isElement (woz) and woz then
destroyElement (woz) end
end)
Witam mam problem bo wchodze w strone z hostingiem i w phpmyadmin i pisze utworz now? baze danych i brak uprawnien Czemu kupi?em hosta i nie moge chce wgrac baze danych MysQl jak ktos umie pom?c prosze bardzo o ni? za pomoc stawiam zimne i mam na hostingu 1shot1kill
POZDRAWIAM
[you]
[ Dodano: 2018-02-14, 10:03 ]
Witam jeszcze raz bo mam takie pytanie czy phpmyadmin z hostingu z strony mam tam link i czy ten link jak on jest od phpmyadmin to czemu w tym phpmyadmin widze graczy nie z mojego serwa i nie moge robic baz danych
Tak jak w temacie!
Zrobi?em marker, i normalnie si? stworzy?, lecz po wejsciu w marker mimo zastosowania funkcji OnClientMarkerHit nic si? nie dzieje.
Skrypt jest po Client Side
W DB3 Wyskakuje tylko b??d
Bad argument @ addEventHandler [Expected element at argument 2, got nil]
Oto ca?y skrypt:
local cel = createMarker(255.29895, -1366.57813, 53.10938, "checkpoint", 4, 0, 0, 255)
function cele(thePlayer)
if thePlayer == getLocalPlayer() then
outputChatBox("elo marker0") end
end
addEventHandler("onClientMarkerHit", cel, cele)