Raised This Month: $51 Target: $400
 12% 

[CS][Forward] client_buy


Post New Thread Reply   
 
Thread Tools Display Modes
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 08-12-2012 , 16:37   Re: [CS][Forward] client_buy
Reply With Quote #41

Can you make me the plugin with all weapons ?
Lolz0r is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 08-12-2012 , 17:55   Re: [CS][Forward] client_buy
Reply With Quote #42

Quote:
Originally Posted by kramesa View Post
Ok, thanks!

But I need use the client_buy.amxx and this? Or only this works?
__________________
kramesa is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-12-2012 , 19:10   Re: [CS][Forward] client_buy
Reply With Quote #43

You need to install client_buy.amxx to use this forward.
hleV is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 08-13-2012 , 17:55   Re: [CS][Forward] client_buy
Reply With Quote #44

Quote:
Originally Posted by Lolz0r View Post
Can you make me the plugin with all weapons ?
ConnorMcLeod, this code is from a friend, I want to ask you if it`s written good and is it ok to use it :

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

const sz_Weapons = ( (<< CSW_FLASHBANG) | (<< CSW_SMOKEGRENADE) )

new 
b_isBlocked[33

public 
plugin_init() 

    
register_plugin("Restrict Weapons""1.0""Tonev"


public 
client_connectid 

    
b_isBlocked[id] = false 


public 
client_disconnectid 

    
b_isBlocked[id] = false 


public 
client_buyiditem 

    if( ((
<< item) & sz_Weapons) && b_isBlocked[id] ) 
    { 
        
client_print(idprint_chat"Those weapons are blocked!"
        return 
PLUGIN_HANDLED 
    

    return 
PLUGIN_CONTINUE 

?

Last edited by Lolz0r; 08-13-2012 at 18:37.
Lolz0r is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-13-2012 , 18:22   Re: [CS][Forward] client_buy
Reply With Quote #45

ROFL
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 08-13-2012 , 19:51   Re: [CS][Forward] client_buy
Reply With Quote #46

What ?
Lolz0r is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-13-2012 , 21:16   Re: [CS][Forward] client_buy
Reply With Quote #47

Quote:
Originally Posted by Lolz0r View Post
What ?
Rolling On Floor Laughing
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-13-2012 , 21:39   Re: [CS][Forward] client_buy
Reply With Quote #48

Plugin does never restrict anything.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 08-14-2012 , 00:48   Re: [CS][Forward] client_buy
Reply With Quote #49

OMG, there was topic where guy asked how should he do it with bool and I showed him this example, while you must have in mind that the bool must be set to true somewhere.. I have not writed the code for ready-use, just an example.. I am not sure why @Lolz0r, quoted my code here, but its obvious he doesn't know what the code is doing ( tho the bool isn't set anywhere to true ). I didn't know what the user wanted to do exactly and that is why I haven't set the bool to true.

@Lolz0r, next time please don't post my codes when you don't know what I have meant with them or their purpose. I wrote simple plugin for you which blocks Flash and Smokes:

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

const sz_Weapons 
(
    ( 
<< CSW_FLASHBANG ) | ( << CSW_SMOKEGRENADE )
)

public 
plugin_init()
{
    
register_plugin"Restrict Weapons""1.0""Tonev" )
}

public 
client_buyiditem )
{
    if( ( 
<< item ) & sz_Weapons )
    {
        
client_printidprint_center"Those weapons are blocked!" )
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

Connor, I have question, is there message like #ArcticWarfareMagnum but for all type of grenades, not only for flashbangs for example ?

Last edited by dark_style; 08-14-2012 at 04:36.
dark_style is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2012 , 08:38   Re: [CS][Forward] client_buy
Reply With Quote #50

No, only for each nade, as you can see in the previous code i've posted.
Why do you use sz_ prefix ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 14:22.


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