Raised This Month: $12 Target: $400
 3% 

[CSS/CS:GO] Weapon Restrict


Post New Thread Reply   
 
Thread Tools Display Modes
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-06-2015 , 14:26   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1731

Quote:
Originally Posted by ocidius View Post
Someone can help me ???
There is no solution to your issue, the conflict is that other plugins override what weapon restrict does instead of using weapon restricts forwards. Basically other plugins should use weapon restricts forwards (if weapon restrict is loaded) to avoid any conflicts.
Dr!fter is offline
ocidius
Senior Member
Join Date: Oct 2014
Old 05-06-2015 , 20:21   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1732

OK so can someone use weapon restrict to make this :
First ....i m using weapon restrictions because "awp limit win " nées dit
Second. Im using kdr plugin to make 3ratio limit of weapon and HP .....
Can someone adapt it with weapon restrictions ???
ocidius is offline
enermax
Member
Join Date: May 2015
Old 05-14-2015 , 05:40   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1733

How can I set the the only 2 AWP per team and 2 per scout team for CSGO?
__________________
enermax is offline
DoPe^
Veteran Member
Join Date: Jul 2008
Location: Denmark / Copenhagen
Old 05-17-2015 , 18:21   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1734

I'm getting this when I try to compile a plugin with restrict.inc

Code:
SourcePawn Compiler 1.7.1
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC

C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(33) : error 181: function argument named 'id' differs from prototype
C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(45) : error 181: function argument named 'id' differs from prototype
C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(56) : error 181: function argument named 'id' differs from prototype
Started happening after I updated the compiler to 1.7.1
__________________

Last edited by DoPe^; 05-17-2015 at 18:28.
DoPe^ is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-18-2015 , 12:35   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1735

Quote:
Originally Posted by DoPe^ View Post
I'm getting this when I try to compile a plugin with restrict.inc

Code:
SourcePawn Compiler 1.7.1
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC

C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(33) : error 181: function argument named 'id' differs from prototype
C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(45) : error 181: function argument named 'id' differs from prototype
C:/Users/Mikkel/Desktop/Server Ting/sourcemod/scripting/include\restrict.inc(56) : error 181: function argument named 'id' differs from prototype
Started happening after I updated the compiler to 1.7.1
I compiled weapon restrict (which includes that include) on 1.7.1 and 1.7.2 and i cant reproduce that error. Please post the code.
Dr!fter is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 05-18-2015 , 17:43   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1736

Quote:
Originally Posted by enermax View Post
How can I set the the only 2 AWP per team and 2 per scout team for CSGO?
cfg/sourcemod/weapon_restrict.cfg or as cvars

Code:
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:awp
// -
// Default: "-1"
sm_restrict_awp_ct "2"

// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:awp
// -
// Default: "-1"
sm_restrict_awp_t "2"

// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:sg556
// -
// Default: "-1"
sm_restrict_sg556_ct "2"

// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:sg556
// -
// Default: "-1"
sm_restrict_sg556_t "2"
easy? right!
shanapu is offline
DoPe^
Veteran Member
Join Date: Jul 2008
Location: Denmark / Copenhagen
Old 05-19-2015 , 08:55   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1737

Quote:
Originally Posted by Dr!fter View Post
I compiled weapon restrict (which includes that include) on 1.7.1 and 1.7.2 and i cant reproduce that error. Please post the code.
Hmm it was crying about this

PHP Code:
public Action:Restrict_OnCanBuyWeapon(clientteamWeaponID:id, &CanBuyResult:result)
{
    if (
kk_userid == client)
    {
        if  (
id == WEAPON_SCAR20)
        {
            
result CanBuy_Allow;
            
            return 
Plugin_Changed;
        }
    }
    
    return 
Plugin_Continue;
}


public 
Action:Restrict_OnCanPickupWeapon(clientteamWeaponID:id, &bool:result)
{
    if (
kk_userid == client)
    {
        if  (
id == WEAPON_SCAR20)
        {
            
result true;
            
            return 
Plugin_Changed;
        }
    }
    
    return 
Plugin_Continue;

It compiles fine with the 1.6.3 compiler

I am also getting this
C:\Users\Mikkel\Desktop\Server Ting\royalscripts\VIP Plugins\vip_royalknifeking.sp(199) : warning 203: symbol is never used: "AllowedGame"

PHP Code:
        if  (id == WEAPON_SCAR20)
        {
Line 199 ->>>    result true;
            
            return 
Plugin_Changed;
        } 
__________________
DoPe^ is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-19-2015 , 09:30   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1738

Quote:
Originally Posted by DoPe^ View Post
Hmm it was crying about this

PHP Code:
public Action:Restrict_OnCanBuyWeapon(clientteamWeaponID:id, &CanBuyResult:result)
{
    if (
kk_userid == client)
    {
        if  (
id == WEAPON_SCAR20)
        {
            
result CanBuy_Allow;
            
            return 
Plugin_Changed;
        }
    }
    
    return 
Plugin_Continue;
}


public 
Action:Restrict_OnCanPickupWeapon(clientteamWeaponID:id, &bool:result)
{
    if (
kk_userid == client)
    {
        if  (
id == WEAPON_SCAR20)
        {
            
result true;
            
            return 
Plugin_Changed;
        }
    }
    
    return 
Plugin_Continue;

It compiles fine with the 1.6.3 compiler

I am also getting this
C:\Users\Mikkel\Desktop\Server Ting\royalscripts\VIP Plugins\vip_royalknifeking.sp(199) : warning 203: symbol is never used: "AllowedGame"

PHP Code:
        if  (id == WEAPON_SCAR20)
        {
Line 199 ->>>    result true;
            
            return 
Plugin_Changed;
        } 
I still cant reproduce it This is what i tested with

PHP Code:
#include <cstrike_weapons>
#include <restrict>

new kk_index 1;

public 
Action:Restrict_OnCanBuyWeapon(clientteamWeaponID:id, &CanBuyResult:result

    if (
kk_index == client
    { 
        if  (
id == WEAPON_SCAR20
        { 
            
result CanBuy_Allow
             
            return 
Plugin_Changed
        } 
    } 
     
    return 
Plugin_Continue



public 
Action:Restrict_OnCanPickupWeapon(clientteamWeaponID:id, &bool:result

    if (
kk_index == client
    { 
        if  (
id == WEAPON_SCAR20
        { 
            
result true
             
            return 
Plugin_Changed
        } 
    } 
     
    return 
Plugin_Continue

I fixed the AllowedGame warning in the new cstrike_weapons.inc (you can grab it from here) It is safe to ignore also.

Last edited by Dr!fter; 05-19-2015 at 09:31.
Dr!fter is offline
DoPe^
Veteran Member
Join Date: Jul 2008
Location: Denmark / Copenhagen
Old 05-19-2015 , 09:43   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1739

Quote:
Originally Posted by Dr!fter View Post
I still cant reproduce it This is what i tested with

PHP Code:
#include <cstrike_weapons>
#include <restrict>

new kk_index 1;

public 
Action:Restrict_OnCanBuyWeapon(clientteamWeaponID:id, &CanBuyResult:result

    if (
kk_index == client
    { 
        if  (
id == WEAPON_SCAR20
        { 
            
result CanBuy_Allow
             
            return 
Plugin_Changed
        } 
    } 
     
    return 
Plugin_Continue



public 
Action:Restrict_OnCanPickupWeapon(clientteamWeaponID:id, &bool:result

    if (
kk_index == client
    { 
        if  (
id == WEAPON_SCAR20
        { 
            
result true
             
            return 
Plugin_Changed
        } 
    } 
     
    return 
Plugin_Continue

I fixed the AllowedGame warning in the new cstrike_weapons.inc (you can grab it from here) It is safe to ignore also.

Well thats weird
Anyways i'm using the 1.6.3 compiler for now which is working fine.
Will report back some day if I switch to the new compiler and it still happens! :p

Thanks for the fix!, I know it's safe to ignore :p was just annoying me!
__________________
DoPe^ is offline
shpakodin
Junior Member
Join Date: May 2015
Old 05-27-2015 , 06:31   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1740

Hi guys!
I have trouble on how to setup cvars for different game modes in CS:GO...
E.g.:
in setting file gamemode_casual_server.cfg i'm set some lines
Code:
//Restricts weapon
sm_perplayer_restrict								0 // If enabled will restrict awp per player count
sm_restrict_awp_ct									2
sm_restrict_awp_t									2
sm_restrict_sg556_ct								2
sm_restrict_sg556_t									2
sm_allow_awp_pickup									1 // Set to 0 to allow awp pickup ONLY if it is under the max allowed. Set to 1 to use sm_allow_restricted_pickup method.
sm_allow_restricted_pickup							0 // Set to 0 to ONLY allow pickup if under the max allowed. Set to 1 to allow restricted weapon pickup
sm_perplayer_bots									1 // If enabled will count bots in per player restricts
sm_perplayer_specs									1 // If enabled will count specs in per player restricts
sm_weapon_restrict_immunity							1 // Enables admin immunity so admins can buy restricted weapons Default flag is reserved flag. Override sm_restrict_immunity_level to change.
//sm_restricted_sound									sound/buttons/weapon_cant_buy.wav // Sound to play when a weapon is restricted (leave blank to disable)
But after server start it's going to default...
Even if i use them with sm_cvar "..." it will show that its executed in log file and changed correctly, but in the end its showing -1 for weapons.

I'm using latest source and meta modes.
gamemode_casual_server.cfg is used from gamemodes_server.txt file.

Last edited by shpakodin; 05-27-2015 at 06:36.
shpakodin is offline
Reply



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 09:09.


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