Pagina de start a forumului p3tyt.myforum.ro p3tyt.myforum.ro
p3tyt.myforum.ro
 
 FAQFAQ   CautareCautare   MembriMembri   GrupuriGrupuri   InregistrareInregistrare 
 ProfilProfil   Mesaje privateMesaje private   AutentificareAutentificare 

amx_blind

 
Creaza un subiect nou   Raspunde la subiect    Pagina de start a forumului p3tyt.myforum.ro -> Pluginuri
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
p3tyt
Owner
Owner
p3tyt

Data inscrierii: 26/Oct/2007
Mesaje: 240
Localitate: Constanta:X:X:X

MesajTrimis: 11/11/2007 14:53    Titlul subiectului: amx_blind Raspunde cu citat (quote)

e o comanda , plugin amx_blind ca sa iti dai seama cine e codat sau nu ... daca esti curat nu vezi nimic (negru) iar daca esti codat vezi normal si iti dai seama ca are cod am cautat am cautat si io putin pe google..si uite ca am gasit pluginu numai ca trebuia putin modificat si compilat...probabil ca voua va fost lene
Cod:
#include <amxmod>
#include <amxmisc>

#define BLIND  (1<<0)

new PlayerFlags[33]
new gmsgFade

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, 7)
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)
{
 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(0) // fade red 
 write_byte(0) // fade green 
 write_byte(0) // fade blue   
 write_byte(255) // fade alpha   
 message_end()
}
switch(get_cvar_num("amx_show_activity"))
{
 case 2:   client_print(0, 3, "ADMIN %s: blinded %s", name, name2)
 case 1:   client_print(0, 3, "ADMIN: blinded %s", name2)
}
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
 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(0) // fade red 
 write_byte(0) // fade green 
 write_byte(0) // fade blue   
 write_byte(255) // fade alpha   
 message_end()
}
else
{
 console_print(id, "Client ^"%s^" is already unblind", name2)
 return PLUGIN_HANDLED
}
switch(get_cvar_num("amx_show_activity"))
{
 case 2:   client_print(0, 3, "ADMIN %s: unblinded %s", name, name2)
 case 1:   client_print(0, 3, "ADMIN: unblinded %s", name2)
}
console_print(id, "Client ^"%s^" unblinded", name2)
return PLUGIN_HANDLED
}

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)
{
 // 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(0) // fade red
 write_byte(0) // fade green
 write_byte(0) // fade blue 
 write_byte(255) // fade alpha 
 message_end()
}
return PLUGIN_CONTINUE
}

public plugin_init()
{
register_plugin("AMX Blind","v1.0","T(+)rget")

gmsgFade = get_user_msgid("ScreenFade")
register_event("ScreenFade", "screen_fade", "b")

register_concmd("amx_blind","amx_blind", ADMIN_KICK, "<authid>")
register_concmd("amx_unblind","amx_unblind", ADMIN_KICK, "<authid>")
register_cvar("amx_show_activity","2")

return PLUGIN_CONTINUE
}

vi l`am dat asa direct modificat doar ca trebe sa`l compilati...have fun
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Creaza un subiect nou   Raspunde la subiect    Pagina de start a forumului p3tyt.myforum.ro -> Pluginuri Ora este GMT + 3 ore
Pagina 1 din 1

 
Mergi direct la:  
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum


Powered by phpBB © 2001, 2002 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro