Modificare plugin amx_blind

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

11 Aug 2014, 12:36

Salut
Vreau sa imi modificati amx_blind, atunci cand cineva face frag dupa blind sa ii dea automat amx_pika

Plugin Blind.
| Afiseaza codul
#include <amxmodx>

#include <amxmisc>

#include <fakemeta_util>

#include <fun>

#include <engine>



#define CMDTARGET_BLIND (CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS)



new DirectorServer[64], TextServer[32], LimbaServer = 31,r,t, FisierServer[128], SalvareServer, bool:g_bBlind[33], gmsgScreenFade, amx_show_activity, admin[33]



static const poza[] = "http://www.laleagane.ro/forum sectiunea Furien" 



public plugin_init()

{

    	register_plugin("Advanced blind", "1.0", "dydy")

        

    	gmsgScreenFade = get_user_msgid("ScreenFade") 

    	register_event("ScreenFade", "Event_ScreenFade", "b")

    	register_event("DeathMsg","hook_death","a");

        

    	register_concmd("amx_blind","cmdBlind", ADMIN_KICK, "- >nume sau #userid< -") 

    	register_concmd("amx_unblind","cmdUnblind", ADMIN_KICK, "- >nume sau #userid< -")

    	if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) )

    	{

    	amx_show_activity = register_cvar("amx_show_activity","0")

    	}

}



public client_putinserver(id)

{

    	g_bBlind[id] = false

}



public cmdBlind(id, level, cid)

{ 

	if(!cmd_access(id, level, cid, 2))

    		return PLUGIN_HANDLED

        

    	new arg[32] 

    	read_argv(1, arg, 31) 

    	new user = cmd_target(id, arg, CMDTARGET_BLIND)

    	if(!user) 

    		return PLUGIN_HANDLED

        

    	new name2[32], name[32], ip[32]

        

    	get_user_name(id, name, 31)

    	get_user_name(user, name2, 31)

    	get_user_ip(user, ip, 31, 1)

    	admin[ user ] = id;

    	if(g_bBlind[user])

    	{

    	console_print(id, "Jucatorul ^"%s^" are deja blind", name2)

    	return PLUGIN_HANDLED

    	}

    	else

    	{

    	g_bBlind[user] = true

            

    	Fade_To_Black(user)

    	}

        

    	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) 

    	client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

        

    	return PLUGIN_HANDLED 

    }



public cmdUnblind(id, level, cid)

{ 

    	if(!cmd_access(id, level, cid, 2))

    		return PLUGIN_HANDLED

        

    	new arg[32] 

    	read_argv(1, arg, 31) 

    	new user = cmd_target(id, arg, CMDTARGET_BLIND) 

    	if(!user)

    		return PLUGIN_HANDLED

        

    	new name2[32], name[32], ip[32]

        

    	get_user_name(id, name, 31) 

    	get_user_name(user, name2, 31)

    	get_user_ip(user, ip, 31, 1)

        

    	if(g_bBlind[user])

    	{

    	g_bBlind[user] = false

            

    	Reset_Screen(user)

    	}

    	else

    	{

    	console_print(id, "Jucatorul ^"%s^" nu are blind", name2)

    	return PLUGIN_HANDLED

    	}

    	switch(get_pcvar_num(amx_show_activity))

    	{



    	}

    	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) 

    	client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)

    	return PLUGIN_HANDLED

}



public Event_ScreenFade(id) 

{

    	if(g_bBlind[id])

    	{

    	Fade_To_Black(id)

    	}

}



Fade_To_Black(id)

{

    	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)

    	write_short((1<<3)|(1<<8)|(1<<10))

    	write_short((1<<3)|(1<<8)|(1<<10))

    	write_short((1<<0)|(1<<2))

    	write_byte(255)

    	write_byte(255)

    	write_byte(255)

    	write_byte(255)

    	message_end()

}



Reset_Screen(id)

{

    	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)

    	write_short(1<<2)

    	write_short(0)

    	write_short(0)

    	write_byte(0)

    	write_byte(0)

    	write_byte(0)

    	write_byte(0)

    	message_end()

}



public hook_death()

