Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <dhudmessage>
- #define PLUGIN "Boost Recommender"
- #define VERSION "1.0"
- #define AUTHOR "trans"
- new g_currentMap[33];
- new g_szLine[64][33];
- new g_szLinesCount;
- new szPlayers[33];
- public plugin_init() {
- register_plugin(PLUGIN, AUTHOR, VERSION);
- register_event("HLTV", "RoundStart", "a", "1=0", "2=0");
- read_sample();
- }
- public read_sample() {
- new path[33];
- new map[33];
- get_mapname(map, 32);
- get_configsdir(path, charsmax(path));
- format(path, charsmax(path), "%s/trans/%s.txt", path, map);
- if(file_exists(path)) {
- new szData[33], szSample[33], iTextLength, iLine;
- while(read_file(path, iLine, szData, charsmax(szData), iTextLength) != 0) {
- if(iLine > charsmax(g_szLine[]))
- break;
- parse(szData, szSample, charsmax(szSample));
- if(szSample[0] == ';' || !szSample[0]) {
- iLine++;
- continue;
- }
- g_szLine[iLine] = szSample;
- iLine++;
- szLinesCount += iLine;
- }
- } else {
- return PLUGIN_HANDLED;
- }
- }
- public RoundStart() {
- new count;
- get_players(szPlayers, count, "e", "TERRORIST");
- new rand = random_num(1, szLinesCount);
- for(new i = 0; i < count; i++) {
- set_dhudmessage(0, 0, 190, -1.0, 0.65, 2, 6.0, 5.0, 0.1, 1.5, false);
- show_dhudmessage(szPlayers[i], "DO %s", g_szLine[rand]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement