18.08.2012, 01:53
Aqui estб onde ta dando erro:
Код:
public LoadConfigs() { new Data[MaxString],idz; MaxPing=dini_Int(ConfigFile,"MaxPing"); MaxAfk=dini_Int(ConfigFile,"MaxAfkTime"); ServerInfo[SyncDelay]=dini_Int(ConfigFile,"SyncTime"); Data=dini_Get(ConfigFile,"SelectScreen"),idz=0; SelectScreen[0]=floatstr(strtok(Data,idz,',')); SelectScreen[1]=floatstr(strtok(Data,idz,',')); SelectScreen[2]=floatstr(strtok(Data,idz,',')); SelectScreen[3]=floatstr(strtok(Data,idz,',')); SelectScreen[4]=floatstr(strtok(Data,idz,',')); Data=dini_Get(ConfigFile,"MainSpawn"),idz=0; MainSpawn[0]=floatstr(strtok(Data,idz,',')); MainSpawn[1]=floatstr(strtok(Data,idz,',')); MainSpawn[2]=floatstr(strtok(Data,idz,',')); MainSpawn[3]=floatstr(strtok(Data,idz,',')); MainSpawn[4]=floatstr(strtok(Data,idz,',')); ServerInfo[MainTime]=dini_Int(ConfigFile,"MainTime"); ServerInfo[MainWeather]=dini_Int(ConfigFile,"MainWeather"); ServerInfo[GameType]=dini_Int(ConfigFile,"GameType"); ServerInfo[StartTime]=dini_Int(ConfigFile,"StartTime"); ServerInfo[RoundTime]=dini_Int(ConfigFile,"RoundTime"); ServerInfo[CpTime]=dini_Int(ConfigFile,"CpTime"); ServerInfo[AutoPause]=dini_Int(ConfigFile,"AutoPause"); ServerInfo[LockDuel]=dini_Int(ConfigFile,"LockDuel"); ServerInfo[LockChat]=dini_Int(ConfigFile,"LockChat"); ServerInfo[LockVote]=dini_Int(ConfigFile,"LockVote"); ServerInfo[CurrentRound]=dini_Int(ConfigFile,"CurrentRound"); ServerInfo[TotalRound]=dini_Int(ConfigFile,"TotalRound"); WeaponsType=dini_Int(ConfigFile,"WeaponsType"); format(TeamInfo[TeamA][Name],MaxTeamName,"%s",dini_Get(ConfigFile,"TeamAName")); TeamInfo[TeamA][Skin]=dini_Int(ConfigFile,"TeamASkin"); TeamInfo[TeamA][Color]=HexToInt("0x6277FFFF"); TeamInfo[TeamA][Color1]=HexToInt("0x212A61FF"); TeamInfo[TeamA][Rounds]=dini_Int(ConfigFile,"TeamAScore"); format(TeamInfo[TeamB][Name],MaxTeamName,"%s",dini_Get(ConfigFile,"TeamBName")); TeamInfo[TeamB][Skin]=dini_Int(ConfigFile,"TeamBSkin"); TeamInfo[TeamB][Color]=HexToInt("0x75D860FF"); TeamInfo[TeamB][Color1]=HexToInt("0x2F5A26FF"); TeamInfo[TeamB][Rounds]=dini_Int(ConfigFile,"TeamBScore"); format(TeamInfo[TeamC][Name],MaxTeamName,"%s",dini_Get(ConfigFile,"TeamCName")); TeamInfo[TeamC][Skin]=dini_Int(ConfigFile,"TeamCSkin"); TeamInfo[TeamC][Color]=HexToInt("0xE65A5EFF"); TeamInfo[TeamC][Color1]=HexToInt("0x540C0EFF"); } e a LoadVehicles() { for(new i = 1; i <= 100; i++) { new File[50]; format(File,50,"%sVehicle%d.ini",VehiclesFile,i); if(dini_Exists(File)) { new modelid,Float:pos[4],color1,color2,interior; modelid = dini_Int(File,"Model"); color1 = dini_Int(File,"Color1"); color2 = dini_Int(File,"Color2"); interior = dini_Int(File,"Interior"); new Data[MaxString],idz; Data=dini_Get(File,"Pos"),idz=0; pos[0] = floatstr(strtok(Data,idz,',')); pos[1] = floatstr(strtok(Data,idz,',')); pos[2] = floatstr(strtok(Data,idz,',')); pos[3] = floatstr(strtok(Data,idz,',')); VehicleId[i]=AddStaticVehicle(modelid,pos[0],pos[1],pos[2],pos[3],color1,color2); Vehiclelevel[VehicleId[i]]=dini_Int(File,"Level"); VehicleFile[VehicleId[i]]=i; LinkVehicleToInterior(VehicleId[i],interior); } } //============================================================================== //=================== START ROUND SYSTEM =========================== //============================================================================== StartRound() { ServerInfo[RoundType]=Starting; ServerInfo[RoundNumber]++; ServerInfo[Secs]=ServerInfo[StartTime]; ServerInfo[Minutes]=ServerInfo[RoundTime]; ServerInfo[Seconds]=0; ServerInfo[Cp]=ServerInfo[CpTime]; new File[50],data[256],idz=0; if(ServerInfo[RoundStartType]==Aad) { format(File,50,"%sArena%d.ini",AadFile,ArenaId); format(data,MaxString,"%s",dini_Get(File,"Att")),idz=0; ArenaCoord[0] = floatstr(strtok(data,idz,',')); ArenaCoord[1] = floatstr(strtok(data,idz,',')); ArenaCoord[2] = floatstr(strtok(data,idz,',')); ArenaCoord[3] = floatstr(strtok(data,idz,',')); format(data,MaxString,"%s",dini_Get(File,"Def")),idz=0; ArenaCoord[4] = floatstr(strtok(data,idz,',')); ArenaCoord[5] = floatstr(strtok(data,idz,',')); ArenaCoord[6] = floatstr(strtok(data,idz,',')); ArenaCoord[7] = floatstr(strtok(data,idz,',')); format(data,MaxString,"%s",dini_Get(File,"Ref")),idz=0; ArenaCoord[8] = floatstr(strtok(data,idz,',')); ArenaCoord[9] = floatstr(strtok(data,idz,',')); ArenaCoord[10] = floatstr(strtok(data,idz,',')); ArenaCoord[11] = floatstr(strtok(data,idz,',')); format(data,MaxString,"%s",dini_Get(File,"Cp")),idz=0; ArenaCoord[12] = floatstr(strtok(data,idz,',')); ArenaCoord[13] = floatstr(strtok(data,idz,',')); ArenaCoord[14] = floatstr(strtok(data,idz,',')); }