[INI]Groupname detect?
#1

Heey all,

How can i detect if a groupname alreay is choosen?
I made a command like creategroup:
Код:
dcmd_creategroup(playerid, params[])
{
	new groupname, g = GetFreeGroupID();
	new pName4[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName4,sizeof(pName4));
	//if(!IsPlayerAdmin(playerid)) return 0;
	if(sscanf(params,"u",groupname)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /creategroup [Groupname]");
	else
	{
        fcreate(GroupFile(g));
		format(GroupInfo[g][gName], 35, "%s", groupname);
		format(GroupInfo[g][gOwner], 25, "%s", pName4);
		new INI:file = INI_Open(GroupFile(g));
		INI_WriteString(file, "GroupName", params);
		INI_WriteString(file, "GroupOwner", pName4);
		INI_WriteInt(file, "GroupMoney", 0);
		INI_WriteInt(file, "GroupScore", 0);
		INI_WriteInt(file, "GroupKills", 0);
		INI_WriteInt(file, "GroupDeaths", 0);
		INI_Close(file);
	}
    return 1;
}
How can i detect if a groupname already is choosen?

Admigo
Reply


Messages In This Thread
[INI]Groupname detect? - by Admigo - 18.09.2012, 17:22
Re: [INI]Groupname detect? - by Jochemd - 18.09.2012, 17:23
Re: [INI]Groupname detect? - by Admigo - 18.09.2012, 17:30
Re: [INI]Groupname detect? - by Jochemd - 18.09.2012, 17:53
Re: [INI]Groupname detect? - by Admigo - 18.09.2012, 17:59
Re: [INI]Groupname detect? - by Jochemd - 18.09.2012, 18:29
Re: [INI]Groupname detect? - by Admigo - 18.09.2012, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)