Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Latest Threads
Answer to AmazingDan /due to closed pm/
Last Post: AmazingDan
Today 01:56
» Replies: 1
» Views: 19
Report SkinHead.
Last Post: exen
2020-01-23 22:20
» Replies: 2
» Views: 67
Scripts
Last Post: PomPa man
2020-01-23 06:33
» Replies: 2
» Views: 121
Banned for no reason
Last Post: Mr.killer
2020-01-22 15:24
» Replies: 0
» Views: 100
Report new jesus leon
Last Post: PomPa man
2020-01-22 14:58
» Replies: 10
» Views: 252
Weapon Models
Last Post: essa
2020-01-22 12:11
» Replies: 10
» Views: 1043
Reporting admin [ **My*Life*My*Rules*]
Last Post: JACK_HAMMER
2020-01-19 13:54
» Replies: 1
» Views: 210
NEW PLUGIN FOR BB!
Last Post: krzysieX
2020-01-18 19:49
» Replies: 9
» Views: 539
Basebuilder suggestion
Last Post: krzysieX
2020-01-18 19:06
» Replies: 3
» Views: 253
cheating
Last Post: DiNAR
2020-01-17 21:20
» Replies: 14
» Views: 643

Friends
CSdownload
VideoShare

NEW PLUGIN FOR BB!
#1
Lightbulb 
Hello, it's me again!
I'd like to offer suggestions for uploading 2 plugins.

Namely, to avoid that the zombies enter the camp where nobody is and lose their time without completing the zombie goals - I recommend the plugin that after killing the player (CT) will automatically remove its blocks (objects)
1. deletenoplayerblock.sma
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <basebuilder>

native bb_get_team_id( id )

#define PLUGIN "[BB]Usuwanie Kamp"
#define VERSION "1.0"
#define AUTHOR "k0X"

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event( "DeathMsg", "DeathMsg", "a" )
}    
public DeathMsg( ){
    new Victim = read_data( 2 )
    new Team = bb_get_team_id( Victim )
    if( !bb_is_build_phase( ) && !bb_is_prep_phase( ) ){
        if( Team != 0 ){
            if( get_user_team( Team ) == 1 )
                DeleteBlock( 1, Victim, Team )
        }else DeleteBlock( 2, Victim, 0 )
    }
}
public bb_prepphase_started( ){
    DeleteBlock( 0, 0, 0 )
}
public bb_round_started( ){
    DeleteBlock( 0, 0, 0 )
}
public DeleteBlock( const type, const f1, const f2 ){
    new szTarget[ 16 ], iEnt;
    while( ( iEnt = engfunc( EngFunc_FindEntityByString, iEnt, "classname", "func_wall" ) ) != 0 ){
        if( !pev_valid( iEnt) )
            continue;
        pev( iEnt, pev_targetname, szTarget, charsmax( szTarget ) )
        if( equal( szTarget, "ignore" ) || equal( szTarget, "barrier" ) ){
            continue;
        }
        if( type == 0 &&  pev( iEnt, pev_iuser4 ) == 0 )
            engfunc( EngFunc_SetOrigin, iEnt, { 9999.0, 999.0, 9999.0 } )
        if( type == 1 ){
            if( pev( iEnt, pev_iuser4 ) == f1 || pev( iEnt, pev_iuser4 ) == f2 )
                engfunc( EngFunc_SetOrigin, iEnt, { 9999.0, 999.0, 9999.0 } )
        }
        if( type == 2 ){
            if( pev( iEnt, pev_iuser4 ) == f1 )
                engfunc( EngFunc_SetOrigin, iEnt, { 9999.0, 999.0, 9999.0 } )
        }
            
    }    
}
And two:
Plguin who will create teams - thanks to him we can camp in two people (CT) and after the death of one CT from the team our blocks do not disappear.
In addition, plugins make it impossible to touch "other people" blocks. So if we reserve the block first, no one else can touch it.
Plguin also does not allow people who are not in the team to enter the camp (UNWANTED PERSONS) - Because he throws them / shakes the entire screen.
2.teambb.sma

