AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   how to restrict deagle on awp maps (https://forums.alliedmods.net/showthread.php?t=256390)

SanKen 01-25-2015 18:14

how to restrict deagle on awp maps
 
how to restrict deagle on awp maps.
You may at some simple plugin, I'm just about thrown Deagle from these maps.

LambdaLambda 01-25-2015 18:39

Re: how to restrict deagle on awp maps
 
-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)

SanKen 01-26-2015 06:08

Re: how to restrict deagle on awp maps
 
-OnPluginStart HookEvent "item_pickup"

But what if this item is already in your inventory after spawn?

LambdaLambda 01-26-2015 06:15

Re: how to restrict deagle on awp maps
 
exactly. After spawn. You get weapons, which means you pick them up once you get spawned.

Zaufaj, zadziała. ;)

h3bus 01-26-2015 08:00

Re: how to restrict deagle on awp maps
 
The complete way would be hooking Spawn event on OnEntityCreated then killing the weapon there.

LambdaLambda 01-26-2015 08:22

Re: how to restrict deagle on awp maps
 
Pointless.

EngHell 01-26-2015 17:33

Re: how to restrict deagle on awp maps
 
1 Attachment(s)
I have done this some weeks ago for my server, may it's not the best way idk, but it works very well ;D

SanKen 01-27-2015 05:46

Re: how to restrict deagle on awp maps
 
it looks like it works. Thank you.

LambdaLambda 01-27-2015 09:56

Re: how to restrict deagle on awp maps
 
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.

EngHell 01-28-2015 15:34

Re: how to restrict deagle on awp maps
 
Quote:

Originally Posted by LambdaLambda (Post 2254951)
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



All times are GMT -4. The time now is 13:50.

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