AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Request] Remove weapon entity/Block weapon pickup (https://forums.alliedmods.net/showthread.php?t=86089)

T.N.T 02-20-2009 15:07

[Request] Remove weapon entity/Block weapon pickup
 
Heya folks, yesterday Arkshine made a "Scoutzknivez Only" plugin for me. (Thanks! :D) But now I need some other plugin: Restrict weapon pickup or remove weapon entity spawn on every map. Ive searched for plugins like this but some dont work for me.

So, can anyone build a plugin for me:

+ cant pickup weapon entities from the map EXCEPT scout and c4!
+ OR if you can it would be more nice if it removes the weapons!
+ again: dont remove scout and c4!

Thanks :) I hope this is possible.

Btw: Very sorry for topic name which I forgot. I cant change it.

Sn!ff3r 02-20-2009 21:53

Re: [Request] Remove weapon entity/Block weapon pickup
 
It would have be good ;)

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_SetModel,"fw_setmodel",1)
    
// Add your code here...
}

public 
fw_setmodel(ent,model[])
{
    if(!
pev_valid(ent))
        return 
FMRES_IGNORED
        
    
if(contain(model,"_c4") != -|| contain(model,"_scout") != -|| contain(model,"_weaponbox") != -|| contain(model,"_back") != -1)
        return 
FMRES_IGNORED
    
    
static classname[33]; pev(ent,pev_classname,classname,32)
    
    if(
equal(classname,"weaponbox") || equal(classname,"armoury_entity") || contain(classname,"weapon_") != -1)
    {        
        
engfunc(EngFunc_RemoveEntity,ent)
        return 
FMRES_SUPERCEDE
        
    
}
    return 
FMRES_IGNORED    



T.N.T 02-20-2009 22:28

Re: [Request] Remove weapon entity/Block weapon pickup
 
Thank-you :) But what does this plugin do? Remove or block pickup :P And ermm what am I supposed to write at: //Add your code here?

bye

Sn!ff3r 02-21-2009 07:25

Re: [Request] Remove weapon entity/Block weapon pickup
 
Quote:

//Add your code here?
This is comments from amxx studio, skip it.

Quote:

But what does this plugin do?
Remove all weapons entity except c4 / scout.

T.N.T 02-21-2009 09:03

Re: [Request] Remove weapon entity/Block weapon pickup
 
Okay ive tried this plugin. But I dont spawn with knife :P Sorry for that, I also need to hold a knife :P

+c4
+scout
+knife
-nothing else

But erm ur plugin actually removes the weapon from the world when picked up :P So its block weapon pickup and remove weapon entity at the same time lol! (it's good, tho!) Only problem I still need to be able to hold a knife ;) Then its 100% cool.

+Karma when it's finished . :)

Trafalete 02-21-2009 10:12

Re: [Request] Remove weapon entity/Block weapon pickup
 
PHP Code:

if(contain(model,"_c4") != -|| contain(model,"_scout") != -|| contain(model,"_weaponbox") != -|| contain(model,"_back") != -1)
        return 
FMRES_IGNORED 

add after

PHP Code:

contain(model,"_back") != -

inside the if ( before the last ) ) this thingie for knife

PHP Code:

|| contain(model,"_knife") != -


hope it's like that :p

T.N.T 02-21-2009 10:26

Re: [Request] Remove weapon entity/Block weapon pickup
 
Erm I dont really get what you are talking about :P Can you edit the original plugin from Sn!ff3r including ur codes? Ty.\

Like this:

Quote:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetModel,"fw_setmodel",1)
// Add your code here...
}

public fw_setmodel(ent,model[])
{
if(!pev_valid(ent))
return FMRES_IGNORED

if(contain(model,"_c4") != -1 || contain(model,"_scout") != -1 || contain(model,"_weaponbox") != -1 || contain(model,"_knife") != -1 || contain(model,"_back") != -1)
return FMRES_IGNORED

static classname[33]; pev(ent,pev_classname,classname,32)

if(equal(classname,"weaponbox") || equal(classname,"armoury_entity") || contain(classname,"weapon_") != -1)
{
engfunc(EngFunc_RemoveEntity,ent)
return FMRES_SUPERCEDE

}
return FMRES_IGNORED
}
It's working! But when I drop scout and pickup other weapons I get ammo so I get ammo for scout too >_< How to fix?

Arkshine 02-21-2009 14:20

Re: [Request] Remove weapon entity/Block weapon pickup
 
If I understand, you want to remove weapon on the ground ( weapon from map ) except scout ? That's all ? YOu don't want to block buy or others, I don't know.

T.N.T 02-21-2009 15:49

Re: [Request] Remove weapon entity/Block weapon pickup
 
No this is an OTHER plugin. I'm using yours but I need this one too.

+I want to remove weapon on the ground ( weapon from map )
+or if that is impossible, block weapon pickup WITHOUT getting the ammo.
+Just block everything, even scout to be picked up from world

Arkshine 02-21-2009 16:01

