Jump to content

what is bad ?


iFoReX

Recommended Posts

bad argument lines 2 and 3 server-side

here the code :

server-side

addEventHandler("onResourceStart", resourceRoot, function() 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
for todos, online in ipairs(getElementsByType) do 
bindKey(online,"F2","down",bindear) 
end 
end 
end 
) 
  
function bindear() 
triggerClientEvent(source, "open:pGUI", source) 
end 

client-side

pedGUI = guiCreateWindow(290,102,773,586,"Creator Ped GUI",false) 
  
guiSetVisible(pedGUI, false) 
showCursor(false) 
  
addEvent("open:pGUI", true) 
addEventHandler("open:pGUI",root,function() 
if guiGetVisible(pedGUI) == true and showCursor == true then 
guiSetVisible(pedGUI,false) 
showCursor(false) 
elseif guiGetVisible(pedGUI) == false and showCursor == false then 
guiSetVisible(pedGUI,true) 
showCursor(true) 
end 
end 
) 

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do 
            if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then 
                local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
                    bindKey ( thePlayer, "F2", "down", bindear ) 
                end 
            end 
        end 
    end 
) 
  
function bindear ( thePlayer ) 
    triggerClientEvent ( thePlayer, "open:pGUI", thePlayer ) 
end 

Link to comment
Guest Guest4401
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do 
            local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
            if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then 
                bindKey ( thePlayer, "F2", "down", bindear ) 
            end 
        end 
    end 
) 
  
function bindear ( thePlayer ) 
    triggerClientEvent ( thePlayer, "open:pGUI", thePlayer ) 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...