Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- inside conf/atcommand_athena.conf
- find this line
- // Disconnect all users from the server
- kickall: 99,99
- then add below with the following contents...
- /*
- // Disconnect all users of a map from server
- kickplayers: 99,99
- /*
- inside src/map/atcommand.c
- find this command
- ACMD_FUNC(kickall)
- below of this kickall ACMD function, add below with the following contents...
- /*
- /*==========================================
- * @kickplayers <mapname>
- *------------------------------------------*/
- ACMD_FUNC(kickplayers)
- {
- struct map_session_data* pl_sd;
- struct s_mapiterator* iter;
- char map_name[MAP_NAME_LENGTH_EXT];
- int count = 0;
- int map_id = -1;
- nullpo_retr( -1, sd );
- if( !message || !*message ){
- clif_displaymessage( fd, "Please enter a map name ( usage: @kickplayers <map name> )." );
- return -1;
- }else{
- sscanf(message, "%15s", map_name);
- if( ( map_id = map_mapname2mapid( map_name ) ) < 0 ){
- clif_displaymessage( fd, "Please enter valid map name." );
- return -1;
- }
- }
- iter = mapit_getallusers();
- for( pl_sd = (TBL_PC*) mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*) mapit_next(iter) ){
- if ( pc_isGM(sd) >= pc_isGM(pl_sd) && pl_sd->bl.m == map_id && sd->status.account_id != pl_sd->status.account_id ){
- clif_GM_kick(NULL, pl_sd);
- count++;
- }
- }
- mapit_free(iter);
- sprintf( atcmd_output, "Kicked %d Players from %s.",count,map_name );
- clif_displaymessage( fd, atcmd_output );
- return 0;
- }
- /*
- inside src/map/atcommand.c
- find this command
- { "kickall", 99,99, atcommand_kickall },
- below of this line, add below with the following contents...
- /*
- { "kickplayers", 99,99, atcommand_kickplayers },
- RECOMPILE and DONE...
Advertisement
Add Comment
Please, Sign In to add comment