Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: close
1. c.lua:137: 'end' expected (to close 'if' at line 133) near '
Witam czego nie zamkn??em?

addEventHandler("onClientClick", root, function(btn,state)
    
local screenW, screenH = guiGetScreenSize()
    if 
btn=="left" and state=="down" then
        
if isMouseIn(469, 311, 119, 48)  then
            
if getElementData( localPlayer, "player:srp" ) < 2500 then
                
return outputChatBox("&#10008; #FFFFFFNie posiadasz wymaganej reputacji. (2500 SRP)", localPlayer, 255, 0, 0, true)
            
                elseif 
hajs < 250000 then
                  
return outputChatBox("&#10008; #FFFFFFNie posiadasz wymaganej got?wki. (250,000$)", localPlayer, 255, 0, 0, true) then
                    takePlayerMoney
(localPlayer,250000) then
                    outputChatBox
("&#10003; #FFFFFFZakupi?e?/a? bro? AK-47", localPlayer, 71, 122, 0, true)
                    
triggerServerEvent("ak47", localPlayer, function()
                
end
            end
        end
    end
end
)


DB3: c.lua:137: 'end' expected (to close 'if' at line 133) near 'then'
2. ')' expected (to close '(' at line 131) near 'end'
            addEventHandler("onClientMarkerHit", markerList, function(hit)
                if 
hit ~= localPlayer then return end
                
if isPedInVehicle(localPlayer) then 
                outputChatBox
("Nie mo?esz siedzie? w poje?dzie!", 255, 0, 0) return end
                zrobione 
= zrobione+1
                destroyElement
(source)
                
destroyElement(blipList)
                            
local pieniadz = math.random(10, 200)
                                  
local pos = math.random(1,#items2)
                                          
eq:insertItem('items[pos][1]', 1)
                          
triggerServerEvent("giveMoney", localPlayer, pieniadz)
end
 end
                
if zrobione == #punktyListonosza then
                        
setElementData(localPlayer, "praca", nil)
                    return
                
end
                            end
            end
)
            
end

Za pomoc resp + piwo , nie wiem proboje dodawac end ale nadal wciaz ten sam blad
3. close
Hejka zn?w mam problem z pokazywaniem Gui.

server.lua
addCommandHandler("panelR", function(thePlayer)
        if 
getElementData(client, "player:adminS") then
            triggerClientEvent
(client, "pokaz:gui", resourceRoot)
            
outputChatBox(client, "?eby zamkn?c gui kliknij przycisk ZAMKNIJ")
        
end)


client.lua

addEvent("pokaz:gui", true)
addEventHandler("pokaz:gui", getRootElement(), function()
  
showGUI(true)
end)

---
inny kod

function showGUI(value)
    if 
value then
        showCursor
(true)
        
guiSetVisible(buttons.button1, true)
        
guiSetVisible(buttons.button2, true)
        
guiSetVisible(buttons.button3, true)
        
guiSetVisible(window.window1, true)
    
guiSetVisible(memo.memo1, true)
    
guiMemoSetReadOnly(memo, true),
    
guiWindowSetSizable(window.window1, false)
    else
        
showCursor(false)
        
guiSetVisible(buttons.button1, false)
        
guiSetVisible(buttons.button2, false)
        
guiSetVisible(buttons.button3, false)
        
guiSetVisible(window.window1, false)
    
guiWindowSetSizable(window.window1, false)
    
guiSetVisible(memo.memo1, false)
    
end


Brak b??d?w w db3
4. close
Przychodz? z do?? dziwnym problemem, jako? dzisiaj po godzinie czternastej wszystkie skrypty korzystaj?ce z zasob?w guieditora przesta?y renderowa? gui. Nawet nowe stworzone gui przez editora nie dzia?a, a powinno by? w?a?nie odwrotnie. Wszystkie funkcje s? poprawne, nie ma mo?liwo?ci, ?eby by? jaki? b??d w skrypcie.
5. 'end' expected (to close 'function' at line 172) near 'kliki
[lua]
bindKey("mouse1", "down", function()
if kliki > 99 then
setElementData(localPlayer, "mozna:klikac:drwal", false)
kliki = 0
end
end)
addEventHandler("onClientMarkerHit", markerNapad , function()
triggerServerEvent("giveMoney", localPlayer, pieniadz)
exports["np-notyfikacje"]:noti(" wykonano: "..kasa.."$")
local kasa = math.random(10, 200)
return
gui(localPlayer)
kliki = kliki+1
end
return
end)
[/lua]
i jeszcze gui mi si? nie wy?wietla po wej?ciu w marker

[lua]
function gui()
setElementData(localPlayer, "mozna:klikac:drwal", true)
if kliki > 99 then return end
addEventHandler("onClientRender", root, function()
if not getElementData(localPlayer, "mozna:klikac:drwal") then return end
dxDrawText("Klikaj, aby rozwali? maszynen"..kliki.."/100", (288-1)*px, (253-1)*py, (766-1)*px, (435-1)*py, tocolor(0, 0, 0, 255), 3.00*px, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("Klikaj, aby ?ci?? drzewon"..kliki.."/100", (288+1)*px, (253-1)*py, (766+1)*px, (435-1)*py, tocolor(0, 0, 0, 255), 3.00*px, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("Klikaj, aby ?ci...
6. ')' expected (to close '(' at line 170) near end
bindKey("mouse1", "down", function()
    if 
kliki > 99 then
            setElementData
(localPlayer, "mozna:klikac:drwal", false)
            
kliki = 0
            end
        addEventHandler
("onClientMarkerHit", markerDrzewo, function(hit)
gui()
    
kliki = kliki+1
    
return
end)


linijka 170

            end


Za pomoc daj? rep i piwko
7. 'end' excepted (to close 'if' function at line 20) '<eof&
function login(player, command)
if 
getAdmin then
    
if not getElementData(thePlayer, "player:admin") then
        setElementData
(thePlayer, "player:admin")
        
triggerClientEvent("create:noti", thePlayer, "Zalogowa?e? si? na duty")
    else
        if 
getElementData(thePlayer, "player:admin") then
            player
:removedata("player:admin")
            
triggerClientEvent("create:noti", thePlayer, "Wylogowa?e? si? z duty")
        
end
    end

 addCommandHandler
("duty", login)
8. [INNE] close
close
9. [INNE] Brama open i close
Witam jestem zielony w Mta i nie wiem jak zrobi? bram? prosz? o gotow? bram? daje screen gdzie ma by?. Prosz? nie pisz ?e "to ju? by?o" "zr?b sobie sam" "zobacz poradnik jak zrobi? bram?" Najlepiej gdyby? da? pwn i amx za pomoc piwko! Je?eli mo?na niech si? otwiera w d?? Tak ma wygl?da?