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

how to restrict deagle on awp maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SanKen
Senior Member
Join Date: Oct 2012
Location: /var/logs
Old 01-25-2015 , 18:14   how to restrict deagle on awp maps
Reply With Quote #1

how to restrict deagle on awp maps.
You may at some simple plugin, I'm just about thrown Deagle from these maps.
__________________
SanKen is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-25-2015 , 18:39   Re: how to restrict deagle on awp maps
Reply With Quote #2

-OnPluginStart HookEvent "item_pickup"
-OnMapStart check it's prefix ("awp_"), save bool to the variable
-On item_pickup check the weapon - kill entity if it is ..... (your weapon)
LambdaLambda is offline
SanKen
Senior Member
Join Date: Oct 2012
Location: /var/logs
Old 01-26-2015 , 06:08   Re: how to restrict deagle on awp maps
Reply With Quote #3

-OnPluginStart HookEvent "item_pickup"

But what if this item is already in your inventory after spawn?
__________________
SanKen is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-26-2015 , 06:15   Re: how to restrict deagle on awp maps
Reply With Quote #4

exactly. After spawn. You get weapons, which means you pick them up once you get spawned.

Zaufaj, zadziała. ;)

Last edited by LambdaLambda; 01-26-2015 at 06:19.
LambdaLambda is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 01-26-2015 , 08:00   Re: how to restrict deagle on awp maps
Reply With Quote #5

The complete way would be hooking Spawn event on OnEntityCreated then killing the weapon there.
h3bus is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-26-2015 , 08:22   Re: how to restrict deagle on awp maps
Reply With Quote #6

Pointless.
LambdaLambda is offline
EngHell
Member
Join Date: Jul 2013
Location: Guatemala
Old 01-26-2015 , 17:33   Re: how to restrict deagle on awp maps
Reply With Quote #7

I have done this some weeks ago for my server, may it's not the best way idk, but it works very well ;D
Attached Files
File Type: sp Get Plugin or Get Source (nopistol.sp - 537 views - 1.5 KB)
EngHell is offline
SanKen
Senior Member
Join Date: Oct 2012
Location: /var/logs
Old 01-27-2015 , 05:46   Re: how to restrict deagle on awp maps
Reply With Quote #8

it looks like it works. Thank you.
__________________
SanKen is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-27-2015 , 09:56   Re: how to restrict deagle on awp maps
Reply With Quote #9

But problem with usage of "player_spawn" event is, so when you pick it up, then you can use it. It's not disappearing. But I know that some maps got their weapons spawned on the floor, so you're not spawning with it.
LambdaLambda is offline
EngHell
Member
Join Date: Jul 2013
Location: Guatemala
Old 01-28-2015 , 15:34   Re: how to restrict deagle on awp maps
Reply With Quote #10

Quote:
Originally Posted by LambdaLambda View Post
But problem with usage of "player_spawn" event is, so when you pick it up, then you can use it. It's not disappearing. But I know that some maps got their weapons spawned on the floor, so you're not spawning with it.
But if you create a cell holding the weapon
PHP Code:
new weapon GetPlayerWeaponSlot(client,1); 
then use it with
PHP Code:
RemovePlayerItem(clientweapon
and then
PHP Code:
RemoveEdict(weapon
It works great, but before you should do
PHP Code:
IsValidEdict(weapon

Last edited by EngHell; 01-28-2015 at 15:36.
EngHell is offline
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 17:05.


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