Jump to content

help script :(


pepsi18

Recommended Posts

what is the problem me the script does not work :(

addCommandHandler ( "money", 
    function ( player, _, who, clan ) 
        local playerWho = findPlayerByName( who )  
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then     
        if ( playerWho ) then 
            local money = tonumber ( money ) 
            if ( money ) then 
             takePlayerMoney ( playerwho, tostring ( money - 0) ) 
                outputChatBox ("Tu dinero disminuyo en ", playerWho, 255, 255, 255, true)         
            end 
        end 
    end 
end 
) 
  
  
function findPlayerByName (name) 
    local player = getPlayerFromName(name) 
    if player then return player end 
    for i, player in ipairs(getElementsByType("player")) do 
        if string.find(string.gsub(getPlayerName(player):lower(),"#%x%x%x%x%x%x", ""), name:lower(), 1, true) then 
            return player 
        end 
    end 
return false 
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...