Clanconfig.txt
#3

okay this is it

Код:
rConfig()
{
	new File:fhandle;
	new cname[256];
	new temp[256];
	new value[256];
	fhandle = fopen("ClanConfig.txt",io_readwrite);
	while(fread(fhandle,temp,sizeof(temp),false))
	{
		cname = strtok(temp,0);
		value = strtok(temp,(strlen(cname)+1));

		if(strcmp(cname,"Team-1",true) == 0) strins(TEAM1,value,0,MAX_STRING);
		else if(strcmp(cname,"Team-2",true) == 0) strins(TEAM2,value,0,MAX_STRING);
		else if(strcmp(cname,"Max-Clan-Kills",true) == 0) MAXKILLS = strval(value);
		else if(strcmp(cname,"Max-Rounds",true) == 0) MaxRounds = strval(value);
		else if(strcmp(cname,"Weapon1",true) == 0) wpn1 = strval(value);
		else if(strcmp(cname,"Weapon2",true) == 0) wpn2 = strval(value);
		else if(strcmp(cname,"Weapon3",true) == 0) wpn3 = strval(value);
		else if(strcmp(cname,"Ammo1",true) == 0) ammo1 = strval(value);
		else if(strcmp(cname,"Ammo2",true) == 0) ammo2 = strval(value);
		else if(strcmp(cname,"Ammo3",true) == 0) ammo3 = strval(value);
	}
	
	fclose(fhandle);
	return 1;
}
scriptfiles/ClanConfig.txt

Team-1 D$K1
Team-2 D$K2
Max-Clan-Kills 3
Max-Rounds 3
Weapon1 26
Weapon2 28
Weapon3 0
Ammo1 99999
Ammo2 99999
Ammo3 0


this is what we need i think
if need anything else tell me i'll post it too and yeah im new here in these forums ;P
Reply


Messages In This Thread
Clanconfig.txt - by SonToku - 09.02.2011, 07:55
Re: Clanconfig.txt - by On_Top_Non_Stop - 09.02.2011, 08:26
Re: Clanconfig.txt - by SonToku - 09.02.2011, 08:55
Re: Clanconfig.txt - by SonToku - 09.02.2011, 09:19
Re: Clanconfig.txt - by Cameltoe - 09.02.2011, 09:42
Re: Clanconfig.txt - by SonToku - 09.02.2011, 10:26
Re: Clanconfig.txt - by Cameltoe - 09.02.2011, 10:38
Re: Clanconfig.txt - by SonToku - 09.02.2011, 11:12
Re: Clanconfig.txt - by SonToku - 09.02.2011, 14:00
Re: Clanconfig.txt - by Cameltoe - 09.02.2011, 19:19

Forum Jump:


Users browsing this thread: 2 Guest(s)