Code:
#include <amxmodx>
#include <amxmisc>
#include <basebuilder>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <ColorChat>

#define PLUGIN "[BB]Team"
#define VERSION "1.0"
#define AUTHOR "k0X"

new Player_id[ 33 ]
new Player_id_ask[ 33 ]
new Player_id_list[ 33 ][ 20 ]
new Float:Player_velo[ 33 ][ 3 ]
new Player_black[ 33 ]
new SprTeam;
new SprSmoke
new iNumPepole;
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_forward( FM_Touch, "PlayerTouch" )
    register_forward( FM_CmdStart, "CmdStart" )
    register_clcmd( "say /team", "TeamMenu" )
    iNumPepole=6
}
public plugin_natives( ){
    register_native( "bb_get_team_id", "ReturnPlayerId", 1 )
}
public ReturnPlayerId( id )
    return Player_id[ id ]
public plugin_precache( ){
    SprTeam = precache_model("sprites/Team.spr")
    SprSmoke = precache_model("sprites/smoke.spr")
}    
public CmdStart( id ){
    if( !is_user_alive( id ) || !is_user_connected( id ) )
        return FMRES_IGNORED
    if( Player_velo[ id ][ 0 ] != 0.0 || Player_velo[ id ][ 1 ] != 0.0 || Player_velo[ id ][ 2 ] != 0.0 ){
        entity_set_vector( id, EV_VEC_velocity, Player_velo[ id ] )
        Player_velo[ id ][ 0 ] = 0.0
        Player_velo[ id ][ 1 ] = 0.0
        Player_velo[ id ][ 2 ] = 0.0
    }
    if( !bb_is_build_phase( ) && !bb_is_prep_phase( ) )
        return PLUGIN_CONTINUE
    if( Player_id[ id ] != 0 ){    
        if( get_user_team( id ) == 2 ){
            if( get_user_team( Player_id[ id ] ) != get_user_team( id ) )
                return PLUGIN_CONTINUE
            if( Player_id[ id ] == 0 )
                return PLUGIN_CONTINUE
            static Float:fTime[33];
            new Float:fTimeN = get_gametime();
            if((fTimeN- Float:fTime[id]) >= 0.5){                    
                new Float:fOrigin[ 3 ], iOrigin[ 3]
                entity_get_vector( id, EV_VEC_origin, fOrigin )
                FVecIVec( fOrigin, iOrigin )
                new Float:fOrigin2[ 3 ], iOrigin2[ 3]
                entity_get_vector( Player_id[ id ], EV_VEC_origin, fOrigin2 )
                FVecIVec( fOrigin2, iOrigin2 )
                message_begin( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, id )    
                write_byte(TE_BEAMPOINTS)            
                write_coord(iOrigin[0])    // start position
                write_coord(iOrigin[1])
                write_coord(iOrigin[2])
                write_coord(iOrigin2[0])    // end position
                write_coord(iOrigin2[1])
                write_coord(iOrigin2[2])
                write_short(SprSmoke)    // sprite index
                write_byte(0)    // starting frame
                write_byte(0)    // frame rate in 0.1's
                write_byte(1)    // life in 0.1's
                write_byte(4)    // line width in 0.1's
                write_byte(0)    // noise amplitude in 0.01's
                write_byte(255)    // Red
                write_byte(174)    // Gren
                write_byte(204)    // Blue    
                write_byte(250)    // brightness
                write_byte(0)    // scroll speed in 0.1's
                message_end()
                
                message_begin( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, id )            
                write_byte( TE_PLAYERATTACHMENT )
                write_byte( Player_id[ id ] )            
                write_coord( 40 );  
                write_short( SprTeam )          
                write_short( 5 )               
                message_end( )
                fTime[id] = fTimeN;
                
            }
        }
    }
    return FMRES_IGNORED
}
public PlayerTouch( iEnt, id ){
    if( !is_user_alive( id )  || get_user_team( id ) != 2 )
        return FMRES_IGNORED
        
    new szClass[ 10 ], szTarget[ 7 ]
    entity_get_string(iEnt, EV_SZ_classname, szClass, 9);
    entity_get_string(iEnt, EV_SZ_targetname, szTarget, 6);
    if ( equal(szClass, "func_wall") && !equal(szTarget, "ignore") && !equal(szTarget, "barrier") ){        
        if( bb_is_build_phase( ) )
            return PLUGIN_CONTINUE
        if( entity_get_int( iEnt, EV_INT_iuser4 ) == 0 )
            return PLUGIN_CONTINUE
        if( id == entity_get_int( iEnt, EV_INT_iuser4 ) )
            return PLUGIN_CONTINUE
        if( Player_id[ id ] == entity_get_int( iEnt, EV_INT_iuser4 ) && Player_id[ id ] != 0 )
            return PLUGIN_CONTINUE
        if( has_flag( id, "b" ) )
            return PLUGIN_CONTINUE
        message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ),{0,0,0},id );
        write_short(1<<1 );    // Duration of fadeout
        write_short( 1<<12 );    // Hold time of color
        write_short( 1<<1 );    // Fade type
        write_byte ( 0 );        // Red
        write_byte ( 0 );        // Green
        write_byte ( 0 );        // Blue
        write_byte ( Player_black[ id ] );    // Alpha
        message_end();
        Player_velo[ id ][ 0 ] = random_float( 0.0, 455.0 )
        Player_velo[ id ][ 1 ] = random_float( 0.0, 455.0 )
        Player_velo[ id ][ 2 ] = random_float( 0.0, 355.0 )
        if( Player_black[ id ] < 255 )
            Player_black[ id ] += 20    
    }
    return FMRES_IGNORED
}
public client_connect( id ){
    Player_id[ id ] = 0
}
public client_disconnect( id ){
    if( Player_id[ id ] != 0 ){    
        Player_id[ id ] = 0
        Player_id[ Player_id[ id ] ] = 0
    }
}
public TeamMenu( id ){
    new menu = menu_create( "Options:", "TeamMenu_2" )
    new gForm[ 128 ]
    if( Player_id[ id ] == 0 ){
        if( Alive( 4 ) <  iNumPepole ){
            format( gForm, sizeof( gForm ), "Blank:\y %d players",  iNumPepole-Alive( 4 ) )
            menu_additem( menu, gForm )
        }else menu_additem( menu, "Create Team" )
    }else{
        new Name[ 33 ]
        if( is_user_connected( Player_id[ id ] ) ) get_user_name( Player_id[ id ], Name, sizeof( Name ) )
        else format( Name, sizeof( Name ), "Blak players" )
        format( gForm, sizeof( gForm ), "Leave Team:\y %s", Name )
        menu_additem( menu, gForm )
    }
    menu_display( id, menu, 0 )
}
public TeamMenu_2( id, menu, item ){
    if( item == MENU_EXIT ){
        menu_destroy( menu )
        return PLUGIN_HANDLED
    }
    switch( item ){
        case 0:{
            if( Player_id[ id ] == 0 ){
                if( Alive( 4 ) >= iNumPepole )
                    CreateTeam( id )
            }else{
                if( !bb_is_build_phase( ) ){
                    ColorChat( id, TEAM_COLOR, "^x04***^x01 Dont now leave team.^x04 ***" )    
                    return PLUGIN_CONTINUE
                }
                Player_id[ Player_id[ id ] ] = 0
                ColorChat( Player_id[ id ], TEAM_COLOR, "^x04***^x01 Team desctruction^x04 ***" )    
                Player_id[ id ] = 0
                ColorChat( id, TEAM_COLOR, "^x04***^x01 Leave Team^x04 ***" )    
            }
        }
    }
    return PLUGIN_HANDLED
}
public CreateTeam( id ){
    new Name[ 33 ]
    new menu = menu_create( "Add players to team", "CreateTeam_2" )
    for( new i = 1, d = 0; i <= get_maxplayers( ); i ++ ){
        if( !is_user_connected( i ) )
            continue
        if( get_user_team( id ) != get_user_team( i ) )
            continue
        if( i == id )
            continue
        if( Player_id[ i ] != 0 )
            continue
        Player_id_list[ id ][ d++ ] = i
        get_user_name( i, Name, sizeof( Name ) )
        menu_additem( menu, Name )        
    }
    menu_display( id, menu, 0 )
}
public CreateTeam_2( id, menu, item ){
    if( item == MENU_EXIT ){
        menu_destroy( menu )
        return PLUGIN_HANDLED
    }    
    if( Alive( 4 ) >= iNumPepole )
        SendAsk( id, Player_id_list[ id ][ item ] )
    return PLUGIN_HANDLED
}
public SendAsk( id_asker, id ){
    Player_id_ask[ id ] = id_asker
    new gForm[ 128 ], Name[ 33 ]
    get_user_name( id_asker, Name, sizeof( Name ) )    
    format( gForm, sizeof( gForm ), "Player:\w %s\y Invite a Team", Name )
    new menu = menu_create( gForm, "SendAsk_2" )
    menu_additem( menu, "Accept" )
    menu_additem( menu, "Reject" )
    menu_display( id, menu, 0 )
}
public SendAsk_2( id, menu, item ){
    if( item == MENU_EXIT ){
        menu_destroy( menu )
        return PLUGIN_HANDLED
    }
    switch( item ){
        case 0:{
            if( Player_id[ id ] == 0 ){
                if( Alive( 4 ) >=  iNumPepole ){
                    new Name[ 33 ]
                    get_user_name( id, Name, sizeof( Name ) )
                    Player_id[ id ] = Player_id_ask[ id ]
                    Player_id[ Player_id_ask[ id ] ] = id
                    ColorChat( Player_id_ask[ id ], TEAM_COLOR, "^x04***^x01 Players^x03 %s^x01 accept invite^x04 ***", Name )
                }
            }
        }
        case 1:{
            new Name[ 33 ]
            get_user_name( id, Name, sizeof( Name ) )
            ColorChat( Player_id_ask[ id ], TEAM_COLOR, "^x04***^x01 Platers^x03 %s^x01 reject invite^x04 ***", Name )
        }
        
    }
    return PLUGIN_HANDLED
}
public Alive( team ){
    new PlayerAlive
    for( new i = 1 ; i <= get_maxplayers(); i ++ )
        if( get_user_team( i ) == team || team == 4 )
            if( is_user_alive( i ) )
                PlayerAlive++
    return PlayerAlive
}
Reply
Thanks given by: Cpunek
#2
I assume both taken from alliedmodders?
Regardless, it could work for BB. It's always been a problem when zombies hide instead of killing humans (or just wander around empty bases). This same plugin I've already seen in CS:GO base builder mods.
In terms of the teaming plugin, I am concerned if it will prevent normal players from unblocking CT/T spawn (if it gets blocked) or a case where some other player puts a block in your base, would that block disappear from there (without him being in your team), or would you be unable to remove it, hence your base being... well, sabotaged.

And looking at the two plugins, they do work together nicely and there could be unwanted side effects experienced with the first plugin if the second one isn't present.

I assume you've already had it used in polish servers and you could answer to the questions I had above.
Reply
Thanks given by:
#3
Of course, if someone blocks the spawn /, another player's campaign, unfortunately no one but the admin will help. On Polish servers no one has ever blocked spawn or nobody has ever blocked / hindered another camp player.
But the plguins work very well together, and are very useful.
The rules are there to stick to it, so it offers harsher penalties for not following it, and everyone will follow it.
Many people from this plugin would be happy, I hope you will download these plugins.
Reply
Thanks given by:
#4
You sound naive.
Both scenarios will occur on a daily basis.

Quote: On Polish servers no one has ever blocked spawn or nobody has ever blocked / hindered another camp player
I am sorry to have to be the one that explains to you that your own country's servers are not unique in any way, neither are bulgarian servers, nor any other servers. The same principle applies to players - they are all humans, who, will always be either stupid, uninformed, vengeful, malicious in some ocasions, trolling in some cases, among the several good qualities they may or may not have. There is no way that you do not have such people in polish servers and as a statement it is ridiculous and naive to assume so.

And the plugins will work well together - I posed my questions so I know if the possible issues are or aren't accounted for.
I do agree that people's blocks being protected will be a big benefit, but you're counting on having admins online 24/7 to make sure nothing goes wrong. Base builder, sadly, is filled with young children that do not speak english, hence they can't read the rules, that also do not know of the existence of the rules and they also lack the experience of knowing what is acceptable and what isn't. That's a lot of babysitting to do. But, as I said, it WILL solve "he stole my blocks and destroyed my base" but in its place you will have "he put his block in my base and I can't get in". Malicious people are creative in their troublemaking.

