Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-08-09, 18:52


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

Siema,jak mog? naprawi? ten b??d na moim serwerze? mianowicie chodzi o to ?e mam panel logowania od VastRPG i opcja zapami?taj has?o nie dzia?a bo wywala b??d taki ERROR: Client (D4nyPL triggered serverwside event AntyLost but event is not added serverside
Co robi??
Kod:
Kod:


local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=nil, }
local czcionka = dxCreateFont("font/1.ttf", 15)

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end

local dist = 200
local angler = 0
function getPointFromDistanceRotation(x, y, dist, angler)
local a = math.rad(270 - angler)
local dx = math.cos(a) * dist;
local dy = math.sin(a) * dist;
return x+dx, y+dy;
end

function roundedRectangle(x, y, w, h, color)
dxDrawRectangle(x, y, w, h, color, false)
dxDrawRectangle(x + 2, y - 1, w - 4, 1, color, false)
dxDrawRectangle(x + 2, y + h, w - 4, 1, color, false)
dxDrawRectangle(x - 1, y + 2, 1, h - 4, color, false)
dxDrawRectangle(x + w, y + 2, 1, h - 4, color, false)
end

local x,y = guiGetScreenSize()
local f = x / 1024
local nY = y*f

function renderZoneBox()
if data.info then dxDrawText(data.info, sx*252/1024, sy*232/768, sx*800/1024, sy*255/768, tocolor(237, 0, 0, 255), 1.00, "default", "center", "center", false) end
setTime(2,0)
-- dxDrawImage(0, 0, x, nY, "img/txt.png", 0, 0, 0, tocolor(255,255,255,255), false)
--roundedRectangle(593*w, 340*h, 580*w, 110*h, tocolor(0, 0, 0, 230))
--dxDrawText("\"Pami?™tacie, jak Los Santos tryska?‚o ĹĽyciem? Taa... Teraz to przesz?‚o?›?‡. Jedyne co tam teraz tryska to zaraza. W 2021 roku rozbi?‚ si?™ samolot U.S. Army przewoĹĽ?…cy tajn?… bro?„ chemiczn?…. JuĹĽ nie tak?… tajn?… skoro wiemy co si?™ sta?‚o, co? W przeci?…gu miesi?…ca zosta?‚o opanowane ca?‚e San Andreas, prĂłcz jednego miejsca... San Fierro. Militaria wojskowe zd?…ĹĽy?‚y zabarykadowa?‡ miasto na tyle, aby zombie si?™ nie przedosta?‚y. Ile moĹĽna ĹĽy?‡ w tym San Fierro... Ci?…gle jedno i to samo. Trzeba si?™ ruszy?‡ [...]\"", 593*w, 327*h, 1173*w, 466*h, tocolor(255, 255, 255, 170), 1.00, "default", "center", "center", false, true, false, false, false)

if not isMouseIn(38, 37, 251, 110) then dxDrawRectangle(38, 147, 251, 2, tocolor(255, 255, 255, 255), false)
else dxDrawRectangle(38, 147, 251, 2, tocolor(255, 0, 150, 230), false) end
if not isMouseIn(38, 182, 251, 110) then dxDrawRectangle(38, 292, 251, 2, tocolor(255, 255, 255, 255), false)
else dxDrawRectangle(38, 292, 251, 2, tocolor(255, 0, 150, 230), false) end
if not isMouseIn(38, 327, 251, 110) then dxDrawRectangle(38, 437, 251, 2, tocolor(255, 255, 255, 255), false)
else dxDrawRectangle(38, 437, 251, 2, tocolor(255, 0, 150, 230), false) end
if not isMouseIn(38, 472, 251, 110) then dxDrawRectangle(38, 582, 251, 2, tocolor(255, 255, 255, 255), false)
else dxDrawRectangle(38, 582, 251, 2, tocolor(255, 0, 150, 230), false) end

