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

Simple plugin to block the purchase of AWP, G3SG1 and SG-550


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kam3n1tza
Member
Join Date: Jul 2011
Old 10-16-2012 , 17:49   Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #1

The tittle
Please help!

Last edited by kam3n1tza; 10-16-2012 at 17:49.
kam3n1tza is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 10-16-2012 , 18:15   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #2

This.
SpeeDeeR is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-16-2012 , 19:25   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #3

Or just restrict those?
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 10-16-2012 , 22:00   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #4

Pretty sure that amxmodx already comes with a restrict weapons plugin, (might be disabled on default).
https://forums.alliedmods.net/showthread.php?t=99044

There you go check the 2nd post by Bmann
__________________
Ayyylmao
malec321 is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 10-17-2012 , 04:22   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #5

Try this :

Code:
#include <amxmodx> #include <fakemeta> #include <cl_buy> #define m_iMenu 205 const BitsRestrictedItems = (     ( 1 << CSW_AWP )|     ( 1 << CSW_G3SG1 )|     ( 1 << CSW_SG550 ) ) public plugin_init() {     register_plugin( "Restric Items", "1.1", "Tonev" ) } public client_buy( id, iItem ) {     set_pdata_int( id, m_iMenu, 0, 0 )     if( ( 1 << iItem ) & BitsRestrictedItems )     {         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
Lolz0r is offline
kam3n1tza
Member
Join Date: Jul 2011
Old 10-17-2012 , 12:07   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #6

Quote:
Originally Posted by Lolz0r View Post
Try this :

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

#define m_iMenu 205

const BitsRestrictedItems =
(
( 1 << CSW_AWP )|
( 1 << CSW_G3SG1 )|
( 1 << CSW_SG550 )
)

public plugin_init()
{
register_plugin( "Restric Items", "1.1", "Tonev" )
}

public client_buy( id, iItem )
{
set_pdata_int( id, m_iMenu, 0, 0 )
if( ( 1 << iItem ) & BitsRestrictedItems )
{
return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE

}
An error has occurred and the plugin does not work:
L 10/17/2012 - 18:58:12: [AMXX] Plugin "block_snipers.amxx" failed to load: Module/Library "cl_buy" required for plugin. Check modules.ini.

cl_buy.inc is include file not module why show me this error ??
Is there such a module and you need to put him in modules and then add it to modules.ini ??

Last edited by kam3n1tza; 10-17-2012 at 12:13.
kam3n1tza is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-17-2012 , 12:25   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #7

Quote:
Originally Posted by kam3n1tza View Post
An error has occurred and the plugin does not work:
L 10/17/2012 - 18:58:12: [AMXX] Plugin "block_snipers.amxx" failed to load: Module/Library "cl_buy" required for plugin. Check modules.ini.

cl_buy.inc is include file not module why show me this error ??
Is there such a module and you need to put him in modules and then add it to modules.ini ??
You need to install this plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
kam3n1tza
Member
Join Date: Jul 2011
Old 10-17-2012 , 12:51   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #8

Quote:
Originally Posted by wickedd View Post
You need to install this plugin.
Thank's to everybody now everything is allright
kam3n1tza is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 10-17-2012 , 13:07   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #9

You have only one problem, the plugin works fine only for VGUI menu, to the old menu can not buy anything..

If someone wants can to fix it.
Lolz0r is offline
kam3n1tza
Member
Join Date: Jul 2011
Old 11-08-2012 , 08:03   Re: Simple plugin to block the purchase of AWP, G3SG1 and SG-550
Reply With Quote #10

Quote:
Originally Posted by Lolz0r View Post
You have only one problem, the plugin works fine only for VGUI menu, to the old menu can not buy anything..

If someone wants can to fix it.
Bump!
kam3n1tza 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 06:48.


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