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

Wysłany: 2017-02-04, 15:18


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

Witam mam problem z kodem wykonanym przez Malentasa chodzi o to ze jak wchodz? w marker ?eby mnie tp do int to mi wyskakuje gui za?o?enia organizacji pierwszy raz sie z takim b??dem spotykam wiec prosz? o pomoc z tym.
S:
local markerek createMarker(-218.43,1406.58,27.77-2"cylinder"1.51281600)
setElementInterior(markerek18)

addEvent("zalozs"true)
addEventHandler("zalozs"root, function(nazwa)
if tonumber(getElementData(source"player:hours")) < 300 then
outputChatBox("Nie posiadasz 5h(300min) online",source)
return
end
if getElementData(source"player:organization"then
outputChatBox("Posiadasz organizacje",source)
return
end
if tonumber(getPlayerMoney(source)) < 99999 then
outputChatBox("Nie sta? cie na za?o?enie organizacji",source)
return
end
takePlayerMoney(source,100000)
setElementData(source"player:organization"nazwa)
exports["ogrpg-db"]:dbSet("INSERT INTO ogrpg_organizations SET uid=?, code=?, rank=?"getElementData(source"player:uid"), nazwa"4")
outputChatBox("Pomy?lnie za?o?y?e? organizacje o nazwie "..nazwa.." koszt 100000 PLN."source02550)
end)
-------------------------------------------------------------------------------------------------------------------------------------------
wejscie createMarker (693.61,1967.69,5.54+1"arrow"2128,192,0)
wyjscie createMarker (-229.29,1401.29,27.77+1"arrow"2128,192,0)
setElementInterior(wyjscie18)

addEventHandler("onMarkerHit"wejscie, function(el,md)
    if getElementType(el) == "player" then
        if isPedInVehicle(elthen return end
        setElementInterior(el18)
        setElementPosition(el, -227.24,1401.03,27.77)
    end
end)

addEventHandler("onMarkerHit"wyjscie, function(el,md)
    if getElementType(el) == "player" then
        if isPedInVehicle(elthen return end
        setElementInterior(el0)
        setElementPosition(el693.65,1964.64,5.54)
    end
end)

C:
--[[
    System tworzenia organizacji
    @author Malentas
    @dla gtao.pl
    Zakaz usuwania autora!
]]

local screenWscreenH guiGetScreenSize()
local sxsy guiGetScreenSize()

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

podanaNazwa guiCreateEdit(0.310.410.340.05"Nazwa"true)    
guiSetVisible(podanaNazwafalse)  

function gui()
        dxDrawRectangle(screenW 0.2889screenH 0.1811screenW 0.3931screenH 0.4489tocolor(000195), false)
        dxDrawRectangle(screenW 0.2882screenH 0.1722screenW 0.3937screenH 0.0556tocolor(140201255), false)
        dxDrawText("Panel Zak?adania organizacji!"screenW 0.2882screenH 0.1711screenW 0.6819screenH 0.2278tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("?eby za?o?y? organizacje musisz mie? 1200min czyli 20h i 10000 PLN"screenW 0.2882screenH 0.1922screenW 0.6819screenH 0.3800tocolor(255255255255), 1.00"default""center""center"falsefalsefalsefalsefalse)
        if isMouseIn(screenW 0.3243screenH 0.5556screenW 0.3194screenH 0.0633then
        dxDrawRectangle(screenW 0.3243screenH 0.5556screenW 0.3194screenH 0.0633tocolor(140201155), false)
        else
        dxDrawRectangle(screenW 0.3243screenH 0.5556screenW 0.3194screenH 0.0633tocolor(140201255), false)
        end
        dxDrawText("Za??? organizacje"screenW 0.3236screenH 0.5567screenW 0.6438screenH 0.6189tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
end

addEventHandler("onClientMarkerHit"resourceRoot, function(el)
if el ~= localPlayer then return end
if isCursorShowing el then return end
addEventHandler("onClientRender"getRootElement(), gui)
showCursor(truefalse)
guiSetVisible(podanaNazwatrue)
end)

addEventHandler("onClientMarkerLeave"resourceRoot, function(el)
if el ~= localPlayer then return end
removeEventHandler("onClientRender"getRootElement(), gui)
showCursor(false)
guiSetVisible(podanaNazwafalse)
end)

addEventHandler("onClientClick"root, function(btnstate)
if btn == "left" and state == "down" then
if isMouseIn(sscreenW 0.3236screenH 0.5567screenW 0.6438screenH 0.6189) and guiGetVisible(podanaNazwathen
local nazwa guiGetText(podanaNazwa)
if nazwa:len() < 1 then
outputChatBox("Nazwa organizacji powinna mie? minimum 1 liczbe"localPlayer)
return
end
if nazwa:len() > 10 then
outputChatBox("Nazwa organizacji powinna mie? maksimum 10 liczb"localPlayer)
return
end
triggerServerEvent("zalozs"localPlayernazwa)
end
end
end)


Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 15:22


AssasiPlayGames







Wiek: 22
Na forum: 3758 dni
Posty: 176
Nick w MP: NiFeKpL

Piwa: 909

Respekt: 70,5

STOPseba, daj mo?e int w nowym pliku

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Wysłany: 2017-02-04, 15:23


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

"AssasiPlayGames" napisał/a:

STOPseba, daj mo?e int w nowym pliku

Da?em i to samo by?o jakby by? taki problem to bym tu nie pisa? :)

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 15:37


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4150 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Musisz przerobi? kod, aby po wej?ciu w marker triggerowa? na client, albo przenie?? marker na client.
addEventHandler("onClientMarkerHit"resourceRoot, function(el)
if el ~= localPlayer then return end
if isCursorShowing el then return end
addEventHandler("onClientRender"getRootElement(), gui)
showCursor(truefalse)
guiSetVisible(podanaNazwatrue)
end)

addEventHandler("onClientMarkerLeave"resourceRoot, function(el)
if el ~= localPlayer then return end
removeEventHandler("onClientRender"getRootElement(), gui)
showCursor(false)
guiSetVisible(podanaNazwafalse)
end)
resourceRoot powoduje dzia?anie na ca?y zas?b. Malentas nie ma do?wiadczenia nie powinien si? bra? za co? o czym nie ma poj?cia.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
STOPseba
Tagi: organizacje :: itp
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Organizacje tp itp 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