dxDrawRectangle(38, 37, 251, 110, tocolor(0, 0, 0, 230), false)
dxDrawRectangle(38, 182, 251, 110, tocolor(0, 0, 0, 230), false)
dxDrawRectangle(38, 327, 251, 110, tocolor(0, 0, 0, 230), false)
dxDrawRectangle(38, 472, 251, 110, tocolor(0, 0, 0, 230), false)
dxDrawText("Spawn SF", 38, 37, 289, 146, tocolor(255, 255, 255, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText("Przechowalnia", 38, 182, 289, 291, tocolor(255, 255, 255, 255), 1.00, czcionka, "center", "center", false, true, false, false, false)
dxDrawText("Mieszkanie", 38, 327, 289, 436, tocolor(255, 255, 255, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText("Baza organizacji", 38, 472, 289, 581, tocolor(255, 255, 255, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)

local x,y=getPointFromDistanceRotation(1838.10, -1564.02, dist, angler)
setCameraMatrix(x,y,120, -1564.02, 60.57)
angler=(angler+0.05)
end

addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if isMouseIn(38, 37, 251, 110) and data.showed then
setElementData(localPlayer,"player:spawn",{-1922.01, 867.64, 35.41+0.2})
closeZones()
end
if isMouseIn(38, 182, 251, 110) and data.showed then
setElementData(localPlayer,"player:spawn",{-1922.01, 867.64, 35.41+0.1})
closeZones()
end
if isMouseIn(38, 327, 251, 110) and data.showed then
local domek=getElementData(localPlayer,"player:house")
if not domek then
setElementData(localPlayer,"player:spawn",{1478.70, -1687.93, 14.05+0.1})
outputChatBox("Nie posiadasz domku!", 255,0,0)
else
outputChatBox("Aby wybra?‡ dom w ktĂłrym chcesz si?™ zespanowa?‡ nast?™pnym razem uĹĽyj komendy /domspawn", 0, 255,0)
end
-- getElementData(gracz,"player:house:list") zwaraca tabele dom[ktorydomgraczazkolei]={x,y,z]
closeZones()
end
if isMouseIn(38, 427, 251, 110) and data.showed then
local org=getElementData(localPlayer,"player:organization:spawn")
if not org then
setElementData(localPlayer,"player:spawn",{1479.51, -1713.07, 14.05+0.1})
outputChatBox("Nie posiadasz organizacji - lub nie posiada ona spawnu!")
closeZones()
else
setTimer(outputChatBox,1500,1,"Pomy?›lnie zrespi?‚e?› si?™ w organizacji.")
setElementData(localPlayer,"player:spawn",{tonumber(org[1]),tonumber(org[2]),tonumber(org[3])})
closeZones()
end
end
end
end)


function closeZones()
showChat(true)
showCursor(false)
fadeCamera(false)
setElementAlpha(localPlayer,255)
stopSound(data.misc)
setPlayerHudComponentVisible("all",false)
setPlayerHudComponentVisible("radar",true)
setPlayerHudComponentVisible("crosshair",true)
setPlayerHudComponentVisible("weapon",false)
setPlayerHudComponentVisible("health",false)
setPlayerHudComponentVisible("breath",false)
setPlayerHudComponentVisible("ammo",true)
data.showed=false
destroyElement(blurShader)
-- Usuwamy elementy
triggerServerEvent("core:spawnPlayer", localPlayer)
setTimer(triggerEvent, 250, 1, "gui:start", localPlayer)
setTimer(setElementData, 500, 1, localPlayer, "player:hud_visible", false)
removeEventHandler("onClientRender", root, renderZoneBox)
blur = false
end

function showZones(misc)
data.misc=misc
data.showed=true
setPlayerHudComponentVisible("all",false)
guiSetInputMode("no_binds_when_editing")
triggerServerEvent("antyLost", localPlayer)
addEventHandler("antyLost",root, localplayer)
addEventHandler("onClientRender", root, renderZoneBox)
end
pozdro


Podpis
Stan projektu: 50%
Nazwa projektu: Taste My Life.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-09, 20:47


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Event "AntyLost" nie jest dodany po stronie serwera.

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Szyszka947
Wysłany: 2019-08-09, 22:38


DenyPL







Wiek: 25
Na forum: 3251 dni
Posty: 64
Nick w MP: D4nyPL



Respekt: 50

"Wilq" napisał/a:

Event "AntyLost" nie jest dodany po stronie serwera.

No to to wiem tylko nie wiem jak doda?.

Podpis
Stan projektu: 50%
Nazwa projektu: Taste My Life.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-08-10, 08:46


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8


Więcej informacji znajdziesz w Wikipedii MTA:

addEvent


Więcej informacji znajdziesz w Wikipedii MTA:

addEventHandler


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Szyszka947
Tagi: panel :: logowania :: -zapamiętaj :: hasło :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku