Plugin :
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <message_const>
#define have_acces(%1) (get_user_flags(%1) & ADMIN_SLAY)
new const
PLUGIN_NAME[] = "Eksplodimi",
AUTHOR_NAME[] = "GhosT***";
static VERSION[] = "0.2";
new PLUGIN_ON;
new explode_sprite;
public plugin_init()
{
register_concmd("amx_eksplodo", "komanda_eksplodimit", ADMIN_SLAY, "<target> - Explode target");
PLUGIN_ON = register_cvar("explode_on", "1");
}
public plugin_precache()
{
register_plugin(PLUGIN_NAME, VERSION, AUTHOR_NAME);
explode_sprite = precache_model("sprites/eksplodimi.spr");
}
public komanda_eksplodimit(index)
{
if(get_pcvar_num(PLUGIN_ON) >= 1)
{
if(have_acces(index))
{
new szArgv[32];
read_argv(1, szArgv, sizeof(szArgv) - 1);
if(equal(szArgv, ""))
{
console_print(index, "amx_eksplodo <target>");
return true;
}
new iTarget = cmd_target(index, szArgv);
if(!iTarget)
return true;
new Admin_Name[32];
get_user_name(index, Admin_Name, sizeof(Admin_Name) - 1);
new Target_Name[32];
get_user_name(iTarget, Target_Name, sizeof(Target_Name) - 1);
new all = 0;
if(is_user_alive(iTarget))
{
user_kill(iTarget);
explode_effects(iTarget);
ColorChat(all, RED, "^x03ADMINI: ^x04%s ^x01perdori komanden e eksplodimit sepse ^x04%s ^x01nuk respektoj rregullat", Admin_Name, Target_Name);
set_hudmessage(200, 25, 123, -1.0, -1.0);
show_hudmessage(all, "%s shpertheu ne stilin kamasutra !!", Target_Name);
}
else
{
console_print(index, "%s ka vdekur !", Target_Name);
return true;
}
return false;
}
else
{
console_print(index, "Na vjen keq s'mundesh me perdor kete komand sepse s'keni akces !");
return true;
}
}
else
{
console_print(index, "Plugini eshte jo aktiv !");
return true;
}
return false;
}
stock explode_effects(iTarget)
{
new orginn[3];
get_user_origin(iTarget, orginn);
message_begin(MSG_ALL, SVC_TEMPENTITY);
write_byte(TE_EXPLOSION);
write_coord(orginn[0]);
write_coord(orginn[1]);
write_coord(orginn[2]);
write_short(explode_sprite);
write_byte(30);
write_byte(10);
write_byte(2);
write_byte(50);
write_byte(10);
message_end( );
}