Raised This Month: $209 Target: $400
 52% 

Weapon restrict


Post New Thread Reply   
 
Thread Tools Display Modes
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
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 04-01-2021 , 19:18   Re: Weapon restrict
Reply With Quote #2

This is the best one:
https://forums.alliedmods.net/showthread.php?p=2429066
__________________
NanoC is offline
Send a message via Skype™ to NanoC
mrmiki
Junior Member
Join Date: Mar 2021
Old 04-01-2021 , 19:27   Re: Weapon restrict
Reply With Quote #3

Quote:
Originally Posted by NanoC View Post

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

Last edited by mrmiki; 04-01-2021 at 21:38.
mrmiki is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 04-01-2021 , 21:42   Re: Weapon restrict
Reply With Quote #4

1.10 stable
__________________
NanoC is offline
Send a message via Skype™ to NanoC
mrmiki
Junior Member
Join Date: Mar 2021
Old 04-03-2021 , 08:23   Re: Weapon restrict
Reply With Quote #5

Which version of 1.10?
mrmiki is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 04-03-2021 , 10:57   Re: Weapon restrict
Reply With Quote #6

latest
__________________
NanoC is offline
Send a message via Skype™ to NanoC
Reply


Thread Tools
Display Modes

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 05:27.


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