Raised This Month: $ Target: $400
 0% 

How to block the buy of a weapon and what's my error ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-26-2013 , 08:41   Re: How to block the buy of a weapon and what's my error ?
Reply With Quote #6

Try doing like this:
PHP Code:
/*Before plugin init*/
new const weaponnames[][] =
{
    
"awp""sg550""g3sg1""scout""m249" //And so on

/*In plugin init*/
for(new 0sizeof weaponnamesi++)
register_clcmd(weaponnames[i], "HandleCmd")
/*After plugin init*/
public HandleCmd(id)
{
    
client_printidprint_center"This weapon is restricted!" );
    return 
PLUGIN_HANDLED

This method should fix all your problems.

Last edited by Unkolix; 02-26-2013 at 08:43.
Unkolix is offline
 



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 21:49.


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