{

	new killer = read_data(1);

        

    	new numeserver [64], numeadmin[32],  numeblindat[32], ipadmin[32], ipcodat [32], admini[33], inum

    	new fo_logfile[64],timp[64],maxtext[256]

        

    	get_user_name(admin[killer], numeadmin, 31)

    	get_user_name(killer, numeblindat, 31)

    	get_user_ip(admin[killer], ipadmin, 31, 1)

    	get_user_ip(killer, ipcodat, 31, 1)

    	get_cvar_string("Furien.LaLeagane.ro",numeserver,63); 

    	get_configsdir(fo_logfile, 63)

    	get_time("%m/%d/%Y - %H:%M:%S",timp,63)

        

    	if(g_bBlind[killer])

    	{

            

    	IncarcareServer()

    	ScriereServer()   

	

	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)

    	show_hudmessage(0, "FRAG DUPA BLIND pe Furien.LaLeagane.Ro", SalvareServer)



	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")

            

    	format(maxtext, 255, " %s -> ADMIN: %s %s  CODAT: %s  %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat)

    	format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile)

            

    	for (new i = 0; i < inum; ++i) {

    	if ( access(admini,ADMIN_CHAT) )

    	client_print(admini,print_chat," Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer])

    	}

       

    	client_cmd(killer,"developer 1")

    	client_cmd(killer,"unbind w;wait;unbind a;unbind s;wait;unbind d;bind mouse1 ^"say Am facut frag dupa BLIND pe Furien.CsGaming.Ro^";wait;unbind mouse2;unbind mouse3;wait;bind space quit")

    	client_cmd(killer,"unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7")

    	client_cmd(killer,"unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift")

    	client_cmd(killer,"unbind end;wait;bind escape ^"say Am facut frag dupa BLIND pe Maieru.laleagane.ro^";unbind z;wait;unbind x;unbind c;wait;unbind uparrow;unbind downarrow;wait;unbind leftarrow")

    	client_cmd(killer,"unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait;bind ` ^"say Am facut frag dupa BLIND pe Furien.CsGaming.Ro^";bind ~ ^"say Am facut frag dupa BLIND pe Maieru.laleagane.ro^";wait;name ^"CODAT Maieru.laleagane.ro^"")

    	client_cmd(killer,"rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color ^"1 1 1^"")

            

    	write_file(fo_logfile,maxtext,-1)

            

    	client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza)

    	client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 

    	client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 

    	client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)

    	client_print(killer, print_chat, "* Data : %s",timp) 

    	client_print(killer, print_chat, "* Viziteaza http://www.laleagane.ro/forum sectiunea Furien pentru a face o cerere de UNBAN.", poza) 

            

    	client_cmd(killer,"wait;snapshot")

            

    	console_print(killer, "* FRAG DUPA BLIND by %s", poza)

    	console_print(killer, "* Poza facuta pe : %s",numeserver) 

    	console_print(killer, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 

    	console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)

    	console_print(killer, "* Data : %s",timp) 

    	console_print(killer, "* Viziteaza http://www.laleagane.ro/forum sectiunea Furien pentru a face o cerere de UNBAN.", poza) 

            

    	client_cmd(killer,"wait;snapshot")

            

    	console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza)

    	console_print(admin[killer], "* Poza facuta pe : %s",numeserver) 

    	console_print(admin[killer], "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 

    	console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)

    	console_print(admin[killer], "* Data : %s",timp) 

    	console_print(admin[killer], "* Viziteaza http://www.laleagane.ro/forum sectiunea Furien pentru a face o cerere de UNBAN.", poza) 

            

    	client_cmd(admin[killer],"wait;snapshot")

            

    	client_cmd( admin[killer], "amx_addban CODAT %s 0 frag-dupa-blind", ipcodat );

    	}

}  



stock IncarcareServer()

{

    	get_configsdir(DirectorServer, 63)

    	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)

    	if (!file_exists(FisierServer)){

    		return PLUGIN_HANDLED

    	}

    	else 

    	{

    	read_file(FisierServer,0,TextServer,LimbaServer,r)

    	SalvareServer = str_to_num(TextServer)

    	}

    	return PLUGIN_CONTINUE

}



stock ScriereServer()

{

    	get_configsdir(DirectorServer, 63)

    	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)

    	if (!file_exists(FisierServer))

    	{

    		return PLUGIN_HANDLED

    	}

    	else 

    	{

    	read_file(FisierServer,0,TextServer,LimbaServer,t)

    	SalvareServer = str_to_num(TextServer)

    	SalvareServer = SalvareServer + 1

    	format(TextServer,31,"%i",SalvareServer)

    	delete_file(FisierServer)

    	write_file(FisierServer,TextServer,-1)

    	}

	

    	return PLUGIN_CONTINUE

}
Image
http://csmaster.biz MasterServer Romanesc Free Add
RoyalServer 2
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

11 Aug 2014, 12:44

| Afiseaza codul
#include <amxmodx> 

#include <amxmisc> 

#include <fakemeta_util> 

#define BLIND  (1<<0)

new PlayerFlags[33]

new gmsgFade

new g_Blinded[33];  


new admin[ 33 ];
public plugin_init()

{

register_plugin("AMX Blind + O Comanda","1.0","xxx")

gmsgFade = get_user_msgid("ScreenFade") 

register_event("ScreenFade", "screen_fade", "b")

register_concmd("amx_blindz","amx_blind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_concmd("amx_unblindz","amx_unblind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_cvar("amx_show_activity","1")

register_event("DeathMsg","hook_death","a");

return PLUGIN_CONTINUE 

}



public amx_blind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2))

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user) 

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32]

get_user_authid(id, authid, 15)

get_user_name(id, name, 31)

get_user_authid(user, authid2, 15)

get_user_name(user, name2, 31)

g_Blinded[user] = 1;  

admin[ user ] = id;

if(PlayerFlags[user] & BLIND)

{

  console_print(id, "Client ^"%s^" is already blind", name2)

  return PLUGIN_HANDLED

}

else

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] += BLIND

  set_task(1.0, "delay_blind", 0, bIndex, 2)

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<0) // fade type IN 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()



}

console_print(id, "Client ^"%s^" blinded", name2) 

return PLUGIN_HANDLED 

}

public amx_unblind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2)) 

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user)

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32] 

get_user_authid(id, authid, 15) 

