Raised This Month: $32 Target: $400
 8% 

AWP Player limit.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-23-2020 , 04:42   AWP Player limit.
Reply With Quote #1

Hey, i just wondered if there is a plugin available on AlliedModders - AWP Limit.
by that i mean if players are lower than 14 on server AWP is not allowed to buy, and if they are 14+ then everyone can buy one.
HowToRuski is offline
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
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-23-2020 , 06:52   Re: AWP Player limit.
Reply With Quote #3

Quote:
Originally Posted by r0ma View Post
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;

Did you test the plugin ? Because idk doesnt work for me
HowToRuski is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-23-2020 , 07:40   Re: AWP Player limit.
Reply With Quote #4

What's the version of your amxmodx?
__________________








CrazY. is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-23-2020 , 09:11   Re: AWP Player limit.
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
What's the version of your amxmodx?
1.8.2
HowToRuski is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-23-2020 , 09:50   Re: AWP Player limit.
Reply With Quote #6

Quote:
Originally Posted by HowToRuski View Post
Did you test the plugin ? Because idk doesnt work for me
Plugins load ? no error log? have cstrike module on ?

Tested:
https://prnt.sc/v5cny2
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-23-2020 , 10:24   Re: AWP Player limit.
Reply With Quote #7

Quote:
Originally Posted by r0ma View Post
Plugins load ? no error log? have cstrike module on ?

Tested:
https://prnt.sc/v5cny2
Yes no erros and cstrike module is on, still doesnt work
HowToRuski is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-23-2020 , 10:30   Re: AWP Player limit.
Reply With Quote #8

Quote:
Originally Posted by HowToRuski View Post
1.8.2
need 1.9 jeje
https://wiki.alliedmods.net/AMX_Mod_X_1.9_Release_Notes
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 10-23-2020 , 10:39   Re: AWP Player limit.
Reply With Quote #9

and what about 1.8.2? because if i switch to 1.9 i will need to rewrite my entire plugin directory
HowToRuski is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 10-23-2020 , 10:42   Re: AWP Player limit.
Reply With Quote #10

No you dont, amxx is backward compatible
ZaX is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode