Group System
#1

How to make Group System saving with Dini & dudb ?

I'v /groupcreate cmds

CMD :
Код:
COMMAND:groupcreate(playerid, params[])
{
  	if(group[playerid][gid] != -1) return SendClientMessage(playerid, 0xFF0000, "Leave your group with {FFFFFF}/groupleave{FF0000} before creating a new one!");
  	if(strlen(params) > 49 || strlen(params) < 3) return SendClientMessage(playerid, 0xFF0000, "Usage: {FFFFFF}/groupcreate{FF0000} (Group name 3-50 characters)!");
	if(IsGroupTaken(params)) return SendClientMessage(playerid, 0xFF0000, "Group name is already in use!");
	CreateGroup(params, playerid);
  	return 1;
}
Stock CreateGroup :
Код:
stock CreateGroup(grpname[], owner)
{
	new slotid = FindNextSlot();
	groupinfo[slotid][leader] = owner;
	format(groupinfo[slotid][grname], 75, "%s", grpname);
	groupinfo[slotid][active] = 1;
	group[owner][gid] = slotid;
	group[owner][order] = 1;
	new string[120];
	format(string, sizeof(string), "You have created the group %s(ID:%d)", grpname, slotid);
	SendClientMessage(owner, 0xFFCC66, string);
	return slotid;
}
How to make it Saving when Server Down / Restart ?

*SorryForMyBadEnglish :P , Rewards : +REP :P
Reply


Messages In This Thread
Group System - by WhiteAngels - 25.06.2014, 06:34
Re: Group System - by BroZeus - 25.06.2014, 06:35
Re: Group System - by WhiteAngels - 25.06.2014, 06:44
Re: Group System - by RenovanZ - 25.06.2014, 07:03
Re: Group System - by WhiteAngels - 25.06.2014, 10:51
Re: Group System - by WhiteAngels - 26.06.2014, 02:55

Forum Jump:


Users browsing this thread: 1 Guest(s)