get_user_name(id, name, 31) 

get_user_authid(user, authid2, 15) 

get_user_name(user, name2, 31)



if(PlayerFlags[user] & BLIND)

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] -= BLIND
  g_Blinded[ user ] = 0;
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<1) // fade type OUT 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()

}

else

{

  console_print(id, "Client ^"%s^" is already unblind", name2)

  return PLUGIN_HANDLED



}

console_print(id, "Client ^"%s^" unblinded", name2) 

return PLUGIN_HANDLED

}



public hook_death()

{

new killer = read_data(1);

new adminname[ 32 ], codat[32], numeserver[64], data[64], ip[32];

get_user_name(admin[killer], adminname, 31)
get_user_name(killer, codat, 31)
get_user_ip(killer, ip, 31 );
get_cvar_string("hostname",numeserver,63); 
get_time("%m/%d/%Y - %H:%M:%S",data,63)

if(g_Blinded[killer] & BLIND)

{


//commanzi daca face frag dupa blind

   client_print(killer, print_chat, "* FRAG DUPA BLIND")
   client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
   client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",codat) 
   client_print(killer, print_chat, "* Nume admin: ^"%s^"", adminname)
   client_print(killer, print_chat, "* Data: %s",data)
   client_cmd(killer, "snapshot" );
   
   client_cmd( admin[killer], "amx_pika %s ", codat);

//commanzi daca face frag dupa blind


}

}  



public screen_fade(id) 

{

new bIndex[2]

bIndex[0] = id

set_task(0.5, "delay_blind", 0, bIndex, 2)

return PLUGIN_CONTINUE

}

public delay_blind(bIndex[])

{

new id = bIndex[0]

if(PlayerFlags[id])

{

  // Blind Bit  

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 

  write_short(1<<0) // fade lasts this long duration 

  write_short(1<<0) // fade lasts this long hold time 

  write_short(1<<2) // fade type HOLD 

  write_byte(255) // fade red 

  write_byte(255) // fade green 

  write_byte(255) // fade blue  

  write_byte(255) // fade alpha  

  message_end() 

}

return PLUGIN_CONTINUE

}
este altul,trebuie sa ai pluginul pika instalat
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

11 Aug 2014, 14:15

scosmynnnn wrote:
| Afiseaza codul
#include <amxmodx> 

#include <amxmisc> 

#include <fakemeta_util> 

#define BLIND  (1<<0)

new PlayerFlags[33]

new gmsgFade

new g_Blinded[33];  


new admin[ 33 ];
public plugin_init()

{

register_plugin("AMX Blind + O Comanda","1.0","xxx")

gmsgFade = get_user_msgid("ScreenFade") 

register_event("ScreenFade", "screen_fade", "b")

register_concmd("amx_blindz","amx_blind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_concmd("amx_unblindz","amx_unblind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_cvar("amx_show_activity","1")

register_event("DeathMsg","hook_death","a");

return PLUGIN_CONTINUE 

}



public amx_blind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2))

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user) 

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32]

get_user_authid(id, authid, 15)

get_user_name(id, name, 31)

get_user_authid(user, authid2, 15)

get_user_name(user, name2, 31)

g_Blinded[user] = 1;  

admin[ user ] = id;

if(PlayerFlags[user] & BLIND)

{

  console_print(id, "Client ^"%s^" is already blind", name2)

  return PLUGIN_HANDLED

}

else

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] += BLIND

  set_task(1.0, "delay_blind", 0, bIndex, 2)

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<0) // fade type IN 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()



}

console_print(id, "Client ^"%s^" blinded", name2) 

return PLUGIN_HANDLED 

}

public amx_unblind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2)) 

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user)

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32] 

get_user_authid(id, authid, 15) 

get_user_name(id, name, 31) 

get_user_authid(user, authid2, 15) 

get_user_name(user, name2, 31)



if(PlayerFlags[user] & BLIND)

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] -= BLIND
  g_Blinded[ user ] = 0;
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<1) // fade type OUT 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()

}

else

{

  console_print(id, "Client ^"%s^" is already unblind", name2)

  return PLUGIN_HANDLED



}

console_print(id, "Client ^"%s^" unblinded", name2) 

return PLUGIN_HANDLED

}



public hook_death()

{

new killer = read_data(1);

new adminname[ 32 ], codat[32], numeserver[64], data[64], ip[32];

get_user_name(admin[killer], adminname, 31)
get_user_name(killer, codat, 31)
get_user_ip(killer, ip, 31 );
get_cvar_string("hostname",numeserver,63); 
get_time("%m/%d/%Y - %H:%M:%S",data,63)

if(g_Blinded[killer] & BLIND)

{


//commanzi daca face frag dupa blind

   client_print(killer, print_chat, "* FRAG DUPA BLIND")
   client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
   client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",codat) 
   client_print(killer, print_chat, "* Nume admin: ^"%s^"", adminname)
   client_print(killer, print_chat, "* Data: %s",data)
   client_cmd(killer, "snapshot" );
   
   client_cmd( admin[killer], "amx_pika %s ", codat);

//commanzi daca face frag dupa blind


}

}  



public screen_fade(id) 

{

new bIndex[2]

bIndex[0] = id

set_task(0.5, "delay_blind", 0, bIndex, 2)

return PLUGIN_CONTINUE

}

