function createGroupForPlayer (playersource,command,...)
local teamName = table.concat({...}, " ")
local money = getPlayerMoney(playersource)
if not isGuestAccount(getPlayerAccount(playersource)) and getElementData(playersource,"gang") == "None" then
if teamName then
if ( money < 5000 ) then
outputChatBox ("#FFFFFFYou don't have enough money to create a group! [Kill more zombies]",playersource,27, 89, 224,true)
return
end
if not isGangExisting (teamName) then
addGang (teamName,getAccountName(getPlayerAccount(playersource)))
setAccountData(getPlayerAccount(playersource),"gangslots",12)
takePlayerMoney(playersource, 5000)
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)