View Single Post
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-29-2012 , 12:37   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #1108

Quote:
Originally Posted by TnTSCS View Post
if CS:S:

Just put the names of the guns you want to restrict in the global string... I already put the two you want. I haven't tested it alongside this weapon restrict plugin, so I'm not 100% it will work.

PHP Code:

#pragma semicolon 1

#include <sourcemod>
#include <cstrike>

new String:BlockedWeapons[][] = 
    {
        
"sg550",
        
"g3sg1"
    
};

public 
Action:CS_OnBuyCommand(client, const String:weapon[])
{
    
PrintToChat(client"Weapon Name is [%s]"weapon);
    
    for (new 
0sizeof(BlockedWeapons); i++)
    {
        if (
StrEqual(weaponBlockedWeapons[i], false))
        {
            
PrintToChat(client"You are not allowed to purchase that weapon");
            return 
Plugin_Handled;
        }
    }
    
    return 
Plugin_Continue;

Use the natives/forwards that weapon restrict gives you

Last edited by Dr!fter; 07-29-2012 at 12:38.
Dr!fter is offline