HTML Code:
function onActionServerside(option) {
if (temp.option == "createGuild") {
temp.guildName = player.chat.substring(9).trim();
addGuildMember(temp.guildName, player.account, player.nick);
player.chat = "Created guild:" SPC temp.guildName @ "!";
player.guild = temp.guildName;
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("/addGuild")) {
triggerserver("weapon", this.name, "createGuild");
}
}
You might want to actually check if the guild already exists