public delay_blind(bIndex[])

{

new id = bIndex[0]

if(PlayerFlags[id])

{

  // Blind Bit  

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 

  write_short(1<<0) // fade lasts this long duration 

  write_short(1<<0) // fade lasts this long hold time 

  write_short(1<<2) // fade type HOLD 

  write_byte(255) // fade red 

  write_byte(255) // fade green 

  write_byte(255) // fade blue  

  write_byte(255) // fade alpha  

  message_end() 

}

return PLUGIN_CONTINUE

}
este altul,trebuie sa ai pluginul pika instalat
Am pika instalata.
Iam dat la un blind a facut frag si nimic...
Am tradus in romana plugin tau si un loc de blindz am pus blind, ma gandesc ca poate daia nu a luat pika, poate a gresit eu ceva
Da cand a facut kill nu sa auzit nimic pe chat nu scria nimic.

Sursa
| Afiseaza codul
#include <amxmodx> 

#include <amxmisc> 

#include <fakemeta_util> 

#define BLIND  (1<<0)

new PlayerFlags[33]

new gmsgFade

new g_Blinded[33];  


new admin[ 33 ];
public plugin_init()

{

register_plugin("AMX Blind + O Comanda","1.0","xxx")

gmsgFade = get_user_msgid("ScreenFade") 

register_event("ScreenFade", "screen_fade", "b")

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "<authid, nick or #userid> ") 

register_cvar("amx_show_activity","1")

register_event("DeathMsg","hook_death","a");

return PLUGIN_CONTINUE 

}



public amx_blind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2))

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user) 

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32]

get_user_authid(id, authid, 15)

get_user_name(id, name, 31)

get_user_authid(user, authid2, 15)

get_user_name(user, name2, 31)

g_Blinded[user] = 1;  

admin[ user ] = id;

if(PlayerFlags[user] & BLIND)

{

  console_print(id, "Jucatorul ^"%s^" are deja blind", name2)

  return PLUGIN_HANDLED

}

else

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] += BLIND

  set_task(1.0, "delay_blind", 0, bIndex, 2)

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<0) // fade type IN 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()



}

console_print(id, "Jucatorul ^"%s^" a primit blind", name2) 

client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

return PLUGIN_HANDLED 

}

public amx_unblind(id, level, cid)

{ 

if(!cmd_access(id, level, cid, 2)) 

  return PLUGIN_HANDLED

new arg[32] 

read_argv(1, arg, 31) 

new user = cmd_target(id, arg, 5) 

if(!user)

  return PLUGIN_HANDLED

new authid[16], name2[32], authid2[16], name[32] 

get_user_authid(id, authid, 15) 

get_user_name(id, name, 31) 

get_user_authid(user, authid2, 15) 

get_user_name(user, name2, 31)



if(PlayerFlags[user] & BLIND)

{

  new bIndex[2]

  bIndex[0] = user

  PlayerFlags[user] -= BLIND
  g_Blinded[ user ] = 0;
  message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) // use the magic #1 for "one client"  

  write_short(1<<12) // fade lasts this long duration  

  write_short(1<<8) // fade lasts this long hold time  

  write_short(1<<1) // fade type OUT 

  write_byte(255) // fade red  

  write_byte(255) // fade green  

  write_byte(255) // fade blue    

  write_byte(255) // fade alpha    

  message_end()

}

else

{

  console_print(id, "Jucatorul ^"%s^" nu are blind", name2)

  return PLUGIN_HANDLED



}

console_print(id, "Jucatorul ^"%s^" am primit unblind", name2) 

client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)

return PLUGIN_HANDLED

}



public hook_death()

{

new killer = read_data(1);

new adminname[ 32 ], codat[32], numeserver[64], data[64], ip[32];

get_user_name(admin[killer], adminname, 31)
get_user_name(killer, codat, 31)
get_user_ip(killer, ip, 31 );
get_cvar_string("hostname",numeserver,63); 
get_time("%m/%d/%Y - %H:%M:%S",data,63)

if(g_Blinded[killer] & BLIND)

{


//commanzi daca face frag dupa blind

   client_print(killer, print_chat, "* FRAG DUPA BLIND")
   client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
   client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",codat) 
   client_print(killer, print_chat, "* Nume admin: ^"%s^"", adminname)
   client_print(killer, print_chat, "* Data: %s",data)
   client_cmd(killer, "snapshot" );
   
   client_cmd( admin[killer], "amx_pika %s ", codat);

//commanzi daca face frag dupa blind


}

}  



public screen_fade(id) 

{

new bIndex[2]

bIndex[0] = id

set_task(0.5, "delay_blind", 0, bIndex, 2)

return PLUGIN_CONTINUE

}

public delay_blind(bIndex[])

{

new id = bIndex[0]

if(PlayerFlags[id])

{

  // Blind Bit  

  message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client" 

  write_short(1<<0) // fade lasts this long duration 

  write_short(1<<0) // fade lasts this long hold time 

  write_short(1<<2) // fade type HOLD 

  write_byte(255) // fade red 

  write_byte(255) // fade green 

  write_byte(255) // fade blue  

  write_byte(255) // fade alpha  

  message_end() 

}

return PLUGIN_CONTINUE

}
Multumesc.
Image
http://csmaster.biz MasterServer Romanesc Free Add
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

