Raised This Month: $ Target: $400
 0% 

Solved I need an AWP Only plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
slowww
Member
Join Date: Mar 2017
Old 07-23-2017 , 19:21   I need an AWP Only plugin
Reply With Quote #1

Hello!
I am trying to make an AWP Only server.
I need a small code, just a few lines.
I need a plugin only to give weapon_awp and NO OTHER GUNS.
So, when you spawn on the map you must get AWP and drop the pistol if the map has.
Thanks a lot! Have a good day!

Last edited by slowww; 07-24-2017 at 11:48.
slowww is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 07-23-2017 , 20:30   Re: I need an AWP Only plugin
Reply With Quote #2

Attached Files
File Type: sp Get Plugin or Get Source (awponly.sp - 308 views - 1.8 KB)

Last edited by headline; 07-24-2017 at 11:27.
headline is offline
slowww
Member
Join Date: Mar 2017
Old 07-23-2017 , 20:43   Re: I need an AWP Only plugin
Reply With Quote #3

not working
I have a map that gives you AWP & Deagle and I need a plugin to drop the deagle or the secondary weapon.
If you can drop player's guns and spawn another guns (AWP and knife)
Thanks for help anyway <3
slowww is offline
slowww
Member
Join Date: Mar 2017
Old 07-23-2017 , 20:46   Re: I need an AWP Only plugin
Reply With Quote #4

oh, I saw the BLOCKED_WEAPON, I will try to change to deagle.
slowww is offline
slowww
Member
Join Date: Mar 2017
Old 07-23-2017 , 20:51   Re: I need an AWP Only plugin
Reply With Quote #5

If I drop my AWP it will switch to deagle without any problem..
slowww is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 07-23-2017 , 21:13   Re: I need an AWP Only plugin
Reply With Quote #6

BLOCKED_WEAPON is meant to be the only weapon that ISNT blocked.

Also, even if someone does have a deagle they shouldn't be able to use it.

Edit: Check my original post. I edited the source a bit

Last edited by headline; 07-24-2017 at 01:07.
headline is offline
slowww
Member
Join Date: Mar 2017
Old 07-24-2017 , 08:48   Re: I need an AWP Only plugin
Reply With Quote #7

Thanks, that's working very good! But how can I add multiple guns?
Like AWP & knife?
slowww is offline
blacklagoon
Senior Member
Join Date: Jun 2012
Old 07-24-2017 , 09:29   Re: I need an AWP Only plugin
Reply With Quote #8

i believe you would need to modify this line
Code:
if (!StrEqual(classname, ONLY_WEAPON))
into
Code:
if (!StrEqual(classname, ONLY_WEAPON) && !StrEqual(classname, "weapon_knife"))

Last edited by blacklagoon; 07-24-2017 at 09:50.
blacklagoon is offline
slowww
Member
Join Date: Mar 2017
Old 07-24-2017 , 11:08   Re: I need an AWP Only plugin
Reply With Quote #9

there are 2 lines with "if (!StrEqual(classname, ONLY_WEAPON))"
slowww is offline
slowww
Member
Join Date: Mar 2017
Old 07-24-2017 , 11:10   Re: I need an AWP Only plugin
Reply With Quote #10

If I change both of them I get 2 errors like this : awponly.sp(57) : warning 217: loose indentation
slowww 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 10:40.


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