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

Solved Block buying helmet in specifed round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sw33T3R
AlliedModders Donor
Join Date: Mar 2014
Old 05-19-2019 , 10:30   Block buying helmet in specifed round
Reply With Quote #1

Hello
I'm searching a plugin which block buying helmet in 1st and 2nd round

Last edited by Sw33T3R; 05-22-2019 at 13:31.
Sw33T3R is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 05-21-2019 , 10:23   Re: Block buying helmet in specifed round
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <cstrike>

#define PREFIX "[SM]"

public Action CS_OnBuyCommand(int client, const char[] sWeapon)
{
    
int CurrentRound CS_GetTeamScore(CS_TEAM_T) + CS_GetTeamScore(CS_TEAM_CT);
    if (
CurrentRound <= 2)
    {
        if (
StrContains(sWeapon"helmet"))
        {
            
PrintToChat(client"%s You cannot buy helmet before round 3!");
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;

Try use that , Untested.
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
Cruze
Veteran Member
Join Date: May 2017
Old 05-22-2019 , 13:06   Re: Block buying helmet in specifed round
Reply With Quote #3

PHP Code:
#include <sourcemod>
#include <cstrike>

#define PREFIX "[SM]"

public Action CS_OnBuyCommand(int client, const char[] sWeapon)
{
    
int CurrentRound CS_GetTeamScore(CS_TEAM_T) + CS_GetTeamScore(CS_TEAM_CT);
    if (
CurrentRound <= 2)
    {
        if (
StrContains(sWeapon"helmet"))
        {
            
PrintToChat(client"%s You cannot buy helmet before round 3!"PREFIX);
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;

__________________
Taking paid private requests! Contact me
Cruze is offline
Sw33T3R
AlliedModders Donor
Join Date: Mar 2014
Old 05-22-2019 , 13:31   Re: Block buying helmet in specifed round
Reply With Quote #4

Thanks guys
Sw33T3R is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 05-22-2019 , 13:38   Re: Block buying helmet in specifed round
Reply With Quote #5

Quote:
Originally Posted by Cruze View Post
PHP Code:
#include <sourcemod>
#include <cstrike>

#define PREFIX "[SM]"

public Action CS_OnBuyCommand(int client, const char[] sWeapon)
{
    
int CurrentRound CS_GetTeamScore(CS_TEAM_T) + CS_GetTeamScore(CS_TEAM_CT);
    if (
CurrentRound <= 2)
    {
        if (
StrContains(sWeapon"helmet"))
        {
            
PrintToChat(client"%s You cannot buy helmet before round 3!"PREFIX);
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;

What did you change there?
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
Cruze
Veteran Member
Join Date: May 2017
Old 05-22-2019 , 14:43   Re: Block buying helmet in specifed round
Reply With Quote #6

Quote:
Originally Posted by Pilo View Post
What did you change there?
You forgot to add "PREFIX" while using PrintToChat
__________________
Taking paid private requests! Contact me
Cruze is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 05-22-2019 , 15:33   Re: Block buying helmet in specifed round
Reply With Quote #7

Quote:
Originally Posted by Cruze View Post
You forgot to add "PREFIX" while using PrintToChat
Ah, ok thanks.
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo 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 06:41.


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