void clif_parse_CreateGuild(int fd,struct map_session_data *sd)
{
char name[NAME_LENGTH];
safestrncpy(name, RFIFOP(fd,6), NAME_LENGTH);
if(sd->group_id == 1){
clif->message(fd, "You cannot create a Guild.");
return;
}
if(map->list[sd->bl.m].flag.guildlock) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return;
}
guild->create(sd, name);
}
Inc clif.cThank you, works perfect.
How about the joining guilds? can i make it so players cannot invite group_id = 1 players to their guild?
bool clif_sub_guild_invite(int fd, struct map_session_data *sd, struct map_session_data *t_sd) {
if ( t_sd == NULL )// not online or does not exist
return false;
nullpo_retr(false, sd);
nullpo_retr(false, t_sd);
if ( map->list[sd->bl.m].flag.guildlock ) {
clif->message(fd, msg_fd(fd,228)); // Guild modification is disabled in this map.
return false;
}
if(sd->group_id == 1){
clif->message(fd, "You cannot create a Guild.");
return false;
}
if (t_sd->state.noask) {// @noask [LuzZza]
clif->noask_sub(sd, t_sd, 2);
return false;
}
guild->invite(sd,t_sd);
return true;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.