Witam, przychodz? mo?e i ze zbyt prostym problemem, ale podczas nauki LUA nie mog? zamkn?? gui, a przycisk nie reaguje. GUI zrobione jest w dxdraw.
addEvent("okno",true) addEventHandler("okno", root, function(value)
if not value then return end
tekst = value
showCursor(true) addEventHandler("onClientRender", root, ostrzezenie)
function warnClose()
if isMouseIn(screenW * 0.5555, screenH * 0.5875, screenW * 0.1008, screenH * 0.0653) then -- miejsce buttona if value then
removeEventHandler("onClientRender", root, ostrzezenie) end
end
end
end)
isMouseIn jakby kto? potrzebowa?, ale jestem pewny, ?e to dzia?a:
function isMouseIn ( x, y, width, height )
if ( not isCursorShowing( ) ) then return false
end
local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else
return false
end
end
Witam Mam problem mianowicie z panelem logowania nie reaguje on na nic wyczy?ci?em baze danych.Lecz Wyskakuje mi napis Konta nie ma w bazie danych nie mam pojecia co zrobi? prosz? o pomoc . Stawiam Piwko
Witam, mam problem mianowicie po wej?ciu w marker 'stan' nic sie nie dzieje.
[lua]
local praca = createMarker(2183,-2253,13.5,"cylinder",2,255,255,255,255,getRootElement())
local stanowiska = {
{2175.5634765625, -2267.458984375, 12.3-3,"cylinder",6,66, 134, 244,255},
{2167.947265625, -2274.8017578125, 12.3-3,"cylinder",6,66, 134, 244, 255}
}
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.
function greeting7Handler ()
local localPlayerName = getAccountName(getPlayerAccount(client))
if localPlayerName == "P8A70088L6" or "Samel" then
addPedClothes ( source, "capzip", "cap", 16 )
outputChatBox(" #FFFFFF[#00FF00Select-skin#FFFFFF]:#F70606 tutaj!", thePlayer, 27, 89, 224, true)
else
outputChatBox(" #FFFFFF[#00FF00Select-skin#FFFFFF]:#F70606 nie masz, thePlayer, 27, 89, 224, true)
end
end
addEvent( "onGreeting7", true )
addEventHandler( "onGreeting7", getRootElement(), greeting7Handler )
//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, potrzebuj? jak najszybszej pomocy z bindKey kt?ry odpowiada..
kod
local pracageo=createMarker(2500.60, -1669.45, 13.35-1,"cylinder", 1.1, 150, 120, 255,125)
addEventHandler("onClientMarkerHit", pracageo, function(el, md)
if not md or getElementType(el) ~= "player" then return end if el ~= localPlayer then return end
outputChatBox("DZIALA MARKER ",54, 203, 51) end)
bindKey("e", "down", function()
if not isElementWithinMarker(localPlayer, pracageo) then return end if not getElementData(localPlayer, "startJob") then
setElementData(localPlayer, "startJob", true) outputChatBox("DZIALA BIND",54, 203, 51) end
end)