AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   He limit (https://forums.alliedmods.net/showthread.php?t=293965)

Administrator 02-16-2017 06:09

He limit
 
Good afternoon.
Please tell me how to make the purchase of 2 he grenade?

edon1337 02-16-2017 08:23

Re: He limit
 
You must have client_buy.amxx activated https://forums.alliedmods.net/showthread.php?t=149380
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <cl_buy>

public plugin_init() 
register_plugin("Block HE Buy""1.0""DoNii");

public 
client_buy(idiItem)
{
    if( 
iItem == CSW_HEGRENADE && cs_get_user_bpammo(idCSW_HEGRENADE) > )
    {
        
        
client_print(idprint_chat"You Can't Buy More HE Grenades");
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;



Administrator 02-16-2017 08:29

Re: He limit
 
Quote:

Originally Posted by edon1337 (Post 2495831)
You must have client_buy.amxx activated https://forums.alliedmods.net/showthread.php?t=149380
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <cl_buy>

public plugin_init() 
register_plugin("Block HE Buy""1.0""DoNii");

public 
client_buy(idiItem)
{
    if( 
iItem == CSW_HEGRENADE && cs_get_user_bpammo(idCSW_HEGRENADE) > )
    {
        
        
client_print(idprint_chat"You Can't Buy More HE Grenades");
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;



Without client_buy.amxx can not do?

edon1337 02-16-2017 08:41

Re: He limit
 
no

Administrator 02-16-2017 08:58

Re: He limit
 
does not work :(

OciXCrom 02-16-2017 09:00

Re: He limit
 
I don't see how that would work.

Administrator 02-16-2017 09:04

Re: He limit
 
Quote:

Originally Posted by edon1337 (Post 2495831)
You must have client_buy.amxx activated https://forums.alliedmods.net/showthread.php?t=149380
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <cl_buy>

public plugin_init() 
register_plugin("Block HE Buy""1.0""DoNii");

public 
client_buy(idiItem)
{
    if( 
iItem == CSW_HEGRENADE && cs_get_user_bpammo(idCSW_HEGRENADE) > )
    {
        
        
client_print(idprint_chat"You Can't Buy More HE Grenades");
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;



Buy first, I want to buy a second, but it says that I can not.
Message writes not of the plugin.

Administrator 02-16-2017 09:09

Re: He limit
 
Maybe you can catch a message that you can not buy more, give the player a 2 he, subtract money and add a check whether the player has 2 he?

edon1337 02-16-2017 09:56

Re: He limit
 
Quote:

Originally Posted by OciXCrom (Post 2495843)
I don't see how that would work.

huh

Administrator 02-16-2017 10:41

Re: He limit
 
Quote:

Originally Posted by Administrator (Post 2495846)
Maybe you can catch a message that you can not buy more, give the player a 2 he, subtract money and add a check whether the player has 2 he?

This principle is real?


All times are GMT -4. The time now is 21:03.

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