Raised This Month: $4 Target: $400
 1% 

[Request] Remove weapon entity/Block weapon pickup


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
T.N.T
Junior Member
Join Date: Jan 2009
Old 02-20-2009 , 15:07   [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #1

Heya folks, yesterday Arkshine made a "Scoutzknivez Only" plugin for me. (Thanks! ) 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.

Last edited by T.N.T; 02-21-2009 at 08:44. Reason: Sorry I forgot the topicname =I
T.N.T is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 02-20-2009 , 21:53   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #2

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    

__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
T.N.T
Junior Member
Join Date: Jan 2009
Old 02-20-2009 , 22:28   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #3

Thank-you But what does this plugin do? Remove or block pickup And ermm what am I supposed to write at: //Add your code here?

bye
T.N.T is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 02-21-2009 , 07:25   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #4

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.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
T.N.T
Junior Member
Join Date: Jan 2009
Old 02-21-2009 , 09:03   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #5

Okay ive tried this plugin. But I dont spawn with knife Sorry for that, I also need to hold a knife

+c4
+scout
+knife
-nothing else

But erm ur plugin actually removes the weapon from the world when picked up 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 .
T.N.T is offline
Trafalete
Senior Member
Join Date: Sep 2008
Location: Bucuresti ( Printre nori
Old 02-21-2009 , 10:12   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #6

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
__________________


Trafalete is offline
T.N.T
Junior Member
Join Date: Jan 2009
Old 02-21-2009 , 10:26   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #7

Erm I dont really get what you are talking about 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?

Last edited by T.N.T; 02-21-2009 at 11:11.
T.N.T is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-21-2009 , 14:20   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #8

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.
Arkshine is offline
T.N.T
Junior Member
Join Date: Jan 2009
Old 02-21-2009 , 15:49   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #9

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
T.N.T is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-21-2009 , 16:01   Re: [Request] Remove weapon entity/Block weapon pickup
Reply With Quote #10

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 ?
Arkshine 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 10:35.


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