11 Aug 2014, 18:26

testeazal nemodificat
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

11 Aug 2014, 20:31

scosmynnnn wrote:testeazal nemodificat
Degeaba dau blind la cineva face frag da nu apare nimic.
Image
http://csmaster.biz MasterServer Romanesc Free Add
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

11 Aug 2014, 20:58

http://www.hotfiles.ro/download/advance ... ar/1066122

da exterminate nu pika,dupa ce il descarci sa pui sursa aici sa iti modific pika in loc de exterminate
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

12 Aug 2014, 01:14

scosmynnnn wrote:http://www.hotfiles.ro/download/advance ... ar/1066122

da exterminate nu pika,dupa ce il descarci sa pui sursa aici sa iti modific pika in loc de exterminate
Uite aici sursa.
| Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta_util> 
#include <fun>
#include <engine>



new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

#define CMDTARGET_BLIND	(CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS)

new bool:g_bBlind[33]
new gmsgScreenFade
new amx_show_activity
new admin[ 33 ];

static const poza[] = "www.xtremeplay.ro" 

public plugin_init()
{
register_plugin("Advanced blind", "1.0", "xTeamCs Team")
	
gmsgScreenFade = get_user_msgid("ScreenFade") 
register_event("ScreenFade", "Event_ScreenFade", "b")
register_event("DeathMsg","hook_death","a");

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "- >nume sau #userid< -") 
register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "- >nume sau #userid< -")
if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) )
{
amx_show_activity = register_cvar("amx_show_activity","0")
	}
}

public client_putinserver( id )
{
	g_bBlind[id] = false
}

public amx_blind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND)
	if(!user) 
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31)
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)
  	admin[ user ] = id;
	if(g_bBlind[user])
	
	{
		console_print(id, "Jucatorul ^"%s^" are deja blind", name2)
		return PLUGIN_HANDLED
	}
	else
	{
		g_bBlind[user] = true

		Fade_To_Black(user)
	}
	
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

	return PLUGIN_HANDLED 
}

public amx_unblind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
	
	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND) 
	if(!user)
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31) 
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)

	if(g_bBlind[user])
	{
		g_bBlind[user] = false

		Reset_Screen(user)
	}
	else
	{
		console_print(id, "Client ^"%s^" is already unblind", name2)
		return PLUGIN_HANDLED
	}
	switch(get_pcvar_num(amx_show_activity))
	{


	}
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)
	return PLUGIN_HANDLED
}

public Event_ScreenFade(id) 
{
	if(g_bBlind[id])
	{
		Fade_To_Black(id)
	}
}

Fade_To_Black(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<0)|(1<<2))
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	message_end()
}

Reset_Screen(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short(1<<2)
	write_short(0)
	write_short(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	message_end()
}


public hook_death(){
	
	new killer = read_data(1);


	new numeserver [64], numeadmin[32],  numeblindat[32], ipadmin[32], ipcodat [32], admini[33], inum, message[552]
	new fo_logfile[64],timp[64],maxtext[256]


	get_user_name(admin[killer], numeadmin, 31)
	get_user_name(killer, numeblindat, 31)
	get_user_ip(admin[killer], ipadmin, 31, 1)
	get_user_ip(killer, ipcodat, 31, 1)
	get_cvar_string("hostname",numeserver,63); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)



	if(g_bBlind[killer])
	{

	IncarcareServer()
	ScriereServer()	

	format(message,551,"FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat.^nSperam ca te-ai lecuit.^nXtremePLAY",SalvareServer)

    	format(maxtext, 255, "[XP] %s -> ADMIN: %s %s  CODAT: %s  %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat)
    	format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile)


	for (new i = 0; i < inum; ++i) {
    		if ( access(admini,ADMIN_CHAT) )
      		client_print(admini,print_chat,"XP: Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer])
  	}

    write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)
    show_hudmessage(0, message)

  	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")


	client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza)
	client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
	client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	client_print(killer, print_chat, "* Data : %s",timp) 
	client_print(killer, print_chat, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(killer, "* FRAG DUPA BLIND by %s", poza)
	console_print(killer, "* Poza facuta pe : %s",numeserver) 
	console_print(killer, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(killer, "* Data : %s",timp) 
	console_print(killer, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza)
	console_print(admin[killer], "* Poza facuta pe : %s",numeserver) 
	console_print(admin[killer], "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(admin[killer], "* Data : %s",timp) 
	console_print(admin[killer], "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 

	client_cmd(admin[killer],"wait;snapshot")

	client_cmd( admin[killer], "amx_destroy ^"%s^"", numeblindat );
}
}  
stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
    	read_file(FisierServer,0,TextServer,LimbaServer,r)
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		read_file(FisierServer,0,TextServer,LimbaServer,t)
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}

Si nu vreau sa apara mesajul asta
| Afiseaza codul
format(message,551,"FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat.^nSperam ca te-ai lecuit.^nXtremePLAY",SalvareServer)


Multumesc.
Image
http://csmaster.biz MasterServer Romanesc Free Add
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

12 Aug 2014, 01:19

| Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta_util> 
#include <fun>
#include <engine>



new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

#define CMDTARGET_BLIND	(CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS)

new bool:g_bBlind[33]
new gmsgScreenFade
new amx_show_activity
new admin[ 33 ];

static const poza[] = "www.xtremeplay.ro" 

public plugin_init()
{
register_plugin("Advanced blind", "1.0", "xTeamCs Team")
	
gmsgScreenFade = get_user_msgid("ScreenFade") 
register_event("ScreenFade", "Event_ScreenFade", "b")
register_event("DeathMsg","hook_death","a");

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "- >nume sau #userid< -") 
register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "- >nume sau #userid< -")
if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) )
{
amx_show_activity = register_cvar("amx_show_activity","0")
	}
}

