PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "r0ma'"
// Players needs for buy awp
const MIN_PLAYERS = 14;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public CS_OnBuyAttempt(id, item) {
if(item == CSW_AWP && get_playersnum() < MIN_PLAYERS) {
client_print(id, print_chat, "[AMXX] Need have %d players on server for buy AWP.", MIN_PLAYERS);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
__________________