Thread: Weapon restrict
View Single Post
Author Message
mrmiki
Junior Member
Join Date: Mar 2021
Old 04-01-2021 , 18:38   Weapon restrict
Reply With Quote #1

Hello
When i use these codes to stop players from buying G3sg1 and Scar20 when players buy any weapon the weapon drop in the ground
HTML Code:
#include <sourcemod>

public Plugin myinfo = {
    name = "scar20 Blocker",
};



public Action:CS_OnBuyCommand(client, const String:weapon[])
{
    if (StrEqual(weapon, "g3sg1", false))
    {
        PrintToChat(client, "Restricted Weapon");
        return Plugin_Handled;
    }
    return Plugin_Continue;
} 






public Action:CS_OnBuyCommand2(client, const String:weapon[])
{
    if (StrEqual(weapon, "scar20", false))
    {
        PrintToChat(client, "Restricted Weapon");
        return Plugin_Handled;
    }
    return Plugin_Continue;
} 


how can i fix it?

i have installed latest sourcemod stable build

also if i use any restricted weapons plugins this happens again

i really need this plugin

Last edited by mrmiki; 04-01-2021 at 18:39.
mrmiki is offline