To add something else (more of a general thing), you haven't provided any download links, although the code is enough and the code can be popped into a compiler easily, generating the necessary files. For now, I suggest we await other base builder players to respond on this, as it will affect the gameplay, my personal stance is that I am willing to try it despite the possible shortcomings.
Reply
Thanks given by:
#5
Cool. I'll be back from work encouraging people to comment on the forum. I hope it will pass.
in general on this server, at most, I saw people steal / remove blocks by other players than blocking the entrance to the camp.
Okay so we wait
Reply
Thanks given by:
#6
I think that the negative solution to these additions is that someone can block our campaign as the administrator mentioned and we will not unblock it. In fact, this does not happen on the server. More often, players steal blocks from another player, which makes no sense. So it seems to me that this is the positive side that nobody will move our blocks anymore. And as for the teams, I also think a very good solution because it often happens that someone enters our camp whom we do not want to block us at its beginning and we die. I am very good at uploading add-ons.
Reply
Thanks given by: krzysieX
#7
Hiya, I think the both suggested plugins to add into basebuilder server are great. As pompa stated before it would prevent "he stole my blocks and destroyed my base".

It has its advantages and downsides.
The first plugin which removes the base of a ct player that just died sounds like a great idea, because zombies are always wondering about into other bases even without anyone being there. But to be honest, people who don't want to attack humans just won't go to bases. First plugin would be nice to have but if some other player is in that base and isn't teaming with the guy who built it, it would be unfortunate for him.

