Jump to content

small problem


top sniper

Recommended Posts

addEvent("GUIEditor_Button[1]",true)  
  
 addEventHandler("GUIEditor_Button[1]",root,  
  
function() 
  
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 0) then 
         elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ))  then 
    takePlayerMoney(source,0)  
    setGameSpeed(tonumber(10 ))  
     local name = getPlayerName(source) 
  
        outputChatBox ( "#FFCC00[" ..name .. "]:#FF0000 Has killing by {shop}", getRootElement(), 255, 0, 0, true ) 
  
  
  
      
    else 
  
        outputChatBox("ERRoR Shop!", source, 255, 0, 0, true) 
  
  
end  
  
end  
  
)  

it works fine before i add aclGetGroup code ..

:fadein:

Link to comment
addEvent( "GUIEditor_Button[1]",true )  
addEventHandler( "GUIEditor_Button[1]",root,  
    function( ) 
        local acc = getPlayerAccount( source ) 
        if acc then 
            local accName = getAccountName( acc ) 
            local PlayerMoney = getPlayerMoney( source ) 
            if ( PlayerMoney >= 0 ) then 
             
            elseif isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) )  then 
                takePlayerMoney( source,0 )  
                setGameSpeed( 10.0 )  
                outputChatBox ( "#FFCC00[" ..getPlayerName( source ) .. "]:#FF0000 Has killing by {shop}",root, 255, 0, 0, true ) 
            else 
                outputChatBox( "ERRoR Shop!", source, 255, 0, 0 )   
            end 
        end  
    end     
)  

P.S You can tabulate your code in next time?

P.S update code

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...