AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Weapon restrict (https://forums.alliedmods.net/showthread.php?t=331688)

mrmiki 04-01-2021 18:38

Weapon restrict
 
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

NanoC 04-01-2021 19:18

Re: Weapon restrict
 
This is the best one:
https://forums.alliedmods.net/showthread.php?p=2429066

mrmiki 04-01-2021 19:27

Re: Weapon restrict
 
Quote:

Originally Posted by NanoC (Post 2742686)


i think there is something wrong with sourcemod and restricting weapon code
witch version of sourcemod you are using?

NanoC 04-01-2021 21:42

Re: Weapon restrict
 
1.10 stable

mrmiki 04-03-2021 08:23

Re: Weapon restrict
 
Which version of 1.10?

NanoC 04-03-2021 10:57

Re: Weapon restrict
 
latest


All times are GMT -4. The time now is 03:37.

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