Jump to content

Group name length limit


dewu

Recommended Posts

Hello.

Is any way to set group/gang limit of lengths?

function createGroupForPlayer (playersource,command,...) 
    local teamName = table.concat({...}, " ") 
    if not isGuestAccount(getPlayerAccount(playersource)) and getElementData(playersource,"gang") == "None" then 
        if teamName then 
            if not isGangExisting (teamName) then 
            addGang (teamName,getAccountName(getPlayerAccount(playersource))) 
            setAccountData(getPlayerAccount(playersource),"gangslots",30) 
            outputChatBox ("#FFFFFFYou successfully created your group with the name of: "..teamName..".",playersource,27, 89, 224,true)     
            else 
                outputChatBox ("#FFFFFFThere is a group with this name already!",playersource,27, 89, 224,true)  
            end 
        else 
            outputChatBox ("#FFFFFFSyntax is /creategroup !",playersource,27, 89, 224,true)    
        end 
    else 
        outputChatBox ("#FFFFFFYou are in a group already!",playersource,27, 89, 224,true)       
    end 
end 
addCommandHandler("creategroup",createGroupForPlayer) 

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