14/09/2022, 08:51 AM
Hola a todos Como están tengo una dudas sobre este plugin, cual trata de Glow para admin y otro para adrenalina para los admins
1- el Glow alguien me explicaria como hacerle para que dure todo el mapa.
2-La adrenalina para admin, lo intente porner por flag copilo bien pero tira algunos warnig y quisiera saber
si se puede quitar el chat que salta cuando te da para que la gente no vea.
PD: Ninguno de los plugins son mios.
1- el Glow alguien me explicaria como hacerle para que dure todo el mapa.
2-La adrenalina para admin, lo intente porner por flag copilo bien pero tira algunos warnig y quisiera saber
si se puede quitar el chat que salta cuando te da para que la gente no vea.
PD: Ninguno de los plugins son mios.
Código PHP:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx>
#include <amxmisc>
#include <jctf>
#include <hamsandwich>
#include <cstrike>
#define ACCESS_FLAG ADMIN_KICK //LA LETRA M
new const Plugin_Info[][] = { "Adrenalina y Dinero", "1.0", "Reynolds", "^4[^1CTF^4]^1", "[CTF]" };
public plugin_init()
{
register_plugin(Plugin_Info[0], Plugin_Info[1], Plugin_Info[2])
RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 )
}
public fw_PlayerSpawn( id )
{
if(!(get_user_flags(id) & ADMIN_KICK)) return PLUGIN_HANDLED;
return HAM_IGNORED;
cs_set_user_money( id, 16000, false )
jctf_add_adrenaline(id, 100)
client_print_color(id, print_team_default, "%s Recibes^4 16000$ ^1y^3 100 Adrenaline ^1por ser admin.", Plugin_Info[3])
return HAM_IGNORED;
}
Código PHP:
#include <amxmodx>
#include <fun>
new const PLUGIN_NAME[] = "Menu de Glow";
new const PLUGIN_VERSION[] = "0.1";
new const PLUGIN_AUTHOR[] = "Ayuwoki";
enum _:COLORES
{
NAME[32],
R,
G,
B
};
new const g_szItemMenuSound[ ] = "Ui/buttonclickrelease.wav";
new const glow [][COLORES] =
{
{ "Rojo", 255, 0, 0 },
{ "Anaranjado", 255, 140, 0 },
{ "Verde", 0, 255, 0 },
{ "Blanco", 255, 255, 255 },
{ "Amarillo", 255, 255, 0 },
{ "Azul", 0, 0, 255 },
{ "Fucsia", 217, 0, 217 },
{ "Celeste", 0, 255, 255 },
{ "Remover", 0, 0, 0 }
}
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_clcmd("radio3", "VerificarPack");
}
public menu_color_hud(id)
{
if(!(get_user_flags(id) & ADMIN_KICK)) return PLUGIN_HANDLED;
static color[50];
new menu = menu_create(" Menu Glow .", "show_hud");
for (new i = 0; i < sizeof glow; i++)
{
if(i == 8) {
formatex(color, charsmax(color), "%s ^n", glow[i][NAME]);
menu_additem(menu, color);
} else {
formatex(color, charsmax(color), "%s", glow[i][NAME]);
menu_additem(menu, color);
}
}
menu_additem(menu, "Salir")
menu_setprop(menu, MPROP_PERPAGE, 0);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public ShowInfo(id)
{
new menu = menu_create ("\d** \r[] \wGlow \d**", "INFO");
menu_additem (menu, "\d** \rContacto: \d**" );
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public INFO(id, menu, item)
{
menu_destroy(menu)
return PLUGIN_HANDLED;
}
public show_hud(id, menu, item)
{
if (item == 9)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
if(!(get_user_flags(id) & ADMIN_KICK)) return PLUGIN_HANDLED;
new r = glow[item][R];
new g = glow[item][G];
new b = glow[item][B];
set_user_rendering(id, kRenderFxGlowShell, r, g, b, kRenderNormal, 20);
set_hudmessage(r, g, b, -1.0, 0.35, 1, 6.0, 5.0);
show_hudmessage(id, " Te has puesto el Glow: %s", glow[item][NAME])
client_cmd(id, "spk ^"%s^"", g_szItemMenuSound)
return PLUGIN_HANDLED;
}
public VerificarPack(id)
{
static userflags
userflags = get_user_flags(id)
if (userflags & ADMIN_KICK)
{
menu_color_hud(id) // ESTE ES EL NOMBRE DEL MENU DE ARMAS
}
else
{
ShowInfo(id) // ESTE ES EL NOMBRE DEL MENU DE INFO!
}
return PLUGIN_HANDLED
}