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

Items And Awp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 11-04-2020 , 15:22   Items And Awp
Reply With Quote #1

Hello friends. How are You. Well I need a plugin For My public Server. I want the plugin disable Items (Grenades) And Awp (players Cant Buy Them) If the players were not enough. It think this plugin alredy exists. So If You Have it Send it for me or make it. Thank You And Sorry For my Bad English.
ho83 is offline
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 17:19   Re: Items And Awp
Reply With Quote #2

bump
ho83 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-04-2020 , 17:26   Re: Items And Awp
Reply With Quote #3

I didn't quite understand what you want, because if the player doesn't have the necessary money he can't buy it by default.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 17:51   Re: Items And Awp
Reply With Quote #4

Quote:
Originally Posted by iceeedr View Post
I didn't quite understand what you want, because if the player doesn't have the necessary money he can't buy it by default.
https://dev-cs.ru/resources/87/
See this plugin. This plugin limits the different parts of the map according to the number of players present on the server. i want something like that but for the Grenades and awp.

Last edited by ho83; 12-04-2020 at 17:52.
ho83 is offline
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 17:55   Re: Items And Awp
Reply With Quote #5

I mean, if there were 6 players on the server, you could use grenades and awp
ho83 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-04-2020 , 18:01   Re: Items And Awp
Reply With Quote #6

what amxx version do you use?
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 18:02   Re: Items And Awp
Reply With Quote #7

1.8.2
ho83 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-04-2020 , 18:22   Re: Items And Awp
Reply With Quote #8

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <cl_buy>

#define CC_COLORS_TYPE CC_COLORS_SHORT
#include <cromchat>
#define InvalidSound(%0)        client_cmd(%0, "speak buttons/button11")

new cVarPlayers
public plugin_init()
{
    
register_plugin("Buy Control""0.1""iceeedr")
        
CC_SetPrefix("^3[^4alliedmodders^3]^1")
        
cVarPlayers create_cvar("minimum_block""6")
}

public 
client_buy(idWeapon)
{
        switch (
Weapon)
        {    
                case 
CSW_HEGRENADECSW_FLASHBANGCSW_SMOKEGRENADECSW_AWP:
                {    
                        if(
GetPlayersNum() < get_pcvar_num(cVarPlayers))
                        {
                                
CC_SendMessage(id"This purchase is only allowed from %i players."get_pcvar_num(cVarPlayers))
                                
InvalidSound(id)
                                return 
PLUGIN_HANDLED
                        
}

                        return 
PLUGIN_CONTINUE
                
}
        }

        return 
PLUGIN_CONTINUE
}

stock GetPlayersNum()
{
    new 
iPlayers[32], iNumidiPlayersNumber
    get_players
(iPlayersiNum)
    for(new 
iiNumi++)
    {
        
id iPlayers[i]

        if(!(
CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT))
            continue

        
iPlayersNumber++
    }
    return 
iPlayersNumber

Attached Files
File Type: sma Get Plugin or Get Source (client_buy.sma - 79 views - 7.7 KB)
File Type: inc cl_buy.inc (256 Bytes, 19 views)
File Type: inc cromchat.inc (22.2 KB, 18 views)
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 12-04-2020 at 18:31.
iceeedr is offline
Send a message via Skype™ to iceeedr
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 18:36   Re: Items And Awp
Reply With Quote #9

Thanks Bro. You Are The Best.

Last edited by ho83; 12-04-2020 at 18:58.
ho83 is offline
ho83
Senior Member
Join Date: Aug 2020
Location: iran
Old 12-04-2020 , 19:10   Re: Items And Awp
Reply With Quote #10

Sorry bro. But First I got This Error :
Quote:
undefined symbol "create_cvar"
And I Fix It With This :
Quote:
register_cvar
But plugin not worked. I Can still buy the grenades and awp

Last edited by ho83; 12-04-2020 at 19:11.
ho83 is offline
Reply



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 19:39.


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