Цитата(Util @ 2.11.2016, 15:08)

Код:
#include <amxmodx>
#include <nvault>
#include <colorchat>
#define PLUGIN "Last Maps"
#define VERSION "1.0"
#define AUTHOR "Letsplayer"
new memory[256]
new lastmaps
new map1[32], map2[32], map3[32], map4[32], map5[32]
public plugin_cfg()
{
lastmaps = nvault_open("lastmaps")
if (lastmaps == INVALID_HANDLE) set_fail_state("Error opening nVault!")
else
{
nvault_get(lastmaps, "LASTMAPS", memory, 255)
parse(memory, map1, 31, map2, 31, map3, 31, map4, 31, map5, 31)
}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /lastmaps", "Show_PreviousMapList");
set_task(600.0, "Show_PreviousMapList_All", 1993, _,_,"b")
}
public Show_PreviousMapList(id)
ColorChat(id, GREY, "^x04Lastmaps: ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04.", map1, map2, map3, map4, map5 );
public Show_PreviousMapList_All()
ColorChat(0, GREY, "^x04Lastmaps: ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04.", map1, map2, map3, map4, map5 );
public plugin_end()
{
new lastmap[32];get_mapname(lastmap, 31);
formatex(memory, 255, "^"%s^" ^"%s^" ^"%s^" ^"%s^" ^"%s^"", map2, map3, map4, map5, lastmap)
nvault_set(lastmaps, "LASTMAPS", memory);nvault_close(lastmaps)
}
Код:
#include <amxmodx>
#include <nvault>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#define print_team_default DontChange
#define print_team_grey Grey
#define print_team_red Red
#define print_team_blue Blue
#endif
#define PLUGIN "Last Maps"
#define VERSION "1.0"
#define AUTHOR "Letsplayer"
new memory[256]
new lastmaps
new map1[32], map2[32], map3[32], map4[32], map5[32]
public plugin_cfg()
{
lastmaps = nvault_open("lastmaps")
if (lastmaps == INVALID_HANDLE) set_fail_state("Error opening nVault!")
else
{
nvault_get(lastmaps, "LASTMAPS", memory, 255)
parse(memory, map1, 31, map2, 31, map3, 31, map4, 31, map5, 31)
}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /lastmaps", "Show_PreviousMapList");
set_task(600.0, "Show_PreviousMapList_All", 1993, _,_,"b")
}
public Show_PreviousMapList(id)
client_print_color(id, print_team_grey, "^x04Lastmaps: ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04.", map1, map2, map3, map4, map5 );
public Show_PreviousMapList_All()
client_print_color(0, print_team_grey, "^x04Lastmaps: ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04, ^x03%s^x04.", map1, map2, map3, map4, map5 );
public plugin_end()
{
new lastmap[32];get_mapname(lastmap, 31);
formatex(memory, 255, "^"%s^" ^"%s^" ^"%s^" ^"%s^" ^"%s^"", map2, map3, map4, map5, lastmap)
nvault_set(lastmaps, "LASTMAPS", memory);nvault_close(lastmaps)
}