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, posiadam GM PYS 3.0 i mam problem, poniewa? gdy uszkodzi si? pojazd podczas zdawania prawa jazdy to posta? zostaje w tym miejscu a chcia?bym ?eby cofa?o do miejsca zdawania
[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.
]]
--local zone = createColCuboid(-157.62562561035, 1108.4052734375, 18.613729476929, 7, 9.8, 6.4)
addEvent("license:do",true)
addEventHandler("license:do", resourceRoot, function(cost,selected)
if tonumber(cost) <= getPlayerMoney(client) then
takePlayerMoney(client,cost)
end
local veh=nil
--if #getElementsWithinColShape(zone,"vehicle") >= 1 then outputChatBox("* Miejsce respu zaj?te, poczekaj a? kto? wyjedzie.",client) return end
if selected == "A" then veh=createVehicle(586, -1943.73,1001.21,35.18, 356.3, 0.1, 270)
elseif selected == "B" then veh=createVehicle(436, -1943.73,1001.21,35.18, 356.1, 0.1, 270)
elseif selected == "C" then veh=createVehicle(414, -1943.73,1001.21,35.18, 360, 0.4, 270)
elseif selected == "L" then veh=createVehicle(593, -1...
witajcie .. mam pewien problem ot?? robie sw?j serwer i doda?em skrypt prawo jazdy .. dzia?a? lecz postanowi?em przeniesc go do interioru urzedu .. no i po przeniesieniu i wejsciu w marker dzieje si? to
Witam, mam problem z prawem jazdy na serwerze. Gdy wpisuje /zpj 1 5 h Test to na dole ekranu wy?wietla si? informacja ?e prawo jazdy zosta?o zabrane ale daje mog? wsiada? do auta. DB mam pod??czone i modu?y wgrane bo bany dzia?aj? ale nie wpisuje mi si? w ogrpg_punish to ?e prawko zosta?o zabrane. B??dy z DB3:
ERROR: [skrypty_glowne]/ogrpg-db/s_db.lua:114: attempt to call global 'mysql_query' (a nil value)
Dlaczego po uszkodzeniu pojazdu, nie wytepuje mnie do podanej lokalizacji? Za pomoc stawiam !
Kod:
addEventHandler("onVehicleDamage", resourceRoot, function(loss) local kierowca=getVehicleController(source)
if not kierowca then return end if not getElementData(source,"vehicle:lic") then return end
destroyElement(source) outputChatBox("* Uszkodzi?e?(a?) pojazd, nie zdajesz egzaminu!", kierowca, 255, 0, 0) setElementPosition(kierowca, -185.16,1162.74,19.74) --o to si? rozchodzi! :/ triggerClientEvent(kierowca, "license:finish", resourceRoot, true) end)
Siema. Dlaczego w skrypcie na prawo jazdy, znajduj?cym si? w OG-RPG, mo?na wej?? do pojazdu bez ?adnej licencji? Je?li kto? wie, jak to naprawi?, to dzi?kuj?. Za pomoc stawiam
[ Dodano: 2017-05-07, 10:28 ]
Juz sobie poradzi?em, do zamkniecia
Mam pytanie. Powie mi kto? jak mog? zrobi? teoretyczne prawo jazdy bo szczerze nie mam pomys?u Jak by?cie mi mogli podpowiedzie? funkcje by?o by super, a najlepiej jaki? przyk?ad
Wchodz? w marker i nic nie dzia?a dlatego ,?e doda?em ,?e jak kto? ma zabrane prawko nie mo?e prowadzi? a tu skrypt si? zepsu? marker wszystko jest ale jak wchodz? nic si? nie dzieje
addEvent("mower:stopJOB", true)
addEventHandler("mower:stopJOB", root, function(veh)
if not veh then return end
destroyElement(veh)
end)
local zone = createColSphere(-2465.28,-322.64,41.93, 5, 4.5, 2)
addEventHandler("onMarkerHit", m, function(el,md)
if getElementData(plr,"player:license:pj"..type.."") ~= 1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w urz?dzie miasta", plr, 255, 0, 0)
return true
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(plr), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posia...
Witam chce aby w Pracy trzeba by?o mie? prawo jazdy Kat. L
I Moge normalnie wchodzic do samolotu jak nie mam Licencji
//Tylko w pracy aby dzia?a?o to (Nie chce aby by?o trzeba mie? prawko Og?lnie)
Oto kod
-- Od?wie?anie tabeli function refreshingb(client)
-- Pobieramy UID gracza
local uid=getElementData(client,"player:uid")
if not uid then return end
end
local categoryL={592,553,577,488,511,497,548,563,512,476,593,447,425,519,520,460,417,469,487,513}
-- Kod s?u??cy od sprawdzania prawa jazdy function getVehicleLicense(plr,type) local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_users WHERE id AND pjL=?", id, "0")
if #qr == 1 then outputChatBox("Nie Posiadasz Licencji na Drony!", source, 255, 255, 255) return end query=string.format("SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1","L", getPlayerSerial(target)) local result=exports["ogrpg-db"]:pobierzWyniki(query)
if (result) then
cancelEvent() outputChatBox("* Posiadasz zawieszon? Licencje do "..result["time"]..", za: "..result["reason"], plr, 255, 0, 0)
else exports["ogrpg-db"]:dbSet("DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?", "L", getPlayerSerial(plr)) end
end
Witam mam problem z tym skryptem na prawo jazdy chodzi o to ze jak zdam prawko to mog? je zda? po raz kolejny stara?em si? to naprawi? ale co? mi nie wysz?o
Kod:
[lua]local prawko = createMarker(358.24,186.27,1008.38-1, "cylinder", 1.5, 64, 255, 0)
setElementInterior(prawko, 3)
Powr?ci?em do Singla GTA San Andreas, jestem ju? w San Fierro, lecz mia?em lekkie problemy z misj? Szko?y jazdy... przeszed?em... zosta?em tylko na je?dzie po mie?cie... a tu jeb. Crash. Niestety nie zapisa?em stanu gry, i rozpoczynam w sumie od po?owy szko?y jazdy. Czy kto? by m?g? z mojego konta zrobi? Szko?e jazdy na 100% przynajmniej do przed ostatniej lekcji?
Witam. M?j problem polega na tym, ?e gdy rozpoczn? kurs prawo jazdy wywala mnie w powietrze i jestem na srodku mapy. Tak si? dzieje w??czaj?c gamemode serwerowy ale gdy w??cze play normalnie wszystko chodzi.
Jak b?dzie warunek wygl?da?, ?e jak gracz pr?buje wsi??? do pojazdu to nie mo?e (do wszystkich!). Oraz jakich funkcji musz? u?y? po stronie clienta oraz servera.
Witam mam problem z prawem jazdy. Jak zrobi? aby podczas klikania "f" nie ?apa?o auta z oddali tylko np. z 10m. Druga sprawa to taka, ?e gracz nie maj?cy prawa jazdy nie mo?e wsiada? na 'G' Jako pasa?er jak to naprawi?? Prosz? o pomoc!!!! za pomoc i
kod blokady wsiadania:
addEventHandler("onVehicleStartEnter", resourceRoot, function(plr,seat,jacked)
if (not katB[getElementModel(source)]) then return end if getElementData(plr,"player:lic:pjB") ~= 1 then
cancelEvent() outputChatBox("Nie posiadasz Prawa jazdy Kategori B, Mo?esz zda? j? w urz?dzie.!", plr, 255, 0, 0) end
end)
Witajcie mo?ecie mi pom?c ?. Mam problem z prawem jazdy na GM OGRPG. Ot?? ka?dy mo?e wchodzi? do pojazdu nie maj?c zdanej licencji. Jak to naprawi?? ;D U?ywam GM z GTO za pomoc
Mam taki ma?y problem mam skrypty na zabieranie prawka po??czone z mysql
Problem le?y w 2 rzeczach 1. Gdy jestem "nowym" graczem moge odrazu do wszystkiego wsiada?.Problem 2 to jest ?e gdy mam zawieszony prawa jazdy nadal moge wsiadac a w db 3 nic nie pisze o bledzie
Daje wam linijki Kod?w oraz ss myqsl
Komenda admina na zabierania Prawka
[lua]
addCommandHandler("zpj", function(plr,cmd,cel,time,type,...)
if getAdmin(plr,3) or getAdmin(plr,2) or getAdmin(plr,1) then
local reason=table.concat({...}, " ")
if not cel or not tonumber(time) or not type or not reason then
outputChatBox("* U??ycie: /zpj <nick/ID> <czas> <jednostka: m/h/y/w> <pow?d>", 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
if isPedInVehicle(target) then
removePedFromVehicle(target)
end
result=pobierzDate(type,time)
triggerClientEvent(root, "admin:rendering", root, "* "..getPlayerName(target).."("..getElementData(target,"id")..") otrzyma?/a zakaz prowadzenia pojazd?w kat(ABC) od "..getPlayerName(plr)..": "..reason.."("..time .. type ..")")
exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,?,?)", getPlayerSeri...
Witajcie, nie wiem jak ustawi? zabieranie prawa jazdy na czas. Mam kompletny i autorski skrypt na prawo jazdy, ale nie umiem ustawi? tak, by mo?na by?o zabiera? je na czas.
Cze??. Przedstawi? skrypt prawa jazdy. Je?li nie ma prawa jazdy, nast?pnie wyj?? z pojazdu. Przepraszam za m?j Polski. Jestem z Ukrainy. Skrypt w j?zyku rosyjskim.
Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.
Cze??, mam problem. Nie wiem jak odzieli? prawo jazdy Kat.B i Kat.C.
Jak zdaje egzamin na kat.B to zdaje mi te? r?wnie? na Kat.C jak to odzieli????
Prosz? o pomoc!
kod egzaminu:
Server
[quote] isCar = {[602]=true,[496]=true,[401]=true,[518]=true,[527]=true,[589]=true,[419]=true,[533]=true,
[526]=true,[474]=true,[545]=true,[517]=true,[410]=true,[600]=true,[436]=true,[580]=true,
[439]=true,[549]=true,[491]=true,[445]=true,[604]=true,[507]=true,[585]=true,[587]=true,
[466]=true,[492]=true,[546]=true,[551]=true,[516]=true,[467]=true,[426]=true,[547]=true,
[405]=true,[409]=true,[550]=true,[566]=true,[540]=true,[421]=true,[529]=true}
--[[function prawojazdy ( source, seat, jacked )
if (not isCar[getElementModel(source)]) then return end
local playeraccount = getPlayerAccount ( source )
if seat == 0 then
if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Prawko" ) ) then
outputChatBox ( "Nie posiadasz prawa jazdy kategorii B lub zosta?o ono cofni?te!", source, 255, 255, 255, true )
cancelEvent ()
end
end
end--]]
local egzaminowany=nil
addEvent('guiokno',true)
local rozpocznij = createMarker(361.83,173.62,1007.38,"cylinder",1.5,0,0,100,100)
setElementInterior(rozpocznij,3)
setElementDimension(rozpocznij,1)
addEventHandler('onMarkerHit',root,function(player)
if isElementWithinMarker(player,rozpocznij) then
triggerClientEvent(player,"po...
Ludzie potrzebuje pomocy, sam nie umiem tego zrobi?.
Ot?? mam skrypt na prawo jazdy i chce ?eby dotyczy? on tylko pojazd?w osobowych KAT.B Infernus Sultan itd. jest to mo?liwe??? prosze oto lua.
Prosz? o szybk? odpowied?
[quote]function dajprawko ( policjant, commandName, gracz )
local accName = getAccountName ( getPlayerAccount ( policjant) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
local gracz1 = getPlayerFromName ( gracz )
local nickgracza = getPlayerName ( gracz1 )
local nickpolicjanta = getPlayerName ( policjant )
local konto = getPlayerAccount ( gracz1 )
if not getAccountData(konto, "prawojazdy") then
outputChatBox("Da?e? prawo jazdy graczowi "..nickgracza.."", policjant)
outputChatBox("Otrzyma?e? prawo jazdy od policjanta "..nickpolicjanta.."", gracz1)
setAccountData(konto, "prawojazdy", true)
else
outputChatBox("Gracz "..nickgracza.." posiada prawo jazdy", policjant)
end
else
outputChatBox("Nie jeste? policjantem!", policjant)
end
end
addCommandHandler("daj.prawojazdy", dajprawko )
function sprawdzprawko ( policjant, commandName, gracz )
local accName = getAccountName ( getPlayerAccount ( policjant) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
local gracz1 ...
Mam problem bo chce zapisywac prawo jazdy jak sie zda ale nie dzia?a
function zdal () local gracz = getPlayerName ( source) konto = getPlayerAccount ( source ) local zdal = setAccountData ( konto, "prawojazdy", true ) local query = dbQuery(handler, "INSERT INTO prawojazdy (gracz, zdal) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?)", gracz, zdal, 50, 0) outputChatBox("Kurs prawa jazdy zako?czony pomy?lnie! Gratulacje!", source ) konto = getPlayerAccount ( source ) end
function prawkozapisz() local gracz = getPlayerName ( source) local zdal = getElementData(v, "prawojazdy") dbExec(handler, "UPDATE pojazdy SET zdal='"..y.."' WHERE gracz='"..gracz.."'")
[lua]function zabierzprawko ( policjant, commandName, gracz )
local accName = getAccountName ( getPlayerAccount ( policjant) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
local gracz1 = getPlayerFromName ( gracz )
local konto = getPlayerAccount ( gracz1 )
local nickgracza = getPlayerName ( gracz1 )
local nickpolicjanta = getPlayerName ( policjant )
if not getAccountData(konto, "prawojazdy") then
outputChatBox("Gracz "..nickgracza.." nie posiada prawa jazdy", policjant)
else
setAccountData(konto, "prawojazdy", false)
end
else
outputChatBox("Nie jeste? Administratorem!", policjant)
end
end
addCommandHandler("zabierz.prawko", zabierzprawko )
addEventHandler("onVehicleStartEnter", getRootElement(), function(plr, seat, jacker)
local acc = getPlayerAccount(plr)
if katb[getElementModel(source)] then
if seat == 0 then
if getAccountData(acc,"licences:Prawojazdy:B") == false then
cancelEvent()
outputChatBox("#33CCCC[Informacja]#FFCC99Nie posiadasz prawa jazdy kategorii #FF0000B #FFCC9aby prowadzi? ten pojazd.", plr, 255, 255, 255, true)
end
end
end
end)
[/lua]
[lua]function dajprawko ( policjant, commandName, gracz )
local accName = getAccountName ( getPlayerAccount ( policjant) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
local gracz1 = getPlayerFromName ( gracz )
local nickgracza = getPlayerName ( gracz1 )
local nickpolicjanta = getPlayerName ( policjant )
local konto = getPlayerAccount ( gracz1 )
if not getAccountData(konto, "prawojazdy") then
outputChatBox("Da?e? prawo jazdy graczowi "..nickgracza.."", policjant)
outputChatBox("Otrzyma?e? prawo jazdy od policjanta "..nickpolicjanta.."", gracz1)
setAccountData(konto, "prawojazdy", true)
else
outputChatBox("Gracz "..nickgracza.." posiada prawo jazdy", policjant)
end
else
outputChatBox("Nie jeste? policjantem!", policjant)
end
end
addCommandHandler("daj.prawojazdy", dajprawko )
function sprawdzprawko ( policjant, commandName, gracz )
local accName = getAccountName ( getPlayerAccount ( policjant) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
local gracz1 = getPlayerFromName ( gracz )
local konto = getPlayerAccount ( gracz1 )
local nickgracza = getPlayerName ( gracz1 )
if not getAccountData(konto, "prawojazdy") then
...
Witam.
Chcia?bym aby kto? mi pom?g? z tym kodem bo po wyj?ciu z pojazdu w trakcie zdawania on nie znika i tak samo z markerami mo?na zdawa? prawo jazdy biegn?c
S
[lua]
function getpos( source )
local x,y,z = getElementPosition ( source )
outputChatBox(""..x..", "..y..", "..z.."", source, 255, 255, 255)
end
addCommandHandler("pozycja", getpos )
function sethpnpc ()
end
setTimer( sethpnpc, 1000,0 )
local marker = createMarker ( -2033.4337158203, -117.67643737793, 1034.171875, "cylinder", 2.0, 255, 0, 0)
setElementInterior ( marker, 3)
function onhit( source )
outputChatBox("Aby zacz?? kurs prawa jazdy wpisz /kurs", source, 255, 255, 255)
end
addEventHandler( "onMarkerHit", marker, onhit)
function kurs(source)
if isElementWithinMarker ( source, marker )
then
local konto = getPlayerAccount ( source )
if not getAccountData(konto,"prawojazdy" ) then
setElementInterior ( source, 0)
auto = createVehicle ( 589, -2019.9250488281, 457.44064331055, 34.876052856445, 0, 0, 270)
setVehicleColor ( auto, 1 )
warpPlayerIntoVehicle ( source, auto )
-- local instruktor2 = createPed(57, 0, 0,0 )
-- warpPlayerIntoVehicle ( instruktor2, auto, 1 )
triggerClientEvent ("zdajemyprawkotrolololo", source )
else
outputChatBox("Masz ju? prawo jazdy.", source, 255, 255, 255)
end
end
end
addCommandHandler("kurs", kurs)...
Witam.
Potrzebuje pomocy przy skrypcie prawa jazdy jak si? nie myl? to Artysty chcia?bym aby po wyj?ciu gracza z pojazdu on znika? i markery tak samo bo po wyj?ciu z auta markery zostaj? i mo?na zdawa? z buta oto kod
C-side
[code]
function markerygo ( source )
marker1 = createMarker ( -2007.8035888672, 448.80407714844, 34.719398498535, "checkpoint", 3.0, 255, 0, 0, 100)
end
addEvent( "zdajemyprawkotrolololo", true )
addEventHandler( "zdajemyprawkotrolololo",localPlayer, markerygo )
function MH1 (hitPlayer, matchingDimension)
if hitPlayer == localPlayer then
if source == marker1 then
destroyElement ( marker1 )
marker2 = createMarker ( -2007.1512451172, 356.27447509766, 34.719463348389, "checkpoint", 3.0, 255, 0, 0, 100)
end
if source == marker2 then
destroyElement ( marker2 )
marker3 = createMarker ( -2031.2839355469, 321.81930541992, 34.719440460205, "checkpoint", 3.0, 255, 0, 0, 100)
end
if source == marker3 then
destroyElement ( marker3 )
marker4 = createMarker ( -2148.3205566406, 301.18096923828, 34.875690460205, "checkpoint", 3.0, 255, 0, 0, 100)
end
if source == marker4 then
destroyElement ( marker4 )
marker5 = createMarker ( -2147.951171875, 178.54162597656, 34.875663757324, "checkpoint", 3.0, 255, 0, 0, 100)
end
if source == marker5 then
destroyElement ( marker5 )
marker6 = createMarker ( -2162.1904296875, 95.453231811523, 34.875629425049, &q...
Witam zrobi?em sobie takie prawo jazdy lecz nie dzia?a nwm czemu Widzicie tu jaki? b??d ?
C-SIDE
function prawoKatA ( thePlayer, seat, jacked )
if seat == 0 then
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) ) isObjectInACLGroup ( 'user.'..playerName, aclGetGroup ( "Prawoa" ) )
if ( prawojazdykata[getElementModel(source)] ) and isObjectInACLGroup ( 'user.'..playerName, aclGetGroup ( "prawkoa" ) ) then else cancelEvent() outputChatBox ("Nie Posiadasz Prawa jazdy Kategori A ! ! !", thePlayer) end
end
end
addEventHandler ( 'onVehicleStartEnter', root, prawoKatA )
function dajPrawkoa(thePlayer, commandName, accountName) local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then if accountName then
aclGroupAddObject (aclGetGroup("Prawoa"), "user."..accountName) outputChatBox('Wyda?e? prawo jazdy', thePlayer)
else outputChatBox('Podany nick jest nieprawid?owy !', thePlayer) end
end
end
addCommandHandler('dajprawkoa',dajPrawkoa)
To oczywi?ci? kawa?ek bo reszta to pojazdy nalez?ce do jakie? grupy
i mam jeszcze pytanie jak zrobi? ?eby po przej?ciu np jakiego? egzaminu dawa?o prawko ?