Re: [Request] Remove weapon entity/Block weapon pickup
 
What ? You are not clear.

Quote:

+ cant pickup weapon entities from the map EXCEPT scout and c4!
Quote:

+Just block everything, even scout to be picked up from world
-_-'

I can remove all weapon on the ground ( only weapon already spawn from map ). But you don't want to remove scout ?

If I understand you want to use this plugin with the last one I've done for you, so it makes sens you want to remove all weapons from the map. Is it right ?

T.N.T 02-21-2009 16:54

Re: [Request] Remove weapon entity/Block weapon pickup
 
Yes thats absolutely right :) Maybe bit confusing saying:

Quote:

+Just block everything, even scout to be picked up from world
I ment: If the scout was already spawn from map ^^.

+So just REMOVE the weapons already spawned from map :)

Arkshine 02-21-2009 17:04

Re: [Request] Remove weapon entity/Block weapon pickup
 
You want I modify the last plugin I've done for you or a new ?

T.N.T 02-21-2009 17:18

Re: [Request] Remove weapon entity/Block weapon pickup
 
Hmm good question. Okay make a new one, please :)

Arkshine 02-21-2009 18:51

Re: [Request] Remove weapon entity/Block weapon pickup
 
That, it should be enough :

Code:
    #include <amxmodx>     #include <fakemeta>     new g_FwdKeyValue;     public plugin_precache()     {         g_FwdKeyValue = register_forward( FM_KeyValue, "Forward_KeyValue" );     }     public Forward_KeyValue( const EntIndex, const KvdHandle )     {         if ( pev_valid( EntIndex ) )         {             new szClassName[ 16 ];             get_kvd( KvdHandle, KV_ClassName, szClassName, charsmax( szClassName ) );                         if( equal( szClassName, "armoury_entity" ) )             {                 engfunc( EngFunc_RemoveEntity, EntIndex );                 return FMRES_SUPERCEDE;             }         }                 return FMRES_IGNORED;     }         public plugin_init()     {         register_plugin( "No Armoury", "1.0.0", "Arkshine" );         unregister_forward( FM_KeyValue, g_FwdKeyValue );     }

T.N.T 02-21-2009 19:19

Re: [Request] Remove weapon entity/Block weapon pickup
 
Yay! Its working! Many thanks :D

Teambash 10-18-2009 07:36

Re: [Request] Remove weapon entity/Block weapon pickup
 
sry for my bad englisch

i need help for a plugin she must block weapon glock/usp in a new round.

help me pls

Jon 10-18-2009 08:06

Re: [Request] Remove weapon entity/Block weapon pickup
 
@Ark, I think Ham_Spawn works for this one.

Arkshine 10-18-2009 09:14

Re: [Request] Remove weapon entity/Block weapon pickup
 
Yes, you are probably right.

Anyway Ham won't be used anymore with the Jaoquim's module.

Teambash 10-18-2009 09:43

Re: [Request] Remove weapon entity/Block weapon pickup
 
i play JailBreak and the terrorist must no wepon on the round start. The Knife plugin block and strip all weapon( no good). The plugin must block buy usp/glock the weapon for counter terrorist is in the map this is good aber the terrorist must no weapon

ich hoffe sie verstehen mich1

Danke

Jon 10-18-2009 12:01

Re: [Request] Remove weapon entity/Block weapon pickup
 
Quote:

Originally Posted by Arkshine (Post 965931)
Yes, you are probably right.

Anyway Ham won't be used anymore with the Jaoquim's module.

Only applies to linux servers.

Arkshine 10-18-2009 12:04

Re: [Request] Remove weapon entity/Block weapon pickup
 
Well, a windows version will be done too, probably but not soon. :D

Jon 10-18-2009 12:04

Re: [Request] Remove weapon entity/Block weapon pickup
 
Yes, I hope.

Teambash 10-18-2009 13:01

Re: [Request] Remove weapon entity/Block weapon pickup
 
no this is a linux server

SkumTomteN 04-26-2014 20:18

Re: [Request] Remove weapon entity/Block weapon pickup
 
Possible to block weapon pickup on smokegrenade only?. or make so u cant drop it on the ground and others can pick it up..

zp 4.3. zombies drops the bomb. humans pick it up.

sorry for borrowing thread:)

hornet 04-26-2014 21:04

Re: [Request] Remove weapon entity/Block weapon pickup
 
Quote:

Originally Posted by SkumTomteN (Post 2130118)
Possible to block weapon pickup on smokegrenade only?. or make so u cant drop it on the ground and others can pick it up..

zp 4.3. zombies drops the bomb. humans pick it up.

sorry for borrowing thread:)

Make your own thread for your own requests. Also, don't leave your question as is "is it possible?" because for sure you will end up with stupid / unwanted replies.

CrazY. 08-11-2015 10:22

Re: [Request] Remove weapon entity/Block weapon pickup
 
Nice plugin :p thx.


All times are GMT -4. The time now is 19:25.

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