Raised This Month: $32 Target: $400
 8% 

Remove C4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-04-2020 , 18:41   Remove C4
Reply With Quote #1

Hi guys,
I have problem in C4 , because in bb mod when someone be zombie he's get c4 like a normal mod and i dont like that so i was searching for plugin to remove c4 from zombie and i found it but i have got error, becuase in bb mod it working on fakemeta and in this plugin working on fakemeta_until.

Is there any code in fakemeta working like "fm_strip_user_gun".


Error log
Code:
L 07/04/2020 - 23:57:21: [AMXX] Run time error 3: stack error 
L 07/04/2020 - 23:57:21: [AMXX]    [0] fakemeta_util.inc::fm_strip_user_gun (line 671)
L 07/04/2020 - 23:57:21: [AMXX]    [1] Zombie BaseBuilderUltimatX.sma::GotBomb (line 1115)
Plugin:
PHP Code:
#include <amxmodx>
#include <fakemeta_util>

public plugin_init() {
    
register_plugin("No Bomb""0.1""connor")
    
register_event("StatusIcon""GotBomb""be""1=1""1=2""2=c4")
}

public 
GotBomb(id) {
    
fm_strip_user_gun(idCSW_C4)

Supremache is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 07-04-2020 , 19:21   Re: Remove C4
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=40164

PHP Code:
// Bomb gained (including spawn/give_item) event
    
register_event("WeapPickup""event_function""be""1=6"
PHP Code:
// How to strip the bomb from a player?
    
engclient_cmd(id"weapon_c4")
    
cs_set_user_bpammo(idCSW_C40)
    
engclient_cmd(id"lastinv")
    
// remove bomb hud icon
    
message_begin(MSG_ONEget_user_msgid("StatusIcon"), _id)
    
write_byte(0)
    
write_string("c4")
    
message_end() 
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 07-04-2020 at 22:26.
+ARUKARI- is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-09-2020 , 15:41   Re: Remove C4
Reply With Quote #3

Quote:
Originally Posted by +ARUKARI- View Post
https://forums.alliedmods.net/showthread.php?t=40164

PHP Code:
// Bomb gained (including spawn/give_item) event
    
register_event("WeapPickup""event_function""be""1=6"
PHP Code:
// How to strip the bomb from a player?
    
engclient_cmd(id"weapon_c4")
    
cs_set_user_bpammo(idCSW_C40)
    
engclient_cmd(id"lastinv")
    
// remove bomb hud icon
    
message_begin(MSG_ONEget_user_msgid("StatusIcon"), _id)
    
write_byte(0)
    
write_string("c4")
    
message_end() 
Thanks it's worked fine, I think that Oo
Do you know how to add it like set_tesk without register_event becuase i want to add it for respown event
Ps: i tried but i got some erorrs like the game get closed automaticly

Last edited by Supremache; 07-09-2020 at 18:46.
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-14-2021 , 07:56   Re: Remove C4
Reply With Quote #4

Quote:
Originally Posted by Supremache View Post
Ps: i tried but i got some erorrs like the game get closed automaticly

Remove from Zombies or altogether, error-free?

Code:
#include amxmodx #include engine_stocks new const c4[][]={"weapon_c4","func_bomb_target","info_bomb_target"}; public plugin_init() {     register_plugin("c4 killer", "SPiNX", "04-2021");     for(new ent;ent < sizeof c4;++ent)         remove_entity_name(c4[ent]); }
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-14-2021 , 16:40   Re: Remove C4
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
Remove from Zombies or altogether, error-free?

Code:
#include amxmodx #include engine_stocks new const c4[][]={"weapon_c4","func_bomb_target","info_bomb_target"}; public plugin_init() {     register_plugin("c4 killer", "SPiNX", "04-2021");     for(new ent;ent < sizeof c4;++ent)         remove_entity_name(c4[ent]); }


Have you tested it?
I actually made plugin for removing c4 from that tutorial that @+ARUKARI- gave me

https://forums.alliedmods.net/showthread.php?t=332835
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-14-2021 at 21:37.
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-15-2021 , 15:17   Re: Remove C4
Reply With Quote #6

It works. I consider it more of a line of a code than a plugin although it is.
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-15-2021 , 16:52   Re: Remove C4
Reply With Quote #7

Well, I will test it when I finish my exams and give you my opinion
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-15-2021 , 20:45   Re: Remove C4
Reply With Quote #8

An ounce of prevention is worth a pound of cure. It is much easier to void bomb from the game than it is to perpetually handle it each round IMHO. Best of luck with the exams.
__________________
DJEarthQuake 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 18:15.


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