View Single Post
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-23-2020 , 05:22   Re: AWP Player limit.
Reply With Quote #2

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(PLUGINVERSIONAUTHOR)
}

public 
CS_OnBuyAttempt(iditem) {
    if(
item == CSW_AWP && get_playersnum() < MIN_PLAYERS) {
        
client_print(idprint_chat"[AMXX] Need have %d players on server for buy AWP."MIN_PLAYERS);
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;

__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'

Last edited by r0ma; 10-23-2020 at 05:22.
r0ma is offline
Send a message via MSN to r0ma