Quote:
Originally Posted by tarsisd2
I have seen this plugin somewhere but i can't find it
only allow players to buy grenades, depending on how many players on server, with cvar
and print a msg
[amxx] you are not allowed to buy grenades with less then 10 players on the server
if anyone have it
|
Use this awsome plugin:
https://forums.alliedmods.net/showthread.php?t=149380
Then:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cl_buy>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_buy(id, iItem)
{
if(!isBuyBlock(iItem))
return PLUGIN_CONTINUE
if((get_playersnum() >= 9))
return PLUGIN_CONTINUE
client_print(id,print_chat, "The message you wanted")
client_cmd(id,"speak buttons/blip2")
return PLUGIN_HANDLED
}
bool:isBuyBlock(iItem)
{
switch(iItem)
{
case CSW_HEGRENADE, CSW_FLASHBANG, CSW_SMOKEGRENADE: return true
}
return false
}