Witam robi?em server u sb lokalnie w mta , postanowilem w koncu kupic i wrzucic pliki na hosting (serverproject) i nwm czemu wywala bledy i nie moze odnalesc plikow
Wrzucam zdjecie: https://zapodaj.net/76866f6796da7.jpg.html
addEventHandler("onClientPreRender", root, function()
local x,y,z = getElementPosition(localPlayer)
local ulica = getZoneName(x,y,z, false)
local ulica2 = getZoneName(x,y,z, true)
if ulica2~=ulica then ulica = " "..ulica.."n"..ulica2 else ulica = " "..ulica end
if dxSetAspectRatioAdjustmentEnabled then
dxSetAspectRatioAdjustmentEnabled(true)
end
if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
dxDrawText(ulica, sw*4/20, sh*18/20, sw*4/20, sh*18/20+sh*1/21.9, tocolor(255,255,255,255), 0.33, font, "left", "center")
dxDrawRectangle(sw*2.5/20, sh*18/20, sw*0.7/4, sh*1/21.9, tocolor(inDMZone and 100 or 0, 0, 0, 100))
end
end)
Siemka! Mam nastepujacy problem Mam wgrany modu? wszystko cycu? ale kiedy? wesz?em na serwer a tu pstryk... Brak Prawa Jazdy kat. B z Reputacja to samo Jest na to inne rozwi?zanie daje Zimnego
local jobMarker
local jobStartMarker=createMarker(2313.9,4955.18,6.8, "cylinder", 1.8, 0, 255, 255, 20)
setElementInterior(jobStartMarker, 0)
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker=nil
end
if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget=nil
end
end
local function showMarker()
rnd=math.random(1, #jobPoints)
jobMarker=createMarker(jobPoints[rnd][1], jobPoints[rnd][2], jobPoints[rnd][3], "checkpoint", 1.2, 0, 0, 255, 0)
local blip = createBlipAttachedTo(jobMarker, 41)
addEventHandler("onClientMarkerHit", jobMarker, function(el,md)
if el~=localPlayer or not md then return end
if not getPedOccupiedVehicle(el) then
setElementFrozen(el, true)
exports["1"]:outputNotificationBox ("#00ccccTrwa odk?adanie paczki")
setTimer(function()
finishJob()
playSoundFrontEnd(1)
setElementFrozen(el, false)
toggleControl("jump", true)
toggleControl("sprint", true)
toggleControl("enter_exit", true)
setElementData(el, "player_job", false)...
Witam mam rh podpi?te ?adnie wszystko i nie wiem czemu nie dzia?a podpi?te pod pystories
Server
[lua]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 o(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == 4 then exports["1"]:outputNotificationBox (getVehicleController(c), "#cc0000Osi?gn??e? limit regulacji zawieszenia!") cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) - 0.16)
setElementData(c, "rh:up", gora+1)
exports["1"]:outputNotificationBox (getVehicleController(c), "#00ccccAuto zosta?o obni?one!")
end
end
addEvent("rh:o", true)
addEventHandler("rh:o", root, o)
function p(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == -8 then exports["1"]:outputNotificationBox (getVehicleController(c), "#cc0000Osi?gn??e? lim...
Witam mam drzwi pod scrolla scroluje i nic si? nie dzieje
[lua]bm5 = createMarker(2329.49731, 2486.36792, 1028.81982, "cylinder", 1.0, 0, 0, 0, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d5 = createObject (2930, 2330, 2488.400390625, 1030.5, 0, 0, 0) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function isPlayerInPoliceFaction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end
local result=exports['pystories-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;', "SAPD", uid)
if result[1] then
return true
else
return false
end
end
function od6 ( thePlayer)
if isElementWithinMarker(thePlayer, bm5) then
if isPlayerInPoliceFaction(thePlayer) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d5, 2500, 2330, 2490.12, 1030.5) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
function zd6 ( thePlayer)
if isElementWithinMarker(thePlayer, bm5) then
if isPlayerInPoliceFaction(thePlayer) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d5, 2500, 2330, 2488.400390625, 1030.5) -- koordy zamknietch drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
...
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 posiadam tu kod od ironman czy jakos tak i gdy pisz? /pojazd ID NICK, czyli np /pojazd 588 Allansso to sie respi ale gdy chce zrespic graczowi pojazd to pisze /pojazd 600 krystian to zamiast jego to mi sie respi pojazd co tu nie dziala?
[code]
--Skrypt by Irons--
--Mo?esz u?ywa? tego kodu, i go edytowa?.. ale wspomnij gdzie? o autorze
addEventHandler("onResourceStart",resourceRoot,function() -- Funkcja kt?ra sprawdza czy posiadamy tabel? w registry.db, je?li nie to j? tworzy
local state = executeSQLQuery("CREATE TABLE IF NOT EXISTS pojazdy (id INT, model INT, owner TEXT, kolor1 INT, kolor2 INT, kolor3 INT, kolor4 INT, kolor5 INT, kolor6 INT, posx FLOAT, posy FLOAT, posz FLOAT, rotz FLOAT)")
if state then
outputDebugString("* Utworzono tabel?")
else
outputDebugString("* Nie utworzono tabeli")
end
end)
--JE?LI NIE ZNASZ SI? NA MYSQL / SQL ANI LUA TO NIC NIE EDYTUJ!!!!!!
local auta = {} -- tabela z autami
addCommandHandler("pojazd",function(plr,cmd,modelid,gracz) -- komenda /pojazd <id pojazdu> <nick gracza>
if modelid and gracz then -- sprawdzamy czy podalismyy wszystkie argumenty
modelid = tonumber(modelid)
if modelid then
local x,y,z = getElementPosition(plr)
local pojazd = createVehicle(modelid,x,y,z,0,0,0) --tworzymy pojazd
if not pojazd then
outputChatBox("* Nie uda?o si? utworzy? pojazdu!",plr) return end
table.insert(auta,pojazd)
setElementData(pojazd,...
function bramao (thePlayer)
if getElementData(thePlayer,'player:duty') and getElementData(thePlayer,'player:duty')=='PSP' then
moveObject ( brama1, 2000, -2102.099,-38, 32.3)
end
end
addCommandHandler("o",bramao)
function bramaz (thePlayer)
if getElementData(thePlayer,'player:duty') and getElementData(thePlayer,'player:duty')=='PSP' then
moveObject ( brama1, 2000, -2102.099,-38, 36.299)
end
end
addCommandHandler("z",bramaz)
function bramao (thePlayer)
if getElementData(thePlayer,'player:duty') and getElementData(thePlayer,'player:duty')=='PSP' then
moveObject ( brama2, 2000, -2102.100,-28.5, 32.3)
end
end
addCommandHandler("o",bramao)
function bramaz (thePlayer)
if getElementData(thePlayer,'player:duty') and getElementData(thePlayer,'player:duty')=='PSP' then
moveObject ( brama2, 2000, -2102.100,-28.5, 36.299)
end
end
addCommandHandler("z",bramaz)
function bramao (thePlayer)
if getElementData(thePlayer,'player:duty') and getElementData(thePlayer,'player:duty')=='PSP' then
moveObject ( brama3, 2000, -2102.100,-18.799, 32.3)
end
end
addCommandHandler("o",bramao)
Witajcie! Nauk? LUA rozpocz??em wczoraj. I dzisiaj wzi??em si? za pisanie pierwszego skryptu, aby nauczy? si? sk?adni itp. Meta jest ustawiona na server. B??d polega na tym, ?e po wpisaniu komendy nic si? nie dzieje i b??d?w pod DB3 tez nie ma.
Witam mam taki ?e gdy wrzucam GM / pluginy / include na Hosting ServerProject.eu to w logach serwer odpalony nie wy??cza si? nic ale gdy si? na niego wbija to nie da si? z nim po??czy? ! co zrobi?? nie jest tak tylko na 1 GM ! tylko na 2 moich GM! jakie? rozwi?zania ? wgrywam wszystkie potrzebne pluginy i include
Witam!
Mam problem gdyz na mojej rozdzielczosci dziala ladnie wszystko czyli 1920 na 1080 a jak wejda inni to maja wszystko inaczej juz probowalem to ustawic pomoze ktos?!
Witam, chcia?bym aby?cie mi pomogli bo mam zrobion? map? i zapisa?em j? i patrze na nast?pny dzie? ze jej niema a mam ja w resources. Wie kto? o co chodzi?
Po d?ugich rozmy?leniach nad sensem prowadzenia funkcjonalno?ci mojego serwera postanowi?em napisa? map? od zera. Map? doprowadzi?em do dziesi?ciu tysi?cy linijek kodu. Gdy odpali?em map? w konsoli by?o wszystko okej, chcia?em wej?? do ?rodka kodu, w sensie na platformie S.A.M.P - O.K, wszed?em a? tu nagle informacja, ?e serwer nie odpowiada, czy co? w tym stylu. Mia?em fajne obiekty, wi?c licz? na pomoc od strony u?ytkownik?w w celu naprawy mo?liwego b??du.
Siemka Dopiero zaczynam swoj? przygod? z byciem H@ i mo?na powiedzie? ?e si? ucz? ;'D Wgra?em gamemoda xyzzy, lecz serwer wgl si? nie ?aduje Jestem nowy wi? prosi? bym o pomoc, lista b??d?w:
Witam mam problem nie dzia?a mi panel po zarejestrowaniu si? i zalogowaniu komendami ||/register login haslo|| i ||/ login login haslo|| uprzedzam komentarze typu "wklej sw?j nick do acl" poniewa? wszystko zrobi?em dobrze tutaj macie m?j acl (tylko t? wa?niejsz? cz???)
function getPointFrontOfElement(element,distance)
if not element then return end
local x, y, z = getElementPosition ( element )
local rx, ry, rz = getElementRotation ( element )
x = x + (distance * (math.sin(math.rad(-rz))) )
y = y + (distance * (math.cos(math.rad(-rz))) )
return x,y,z
end
function getPositionFromElementAtOffset(element,x,y,z)
if not element then return end
if not x or not y or not z then
return x, y, z
end
local matrix = getElementMatrix ( element )
local offX = x * matrix[1][1] + y * matrix[2][1] + z * matrix[3][1] + matrix[4][1]
local offY = x * matrix[1][2] + y * matrix[2][2] + z * matrix[3][2] + matrix[4][2]
local offZ = x * matrix[1][3] + y * matrix[2][3] + z * matrix[3][3] + matrix[4][3]
return offX, offY, offZ
end
function getVehicleWheelPosition(vehicle,wheel)
local x, y, z = 0, 0, 0
local minX, minY, minZ, maxX, maxY, maxZ = getElementBoundingBox(vehicle)
if wheel == 1 then
x, y, z = getPositionFromElementAtOffset(vehicle, minX, maxY, minZ)
elseif wheel == 2 then
x, y, z = getPositionFromElementAtOffset(vehicle, minX, -maxY, minZ)
elseif wheel == 3 then
x, y, z = getPositionFromElementAtOffset(vehicle, maxX, maxY, minZ)
elseif wheel == 4 then
x, y, z = getPositionFromElementAtOffset(vehicle, maxX, -maxY, minZ)
end
return x, y, z
end
function onClientRender()
if isPedInVehicle(localPlayer) then
local vehicle = ...
Witam. Na moim serwerze (pseudolu) Nie dzia?a panel logowania. 1. Problemem by?o to ?e jak si? zarejestrowa?em i klikn??em login pisa?o ?e nie istnieje takie konto. 2. Problemem teraz w og?le nie mog? nic napisa? w tym obszarze do pisania. Ten skrypt to ogrpg-logging.
Jak donosi serwis Gry-Online, Grand Theft Auto V po raz dwunasty zdobywa pierwsze miejsce, w rankingu najlepiej sprzedaj?cych si? gier w UK!
GTA V do??czy?o do elitarnej 'pi?tki' gier, kt?rym podobny wyczyn uda? si? co najmniej dwana?cie razy.
Pozosta?e tytu?y to: Who Wants to Be A Millionaire (osiemna?cie razy na pierwszym miejscu), Wii Fit (szesna?cie), Zumba Fitness (trzyna?cie) i FIFA 14 (dwana?cie).
Mimo, ?e gra ma 3 lata na karku, wci?? pozostawia konkurencj? daleko w tyle! GTA V pobi?o ju? wszystkie mo?liwe rekordy i jak wida?, nie zamierza zwalnia?.
do?? wysoko zawiesi? sobie poprzeczk?. Pytanie tylko, jak bardzo j? podniesie, wydaj?c nowe GTA?
Poni?ej znajdziecie pe?n? list?, TOP10 UK.
1. Grand Theft Auto V 2. Nioh 3. Resident Evil VII: Biohazard 4. FIFA 17 5. Call of Duty: Infinite Warfare 6. Battlefield 1 7.Rocket League 8. Hitman: The Complete First Season 9. Overwatch 10. Watch Dogs 2
Moim problemem jest, ze po podjechaniu pod marker z zaladunkiem, wczytuje sie dialog z ktorego zaladuje mi sie towar, ale wysyla sie wiadomosc: "Nie jestes w punkcie zaladunkowym". Dlaczego ?
[lua] local w,h = guiGetScreenSize()
local rowery = {[509]=true,[481]=false,[510]=true}
function gui()
local v = getPedOccupiedVehicle(localPlayer)
local x,y,z = getElementPosition(v)
r = getGroundPosition(x,y,z)
if getVehicleOverrideLights(v) ~= 2 then
w1 = "Zapal swiatla"
else
w1 = "Zgas swiatla"
end
local silnik = getVehicleEngineState(v)
if silnik == false then
w2 = "Zapal silnik"
else
w2 = "Zgas silnik"
end
w3 = "Wysad? pasa?er?w"
if isElementFrozen(v) then
w4 = "Spusc reczny"
else
w4 = "Zaciagnij reczny"
end
if getVehicleDoorOpenRatio(v,0) == 0 then
w5 = "Otworz maske"
else
w5 = "Zamknij maske"
end
if getVehicleDoorOpenRatio(v,1) == 0 then
w6 = "Otworz bagaznik"
else
w6 = "Zamknij bagaznik"
end
r1,r2,r3,r4,r5,r6 = 0.9,0.9,0.9,0.9,0.9,0.9
local wybor = getElementData(localPlayer,"wybor")
if wybor == 1 then
r1 = 1.5
elseif wybor == 2 then
r2 = 1.2
elseif wybor == 3 then
r3 = 1.2
elseif wybor == 4 then
r4 = 1.2
elseif wybor == 5 then
r5 = 1.2
elseif wybor == 6 then
r6 = 1.5
end
local sx,sy,sz = getElementVelocity(v)
local kmhs = math.ceil(((sx^2+sy^2+sz^2)^(0.5))*155)
if kmhs < 20 then
setElementData(localPlayer,"maxwybor",6...
Witam. Mam taki kawa?ek kodu po stronie serwera. Jak on dzia?a: klikamy GUI(client) i wtedy wywo?uje dan? funkcj? z servera jednak nie reaguje mi na warunek loginu danego gracza i mo?e by? to r?wnie? u?ywane przez osoby o innym loginie.
//edit : dzia?a to poprawnie je?li zamiast OR b?d? stawia? kolejne linijki ELSEIF i na ka?dej osobny login - czy nie ma operatora(?) OR czy ?le go u?ywam?
Witam serdecznie! Tworz? sobie aktualnie prac? dorywcz?. M?j problem polega w tym, ?e po wej?ciu w marker rozpoczynaj?cy prac? nie przenosi mnie do pojazdu, kt?ry si? tworzy. Kod:
S-side:
[lua]
function pojazd()
local vehjob = createVehicle (588, -158.01686, 1051.77075, 20.06611)
end
addEvent("cvehicle",true)
addEventHandler("cvehicle",resourceRoot,pojazd)
function tpdp()
warpPedIntoVehicle (plr_starting, vehjob)
end
addEvent("przenies",true)
addEventHandler("przenies",resourceRoot,tpdp)