RSSy MYGO.pl Opublikowano Czerwiec 15, 2023 o 17:36 RSSy Udostępnij Opublikowano Czerwiec 15, 2023 o 17:36 PHP Code: public mmLoadMaps(szConfigDir[], szMapFile[]) { new szFilename[STRING_MAX] new szData[STRING_MAX] g_mapNums[g_modCount] = 0 formatex(szFilename, sizeof(szFilename) - 1, "%s/%s", szConfigDir, szMapFile) new f = fopen(szFilename, "rt") while(!feof(f)) { fgets(f, szData, STRING_MAX) trim(szData) if(!szData[0] || szData[0] == ';' || (szData[0] == '/' && szData[1] == '/')) continue // server_print("Loading Map %s for %s mod", szData, g_modNames[g_modCount]) ArrayPushString(g_modMaps[g_modCount], szData) g_mapNums[g_modCount]++ } fclose(f) } I have map voting plugin and normally the plugin takes map names on list. Example list: de_dust de_inferno de_cbble Normally with this list, 3 map is voting and i want to this: de_dust,de_inferno de_cbble If I separate the maps on the same line with a comma, one of the maps will be chosen randomly. One of the de_dust, de_inferno maps will be selected and a total of 2 maps will be put to the vote together with de_cbble. Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi