Raised This Month: $ Target: $400
 0% 

[CSS/CS:GO] Weapon Restrict


Post New Thread Reply   
 
Thread Tools Display Modes
Mysteria
Member
Join Date: Aug 2010
Old 02-26-2012 , 11:41   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #981

Bacardi: Thanks, It's working
Mysteria is offline
TheAvengers2
BANNED
Join Date: Jul 2011
Old 02-27-2012 , 06:28   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #982

In scripting\restrictinc\perplayer.sp

PHP Code:
LINE174 180

            
if(WeaponID:!= WEAPON_C4)
            {
                if(
perPlayer[i][0] != -&& Restrict_GetRestrictValue(CS_TEAM_CTWeaponID:i) != perPlayer[i][count] && !Restrict_IsWeaponInOverride(CS_TEAM_TWeaponID:i))
                {
                    
Restrict_SetRestriction(WeaponID:iCS_TEAM_CTperPlayer[i][count], false);
                }
            }



LINE197 203

            
if(WeaponID:!= WEAPON_C4)
            {
                if(
Restrict_GetRestrictValue(CS_TEAM_CTWeaponID:i) != defaultValuesCT[i] && !Restrict_IsWeaponInOverride(CS_TEAM_TWeaponID:i))
                {
                    
Restrict_SetRestriction(WeaponID:iCS_TEAM_CTdefaultValuesCT[i], false);
                }
            } 
I have a feeling you typo'd this part of it twice (darned copy & paste ):

!Restrict_IsWeaponInOverride(CS_TEAM_T, WeaponID:i)

Then again, I could very well be wrong.

Last edited by TheAvengers2; 02-27-2012 at 06:35.
TheAvengers2 is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-01-2012 , 10:22   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #983

Yea thats wrong. Ill change it when i get a chance.
Dr!fter is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-04-2012 , 13:29   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #984

Quote:
Originally Posted by TheAvengers2 View Post
In scripting\restrictinc\perplayer.sp

PHP Code:
LINE174 180

            
if(WeaponID:!= WEAPON_C4)
            {
                if(
perPlayer[i][0] != -&& Restrict_GetRestrictValue(CS_TEAM_CTWeaponID:i) != perPlayer[i][count] && !Restrict_IsWeaponInOverride(CS_TEAM_TWeaponID:i))
                {
                    
Restrict_SetRestriction(WeaponID:iCS_TEAM_CTperPlayer[i][count], false);
                }
            }



LINE197 203

            
if(WeaponID:!= WEAPON_C4)
            {
                if(
Restrict_GetRestrictValue(CS_TEAM_CTWeaponID:i) != defaultValuesCT[i] && !Restrict_IsWeaponInOverride(CS_TEAM_TWeaponID:i))
                {
                    
Restrict_SetRestriction(WeaponID:iCS_TEAM_CTdefaultValuesCT[i], false);
                }
            } 
I have a feeling you typo'd this part of it twice (darned copy & paste ):

!Restrict_IsWeaponInOverride(CS_TEAM_T, WeaponID:i)

Then again, I could very well be wrong.
Updated. Fixed that typo along with a unrestrict bug.

Last edited by Dr!fter; 03-04-2012 at 13:31.
Dr!fter is offline
tobi187
Junior Member
Join Date: Jan 2012
Old 03-06-2012 , 18:18   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #985

Hi.

Thanks for the very great plugin!

Is there a way, so you can add a native for giving a player a weapon like weapon_awp even if it is restricted per team without limiting that weapon to any team but take it out if someone drops it?
tobi187 is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-07-2012 , 15:29   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #986

Quote:
Originally Posted by tobi187 View Post
Hi.

Thanks for the very great plugin!

Is there a way, so you can add a native for giving a player a weapon like weapon_awp even if it is restricted per team without limiting that weapon to any team but take it out if someone drops it?
You can already do this with a mix of forwards/natives.
  • GivePlayerItem
    • Save the weapon type and client and index in an array
    • Restrict_OnCanPickupWeapon gets called check client and weapon type and change result if needed.
  • CS_OnCSWeaponDrop (http://docs.sourcemod.net/api/index....=show&id=1010&) gets called check index
    • AcceptEntityInput(index, "Kill");

Something like that

Last edited by Dr!fter; 03-07-2012 at 15:30.
Dr!fter is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-09-2012 , 10:15   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #987

Updated to fix a bug with setting special round for after warmup.
Dr!fter is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-10-2012 , 13:21   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #988

Quote:
L 03/10/2012 - 20:29:31: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 03/10/2012 - 20:29:31: [SM] Native "PrintToChat" reported: Translation failed: invalid client index 7370593
L 03/10/2012 - 20:29:31: [SM] Displaying call stack trace for plugin "weapon_restrict.smx":
L 03/10/2012 - 20:29:31: [SM] [0] Line 89, restrictinc/natives.sp::Native_RefundMoney()

L 03/10/2012 - 20:29:31: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 03/10/2012 - 20:29:31: [SM] Native "Restrict_RefundMoney" reported: Error encountered while processing a dynamic native
L 03/10/2012 - 20:29:31: [SM] Displaying call stack trace for plugin "weapon_restrict.smx":
L 03/10/2012 - 20:29:31: [SM] [0] Line 210, restrictinc/natives.sp::Native_RemoveRandom()

L 03/10/2012 - 20:29:31: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 03/10/2012 - 20:29:31: [SM] Native "Restrict_RemoveRandom" reported: Error encountered while processing a dynamic native
L 03/10/2012 - 20:29:31: [SM] Displaying call stack trace for plugin "weapon_restrict.smx":
L 03/10/2012 - 20:29:31: [SM] [0] Line 675, restrictinc/natives.sp::Native_CheckPlayerWeapons()

L 03/10/2012 - 20:29:31: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 03/10/2012 - 20:29:31: [SM] Native "Restrict_CheckPlayerWeapons" reported: Error encountered while processing a dynamic native
L 03/10/2012 - 20:29:31: [SM] Displaying call stack trace for plugin "weapon_restrict.smx":
L 03/10/2012 - 20:29:31: [SM] [0] Line 159, restrictinc/events.sp::EventRoundStart()
__________________

Last edited by altex; 03-10-2012 at 13:21.
altex is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-10-2012 , 15:59   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #989

Can you provide more info? This looks like a crazy error. Since there is a check if the client is valid before trying to print. Was this after you upgraded? Does it appear often?

Last edited by Dr!fter; 03-10-2012 at 16:00.
Dr!fter is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-10-2012 , 18:05   Re: [CSS] Weapon Restrict (3.0 is here!)
Reply With Quote #990

Quote:
Originally Posted by Dr!fter View Post
Can you provide more info? This looks like a crazy error. Since there is a check if the client is valid before trying to print. Was this after you upgraded? Does it appear often?
latest build 3.0.8
i think the issue is not in "client" variable value, but in the translations VFormat syntax
i have upgraded from 2.3.5 version of this plugin to 3.0.8 yesterday
this error appeares quite often
__________________

Last edited by altex; 03-10-2012 at 18:06.
altex 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 13:41.


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