For the second plugin, I think teams would be great and the plugin itself would help a lot for people not to touch your blocks. But ether way who wants to destroy or just be funny to other people will just put the block so that can't enter the base. If there wouldn't be any admins online it would be just the same as not having this plugin.
Also people just could touch all blocks so that everyone else can't used them. Seen this before in other servers, not a really nice thing to have.

In my opinion it would be better just to add block locks to normal players to prevent destroying their bases etc. I would suggest to give normal players 10 locks and increase vip locks.

People who actually can build and wants to play the server would figure out how to lock their bases, which would prevent them to be destroyed Smile

But overall about these two suggestions from krzysieX, the plugins would be great to have but without admins online it wouldn't be that great.
Reply
Thanks given by:
#8
Thank you for saying - @AmazingDan
Of course, without administrators it would not be interesting.
But let's think, is it now?
If there is no administrator now, they still steal blocks and block respaws.
In this case, the plugin will change that no one will steal, so it seems to me on +.
Reply
Thanks given by:
#9
then maybe you will put it into the test phase?
Reply
Thanks given by:
#10
Exclamation 
Please, upload these plugins, I'm fed up with admonition, punishment, and at the end of banning for stealing blocks, or if someone enters their own camp, thereby blocking the owner of the camp ...
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)
Social Networks

You Should Like it


Birthdays
Today's Birthdays
avatar (34)Williamdrasp
Upcoming Birthdays
avatar (38)DominicTak

Online Staff
There are no staff members currently online.