09.02.2011, 08:55
okay this is it
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
Код:
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; }
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