Raised This Month: $ Target: $400
 0% 

[CS] Silent bomb removing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-22-2013 , 11:06   [CS] Silent bomb removing
Reply With Quote #1

Hello. I read some topics about this..
But a can't find a better way.
1. Is possible remove bomb from spawned players without any text\chat messages (player dropped the bomb), red icons (when you lose c4 with cs_set_user_bpammo(player, CSW_C4, 0)), etc?
I tried some variants.. For example:

PHP Code:
register_logevent("logevent_function_p"3"2=Spawned_With_The_Bomb");

public 
logevent_function_p()
{
    new 
players[32], inum
    get_players
(playersinum)
    
    for (new 
0inum; ++i)
    {
        if(
user_has_weapon(players[i], CSW_C4))
        {
            
cs_set_user_bpammo(players[i], CSW_C40)
            
cs_set_user_plant(players[i], 00)
        }
    }

This way is good, when you playing alone (or with 1 enemy). When count of players > 2, every spawn of T player adds c4 to you. Or red point on radar does not removes, or bomb can not be removed, if bomb is dropped, or player marked as a "BOMB" in scoreboard (when player did't have a c4)..

One note: do not use removing func / info _bomb_target. Plugin-remover C4 should work some time (ex. 2 minutes from map start (warm up mod)).

2. when i use cs_set_user_plant, player's status in scoreboard updates ONLY AFTER death. Is possible to update status immediately?
__________________
sorry my bad english...

Last edited by alonelive; 01-22-2013 at 11:10.
alonelive is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-22-2013 , 11:14   Re: [CS] Silent bomb removing
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

#define VERSION "0.0.1"
#define PLUGIN ""

new gmsgBombPickup

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_logevent"LogEvent_Got_Bomb"3"2=Spawned_With_The_Bomb" )
    
register_logevent"LogEvent_Got_Bomb"3"2=Got_The_Bomb" )

    
gmsgBombPickup get_user_msgid("BombPickup")
}

public 
LogEvent_Got_Bomb( )
{
    new 
iFwd register_forward(FM_SetModel"SetModel"1)
    
engclient_cmd(0"drop""weapon_c4")
    
unregister_forward(FM_SetModeliFwd1)
}

public 
SetModelentmodel[] )
{
    if( 
equal(model"models/w_backpack.mdl") )
    {
        
call_think(ent)
        
message_begin(MSG_ALLgmsgBombPickup)
        
message_end()
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-22-2013 , 11:24   Re: [CS] Silent bomb removing
Reply With Quote #3

Thank you, i saw this your post.
Works fine. but..
when bots connected, i see this

PS there are no other c4 plugins installed.

Is the way for blocking icons?
Attached Thumbnails
Click image for larger version

Name:	sss.jpg
Views:	212
Size:	13.3 KB
ID:	114798  
__________________
sorry my bad english...

Last edited by alonelive; 01-22-2013 at 11:59.
alonelive is offline
fl0werD
Senior Member
Join Date: May 2011
Old 01-22-2013 , 13:09   Re: [CS] Silent bomb removing
Reply With Quote #4

Block message WeapPickup.
fl0werD is offline
Send a message via ICQ to fl0werD
alonelive
Senior Member
Join Date: Jan 2011
Location: Big snow country.. :)
Old 01-22-2013 , 13:21   Re: [CS] Silent bomb removing
Reply With Quote #5

Thank you.
Solved with:

set_msg_block(get_user_msgid("AmmoPickup"), BLOCK_SET) // little C4 icons
set_msg_block(get_user_msgid("WeapPickup"), BLOCK_SET) // big c4 icons

This construction blocks all weapon pickup\drop icon messages.
Сойдет!
__________________
sorry my bad english...
alonelive is offline
fl0werD
Senior Member
Join Date: May 2011
Old 01-22-2013 , 14:30   Re: [CS] Silent bomb removing
Reply With Quote #6

PHP Code:
register_message(get_user_msgid("WeapPickup"), "MessageWeapPickup"
PHP Code:
public MessageWeapPickup(MsgIDMsgDestiPlayer)
{
    if(
get_msg_arg_int(1) == CSW_C4)
        return 
PLUGIN_HANDLED;

    return 
PLUGIN_CONTINUE;

But you only wanted to c4
Но ты же только хотел с4.

Last edited by fl0werD; 01-22-2013 at 14:32.
fl0werD is offline
Send a message via ICQ to fl0werD
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 20:29.


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