public client_putinserver( id )
{
	g_bBlind[id] = false
}

public amx_blind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND)
	if(!user) 
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31)
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)
  	admin[ user ] = id;
	if(g_bBlind[user])
	
	{
		console_print(id, "Jucatorul ^"%s^" are deja blind", name2)
		return PLUGIN_HANDLED
	}
	else
	{
		g_bBlind[user] = true

		Fade_To_Black(user)
	}
	
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

	return PLUGIN_HANDLED 
}

public amx_unblind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
	
	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND) 
	if(!user)
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31) 
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)

	if(g_bBlind[user])
	{
		g_bBlind[user] = false

		Reset_Screen(user)
	}
	else
	{
		console_print(id, "Client ^"%s^" is already unblind", name2)
		return PLUGIN_HANDLED
	}
	switch(get_pcvar_num(amx_show_activity))
	{


	}
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)
	return PLUGIN_HANDLED
}

public Event_ScreenFade(id) 
{
	if(g_bBlind[id])
	{
		Fade_To_Black(id)
	}
}

Fade_To_Black(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<0)|(1<<2))
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	message_end()
}

Reset_Screen(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short(1<<2)
	write_short(0)
	write_short(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	message_end()
}


public hook_death(){
	
	new killer = read_data(1);


	new numeserver [64], numeadmin[32],  numeblindat[32], ipadmin[32], ipcodat [32], admini[33], inum, message[552]
	new fo_logfile[64],timp[64],maxtext[256]


	get_user_name(admin[killer], numeadmin, 31)
	get_user_name(killer, numeblindat, 31)
	get_user_ip(admin[killer], ipadmin, 31, 1)
	get_user_ip(killer, ipcodat, 31, 1)
	get_cvar_string("hostname",numeserver,63); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)



	if(g_bBlind[killer])
	{

	IncarcareServer()
	ScriereServer()	

	format(message,551,"FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat.^nSperam ca te-ai lecuit.^nXtremePLAY",SalvareServer)

    	format(maxtext, 255, "[XP] %s -> ADMIN: %s %s  CODAT: %s  %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat)
    	format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile)


	for (new i = 0; i < inum; ++i) {
    		if ( access(admini,ADMIN_CHAT) )
      		client_print(admini,print_chat,"XP: Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer])
  	}

    write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)
    show_hudmessage(0, message)

  	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")


	client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza)
	client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
	client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	client_print(killer, print_chat, "* Data : %s",timp) 
	client_print(killer, print_chat, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(killer, "* FRAG DUPA BLIND by %s", poza)
	console_print(killer, "* Poza facuta pe : %s",numeserver) 
	console_print(killer, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(killer, "* Data : %s",timp) 
	console_print(killer, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza)
	console_print(admin[killer], "* Poza facuta pe : %s",numeserver) 
	console_print(admin[killer], "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(admin[killer], "* Data : %s",timp) 
	console_print(admin[killer], "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 

	client_cmd(admin[killer],"wait;snapshot")

	client_cmd( admin[killer], "amx_pika ^"%s^"", numeblindat );
}
}  
stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
    	read_file(FisierServer,0,TextServer,LimbaServer,r)
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		read_file(FisierServer,0,TextServer,LimbaServer,t)
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}
i-a vezi
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

12 Aug 2014, 01:24

scosmynnnn wrote:
| Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta_util> 
#include <fun>
#include <engine>



new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

#define CMDTARGET_BLIND	(CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS)

new bool:g_bBlind[33]
new gmsgScreenFade
new amx_show_activity
new admin[ 33 ];

static const poza[] = "www.xtremeplay.ro" 

public plugin_init()
{
register_plugin("Advanced blind", "1.0", "xTeamCs Team")
	
gmsgScreenFade = get_user_msgid("ScreenFade") 
register_event("ScreenFade", "Event_ScreenFade", "b")
register_event("DeathMsg","hook_death","a");

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "- >nume sau #userid< -") 
register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "- >nume sau #userid< -")
if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) )
{
amx_show_activity = register_cvar("amx_show_activity","0")
	}
}

public client_putinserver( id )
{
	g_bBlind[id] = false
}

public amx_blind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND)
	if(!user) 
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31)
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)
  	admin[ user ] = id;
	if(g_bBlind[user])
	
	{
		console_print(id, "Jucatorul ^"%s^" are deja blind", name2)
		return PLUGIN_HANDLED
	}
	else
	{
		g_bBlind[user] = true

		Fade_To_Black(user)
	}
	
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

	return PLUGIN_HANDLED 
}

