HTML-Kodu:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
new const komutlar[][]= {
"/kick",
".kick",
"!kick"
}
new bool:b_Gag[33]
new AMX_SUPER_NO_PLAYERS[] = "AMX_SUPER_NO_PLAYERS"
new AMX_SUPER_TEAM_IMMUNITY[] = "AMX_SUPER_TEAM_IMMUNITY"
new amx_show_activity
enum {
GET_TEAM_TARGET_ISALL,
GET_TEAM_TARGET_ISTEAMCT,
GET_TEAM_TARGET_ISTERRORIST,
}
enum {
GET_TEAM_TARGET_SKIPNOBODY,
GET_TEAM_TARET_SKIPBOTS,
GET_TEAM_TARGET_SKIPDEADPEOPLE
}
stock get_team_target(arg[],players[32],&pnum,skipMode=GET_TEAM_TARGET_SKIPNOBODY){
//Modular Team Targeting code by Sid 6.7
new whoTeam
new cmdflags[4]
switch(skipMode){
case GET_TEAM_TARET_SKIPBOTS: cmdflags = "ce"
case GET_TEAM_TARGET_SKIPNOBODY: cmdflags = "e"
case GET_TEAM_TARGET_SKIPDEADPEOPLE: cmdflags = "ae"
}
if(equali(arg[1],"ALL",strlen(arg[1]))) {
switch(skipMode){
case GET_TEAM_TARET_SKIPBOTS: cmdflags = "c"
case GET_TEAM_TARGET_SKIPNOBODY: cmdflags = ""
case GET_TEAM_TARGET_SKIPDEADPEOPLE: cmdflags = "a"
}
whoTeam = GET_TEAM_TARGET_ISALL
get_players(players,pnum,cmdflags)
}
if(equali(arg[1],"TERRORIST",strlen(arg[1]))) {
whoTeam = GET_TEAM_TARGET_ISTERRORIST
get_players(players,pnum,cmdflags,"TERRORIST")
}
if(equali(arg[1],"CT") || equali(arg[1],"C") || equali(arg[1],"COUNTER")) {
whoTeam = GET_TEAM_TARGET_ISTEAMCT
get_players(players,pnum,cmdflags,"CT")
}
return whoTeam
}
public plugin_init()
{
register_plugin("Say Komutlari(Cj7)", "v1.1", "dangerlord63")
register_clcmd("say", "say_mustafa");
register_concmd("amx_quit","admin_quit",ADMIN_SLAY,"<nick, #userid, authid or @team>")
register_concmd("amx_degis","TakimDegis",ADMIN_SLAY,"<nick, #userid, authid or @team>")
}
public client_putinserver(id)
{
b_Gag[id] = false
}
public plugin_cfg(){
amx_show_activity = get_cvar_pointer("amx_show_activity");
}
public say_mustafa(id) {
new mesaj[128];
read_argv(1, mesaj, 127);
for(new i=0;i<sizeof(komutlar);i++) {
new bagla[33];
formatex(bagla,32,"%s",komutlar[i])
if(containi(mesaj,bagla) == 0) {
switch(i) {
case 0,1,2,3,4,5,6,7,8: {
if(!(get_user_flags(id) & ADMIN_CVAR))
return PLUGIN_CONTINUE;
}
}
mustafa(id, i);
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
public admin_quit(id,level,cid){
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new arg[32], admin_name[32], player_name[32], admin_authid[36], player_authid[36]
read_argv(1,arg,31)
get_user_name(id,admin_name,31)
get_user_authid(id,admin_authid,35)
if (arg[0]=='@'){
new players[32], inum
get_team_target(arg,players,inum)
if (inum == 0) {
console_print(id,"%L", LANG_PLAYER, AMX_SUPER_NO_PLAYERS)
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a){
if (get_user_flags(players[a])&ADMIN_IMMUNITY && players[a] != id){
get_user_name(players[a],player_name,31)
console_print(id,"%L", LANG_PLAYER, AMX_SUPER_TEAM_IMMUNITY,player_name)
continue
}
client_cmd(players[a], "quit")
client_cmd(0,"spk ambience/thunder_clap.wav")
}
switch(get_pcvar_num(amx_show_activity)) {
case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_TEAM_CASE2",admin_name,arg[1])
case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_TEAM_CASE1",arg[1])
}
log_amx("%L", LANG_SERVER, "AMX_SUPER_QUIT_TEAM_LOG",admin_name,admin_authid,arg[1])
}
else {
new player = cmd_target(id,arg,3)
if (!player) return PLUGIN_HANDLED
client_cmd(player, "quit")
emit_sound(0, CHAN_VOICE, "ambience/thunder_clap.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
get_user_name(player,player_name,31)
get_user_authid(player,player_authid,35)
switch(get_pcvar_num(amx_show_activity)) {
case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_PLAYER_CASE2",admin_name,player_name)
case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_PLAYER_CASE1",player_name)
}
log_amx("%L", LANG_SERVER, "AMX_SUPER_QUIT_PLAYER_LOG",admin_name,admin_authid,player_name,player_authid)
}
return PLUGIN_CONTINUE
}
public TakimDegis(id, level, cid){
if( !cmd_access( id, level, cid, 1 ) )
return PLUGIN_HANDLED;
new players[32], num
get_players(players, num)
new player
for(new i = 0; i < num; i++)
{
player = players[i]
if(cs_get_user_team(player) == CS_TEAM_T)
{
cs_set_user_team(player, CS_TEAM_CT)
}
else if(cs_get_user_team(player) == CS_TEAM_CT)
{
cs_set_user_team(player, CS_TEAM_T)
}
}
client_print(0,print_chat, "[www.csplague.com] Takimlar Degistirildi.")
return PLUGIN_HANDLED;
}
public mustafa(id, qqq) {
{
new user[33]
new admin[33]
get_user_name( id,user,32)
get_user_name( id,admin,32)
new mesaj[128], bagla[33], veri[65],veri2[65],veri3[65],level,cid;
read_argv (1, mesaj, 128);
parse(mesaj,bagla,32,veri,64,veri2,64,veri3,64);
replace(bagla,32,"ghsfg","");
new uID = cmd_target(id,veri,CMDTARGET_ALLOW_SELF)
switch(qqq) {
case 0: {
console_cmd(id,"amx_kick %s", veri);
client_print(id, print_chat, "amx_kick %s")
if(!cmd_access(id, level, cid, 1)){
return PLUGIN_HANDLED
}
}
case 1: {
console_cmd(id,"amx_kick %s", veri);
client_print(id, print_chat, "amx_kick %s")
if(!cmd_access(id, level, cid, 1)){
return PLUGIN_HANDLED
}
}
case 2: {
console_cmd(id,"amx_kick %s", veri);
client_print(id, print_chat, "amx_kick %s")
if(!cmd_access(id, level, cid, 1)){
return PLUGIN_HANDLED
}
}
}
}
}