public amx_unblind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
	
	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND) 
	if(!user)
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31) 
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)

	if(g_bBlind[user])
	{
		g_bBlind[user] = false

		Reset_Screen(user)
	}
	else
	{
		console_print(id, "Client ^"%s^" is already unblind", name2)
		return PLUGIN_HANDLED
	}
	switch(get_pcvar_num(amx_show_activity))
	{


	}
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)
	return PLUGIN_HANDLED
}

public Event_ScreenFade(id) 
{
	if(g_bBlind[id])
	{
		Fade_To_Black(id)
	}
}

Fade_To_Black(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<0)|(1<<2))
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	message_end()
}

Reset_Screen(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short(1<<2)
	write_short(0)
	write_short(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	message_end()
}


public hook_death(){
	
	new killer = read_data(1);


	new numeserver [64], numeadmin[32],  numeblindat[32], ipadmin[32], ipcodat [32], admini[33], inum, message[552]
	new fo_logfile[64],timp[64],maxtext[256]


	get_user_name(admin[killer], numeadmin, 31)
	get_user_name(killer, numeblindat, 31)
	get_user_ip(admin[killer], ipadmin, 31, 1)
	get_user_ip(killer, ipcodat, 31, 1)
	get_cvar_string("hostname",numeserver,63); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)



	if(g_bBlind[killer])
	{

	IncarcareServer()
	ScriereServer()	

	format(message,551,"FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat.^nSperam ca te-ai lecuit.^nXtremePLAY",SalvareServer)

    	format(maxtext, 255, "[XP] %s -> ADMIN: %s %s  CODAT: %s  %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat)
    	format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile)


	for (new i = 0; i < inum; ++i) {
    		if ( access(admini,ADMIN_CHAT) )
      		client_print(admini,print_chat,"XP: Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer])
  	}

    write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)
    show_hudmessage(0, message)

  	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")


	client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza)
	client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
	client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	client_print(killer, print_chat, "* Data : %s",timp) 
	client_print(killer, print_chat, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(killer, "* FRAG DUPA BLIND by %s", poza)
	console_print(killer, "* Poza facuta pe : %s",numeserver) 
	console_print(killer, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(killer, "* Data : %s",timp) 
	console_print(killer, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza)
	console_print(admin[killer], "* Poza facuta pe : %s",numeserver) 
	console_print(admin[killer], "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(admin[killer], "* Data : %s",timp) 
	console_print(admin[killer], "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 

	client_cmd(admin[killer],"wait;snapshot")

	client_cmd( admin[killer], "amx_pika ^"%s^"", numeblindat );
}
}  
stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
    	read_file(FisierServer,0,TextServer,LimbaServer,r)
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		read_file(FisierServer,0,TextServer,LimbaServer,t)
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}
i-a vezi


Vad ca nu ai scos mesajul asta

| Afiseaza codul
FRAG DUPA BLIND^nRESPECTA SI VEI FI RESPECTAT.^nEsti al %i`lea nemernic turnat

Mil poti scoate tu ca daca il scot eu mie ca dupa imi da eroare la compilare
Image
http://csmaster.biz MasterServer Romanesc Free Add
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

12 Aug 2014, 01:31

| Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta_util> 
#include <fun>
#include <engine>



new DirectorServer[64],TextServer[32],LimbaServer = 31,r,t
new FisierServer[128]
new SalvareServer

#define CMDTARGET_BLIND	(CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ALLOW_SELF|CMDTARGET_NO_BOTS)

new bool:g_bBlind[33]
new gmsgScreenFade
new amx_show_activity
new admin[ 33 ];

static const poza[] = "www.xtremeplay.ro" 

public plugin_init()
{
register_plugin("Advanced blind", "1.0", "xTeamCs Team")
	
gmsgScreenFade = get_user_msgid("ScreenFade") 
register_event("ScreenFade", "Event_ScreenFade", "b")
register_event("DeathMsg","hook_death","a");

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "- >nume sau #userid< -") 
register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "- >nume sau #userid< -")
if( !(amx_show_activity = get_cvar_pointer("amx_show_activity")) )
{
amx_show_activity = register_cvar("amx_show_activity","0")
	}
}

public client_putinserver( id )
{
	g_bBlind[id] = false
}

public amx_blind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND)
	if(!user) 
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31)
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)
  	admin[ user ] = id;
	if(g_bBlind[user])
	
	{
		console_print(id, "Jucatorul ^"%s^" are deja blind", name2)
		return PLUGIN_HANDLED
	}
	else
	{
		g_bBlind[user] = true

		Fade_To_Black(user)
	}
	
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit blind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit blind", name2)

	return PLUGIN_HANDLED 
}

public amx_unblind(id, level, cid)
{ 
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
	
	new arg[32] 
	read_argv(1, arg, 31) 
	new user = cmd_target(id, arg, CMDTARGET_BLIND) 
	if(!user)
		return PLUGIN_HANDLED

	new name2[32], name[32], ip[32]

	get_user_name(id, name, 31) 
	get_user_name(user, name2, 31)
	get_user_ip(user, ip, 31, 1)

	if(g_bBlind[user])
	{
		g_bBlind[user] = false

		Reset_Screen(user)
	}
	else
	{
		console_print(id, "Client ^"%s^" is already unblind", name2)
		return PLUGIN_HANDLED
	}
	switch(get_pcvar_num(amx_show_activity))
	{


	}
	console_print(id, "Jucatorul ^"%s^" cu ip: ^"%s^" a primit unblind", name2, ip) 
	client_cmd(id,"amx_chat ^"%s^" a primit unblind", name2)
	return PLUGIN_HANDLED
}

public Event_ScreenFade(id) 
{
	if(g_bBlind[id])
	{
		Fade_To_Black(id)
	}
}

Fade_To_Black(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<3)|(1<<8)|(1<<10))
	write_short((1<<0)|(1<<2))
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	message_end()
}

Reset_Screen(id)
{
	message_begin(MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id)
	write_short(1<<2)
	write_short(0)
	write_short(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	write_byte(0)
	message_end()
}


public hook_death(){
	
	new killer = read_data(1);


	new numeserver [64], numeadmin[32],  numeblindat[32], ipadmin[32], ipcodat [32], admini[33], inum, message[552]
	new fo_logfile[64],timp[64],maxtext[256]


	get_user_name(admin[killer], numeadmin, 31)
	get_user_name(killer, numeblindat, 31)
	get_user_ip(admin[killer], ipadmin, 31, 1)
	get_user_ip(killer, ipcodat, 31, 1)
	get_cvar_string("hostname",numeserver,63); 
	get_configsdir(fo_logfile, 63)
	get_time("%m/%d/%Y - %H:%M:%S",timp,63)



	if(g_bBlind[killer])
	{

	IncarcareServer()
	ScriereServer()	

    	format(maxtext, 255, "[XP] %s -> ADMIN: %s %s  CODAT: %s  %s ",timp,numeadmin,ipadmin,numeblindat,ipcodat)
    	format(fo_logfile, 63, "%s/fragdupablind.txt", fo_logfile)


	for (new i = 0; i < inum; ++i) {
    		if ( access(admini,ADMIN_CHAT) )
      		client_print(admini,print_chat,"XP: Jucatorul %s a facut frag dupa blind-ul dat de %s",killer,admin[killer])
  	}

	write_file(fo_logfile,maxtext,-1)
	set_hudmessage(255,255,0,0.47,0.55,0,6.0,12.0,0.1,0.2,1)
	show_hudmessage(0, message)

  	client_cmd(0, "spk ^"vox/bizwarn coded user apprehend^"")


	client_print(killer, print_chat, "* FRAG DUPA BLIND by %s", poza)
	client_print(killer, print_chat, "* Poza facuta pe : %s",numeserver) 
	client_print(killer, print_chat, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	client_print(killer, print_chat, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	client_print(killer, print_chat, "* Data : %s",timp) 
	client_print(killer, print_chat, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(killer, "* FRAG DUPA BLIND by %s", poza)
	console_print(killer, "* Poza facuta pe : %s",numeserver) 
	console_print(killer, "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(killer, "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(killer, "* Data : %s",timp) 
	console_print(killer, "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 
	
	client_cmd(killer,"wait;snapshot")

	console_print(admin[killer], "* FRAG DUPA BLIND by %s", poza)
	console_print(admin[killer], "* Poza facuta pe : %s",numeserver) 
	console_print(admin[killer], "* Nume codat:  ^"%s^" cu IP: %s",numeblindat,ipcodat) 
	console_print(admin[killer], "* Nume admin: ^"%s^" cu IP: %s",numeadmin,ipadmin)
	console_print(admin[killer], "* Data : %s",timp) 
	console_print(admin[killer], "* Viziteaza %s pentru a face o cerere de UNBAN.", poza) 

	client_cmd(admin[killer],"wait;snapshot")

	client_cmd( admin[killer], "amx_pika ^"%s^"", numeblindat );
}
}  
stock IncarcareServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
    	read_file(FisierServer,0,TextServer,LimbaServer,r)
		SalvareServer = str_to_num(TextServer)
	}
	return PLUGIN_CONTINUE
}
stock ScriereServer(){
	get_configsdir(DirectorServer, 63)
	format(FisierServer,127,"%s/fragdupablind.q",DirectorServer)
	if (!file_exists(FisierServer)){
		return PLUGIN_HANDLED
	}
	else {
		read_file(FisierServer,0,TextServer,LimbaServer,t)
		SalvareServer = str_to_num(TextServer)
		SalvareServer = SalvareServer + 1
		format(TextServer,31,"%i",SalvareServer)
		delete_file(FisierServer)
		write_file(FisierServer,TextServer,-1)
	}
	return PLUGIN_CONTINUE
}
User avatar
ionutalexandru
Membru, skill +1
Membru, skill +1
Posts: 440
Joined: 10 Jul 2014, 13:43
Detinator Steam: Da
CS Status: Counter Strike 1.6
Detinator server CS: Furien.LaLeagane.Ro
SteamID: BBcode
Fond eXtream: 0
Location: Craiova, Romania
Has thanked: 15 times
Been thanked: 1 time
Contact:

12 Aug 2014, 01:37

Maine o sa te anunt daca merge.
Multumesc si o noapte placuta.
Image
http://csmaster.biz MasterServer Romanesc Free Add
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests