03/02/2019, 02:29 PM
(Última modificación: 03/02/2019, 02:39 PM por Hypnotize. Edited 1 time in total.)
Buenas les dejo un plugin que NO es de mi auditoria ( es de Mario AR )
es un menú de hats que se guardan por setinfo si no mal recuerdo xd
pueden editarlo y toda esa madre de levels xd
PD; elijan otro guardado para dicho plugin solo es un ejemplo para que no busquen tutoriales de como crear hats
es un menú de hats que se guardan por setinfo si no mal recuerdo xd
pueden editarlo y toda esa madre de levels xd
Código PHP:
#include <amxmodx>
#include <engine>
#define PLUGIN "MM Hats"
#define VERSION "0.1"
new g_accesorio[33];
new g_cb_item_disabled;
new const info_nm[] = "_cgmm";
new const ent_cm[] = "hat_ent";
enum STRUCT_ACCESORIOS
{
nombre[64],
model[64],
acceso
};
// Acceso -1 = no requiere
new const ACCESORIOS[][STRUCT_ACCESORIOS] =
{
{ "skyrim", "models/ttt_hats/ttt_skyrim.mdl", -1 },
{ "subzero", "models/ttt_hats/ttt_subzero.mdl", -1 },
{ "superspace", "models/ttt_hats/ttt_superspace.mdl", -1 },
{ "anonymous", "models/ttt_hats/ttt_anonymous.mdl", ADMIN_BAN },
{ "beanie", "models/ttt_hats/ttt_beanie.mdl", ADMIN_BAN },
{ "harrypotter", "models/ttt_hats/ttt_harrypotter.mdl", -1 },
{ "headcrab", "models/ttt_hats/ttt_headcrab.mdl", -1 },
{ "maligno", "models/ttt_hats/ttt_maligno.mdl", -1 },
{ "mexicano", "models/ttt_hats/ttt_mexicano.mdl", ADMIN_BAN },
{ "samurai", "models/ttt_hats/ttt_samurai.mdl", -1 },//
{ "afro", "models/ttt_hats/afro.mdl", ADMIN_BAN },
{ "angel2", "models/ttt_hats/angel2.mdl", ADMIN_BAN },
{ "arrow", "models/ttt_hats/arrow.mdl", ADMIN_BAN },
{ "barril", "models/ttt_hats/barril.mdl", -1 },
{ "beerhat", "models/ttt_hats/beerhat.mdl", ADMIN_BAN },
{ "bighead", "models/ttt_hats/bighead.mdl", -1 },
{ "cheesehead", "models/ttt_hats/cheesehead.mdl", -1 }
};
public plugin_precache()
{
// Accesorios
for (new i = 0; i < sizeof(ACCESORIOS); i++)
precache_model(ACCESORIOS[i][model]);
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Mario AR.");
register_clcmd("say /hats", "show_menu_hats");
register_clcmd("say /accesorios", "show_menu_hats");
// Start hats
new ent;
for (new i = 1; i <= 32; i++)
{
ent = create_entity("info_target");
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FOLLOW);
entity_set_edict(ent, EV_ENT_owner, i);
entity_set_string(ent, EV_SZ_classname, ent_cm);
}
g_cb_item_disabled = menu_makecallback("cb_disabled");
}
public client_putinserver(id)
{
set_task(4.0, "auto_set", id);
}
public auto_set(id)
{
if (!is_user_connected(id) || g_accesorio[id])
{
return;
}
new info[33];
get_user_info(id, info_nm, info, charsmax(info));
new num, sznum[2];
for (num = 0; num < 2; num++)
{
sznum[num] = info[num];
}
num = str_to_num(sznum);
if (num)
{
if (get_user_flags(id) & ACCESORIOS[num-1][acceso])
{
g_accesorio[id] = num;
new ent = find_ent_by_owner(-1, ent_cm, id);
entity_set_model(ent, ACCESORIOS[num-1][model]);
entity_set_edict(ent, EV_ENT_aiment, id);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FOLLOW);
zp_colored_print(id, "^x04[ZP]^x01 Tu accesorio ha sido cargado (%c%s%c).", '^3', ACCESORIOS[num-1][nombre], '^1');
}
else
{
for (num = 0; num < 2; num++)
{
info[num] = 0;
}
set_user_info(id, info_nm, info);
client_cmd(id, "setinfo ^"%s^" ^"%s^"", info_nm, info);
}
}
}
public client_disconnect(id)
{
if (g_accesorio[id])
{
new ent = find_ent_by_owner(-1, ent_cm, id);
entity_set_model(ent, "");
entity_set_edict(ent, EV_ENT_aiment, 0);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE);
entity_set_origin(ent, Float:{8192.0,8192.0,8192.0});
g_accesorio[id] = 0;
}
}
public show_menu_hats(id)
{
new menutitle[90], flags;
new menu = menu_create("\r[ZP] \yAccesorios", "menu_hats");
flags = get_user_flags(id);
formatex(menutitle, charsmax(menutitle), "%sRemover%s accesorio", g_accesorio[id] ? "\r" : "\d", g_accesorio[id] ? "\w" : "\d");
menu_additem(menu, menutitle, .callback = g_accesorio[id] ? -1 : g_cb_item_disabled);
for (new i = 0; i < sizeof(ACCESORIOS); i++)
{
if (flags & ACCESORIOS[i][acceso])
{
formatex(menutitle, charsmax(menutitle), "\w%s%s", ACCESORIOS[i][nombre], g_accesorio[id] == i+1 ? "\y [Seleccionado]" : "");
menu_additem(menu, menutitle);
}
else
{
formatex(menutitle, charsmax(menutitle), "\y[Solo ADMIN]\d %s", ACCESORIOS[i][nombre]);
menu_additem(menu, menutitle, .callback = g_cb_item_disabled);
}
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_setprop(menu, MPROP_BACKNAME, "Anterior");
menu_setprop(menu, MPROP_NEXTNAME, "Siguiente");
menu_setprop(menu, MPROP_EXITNAME, "\ySalir");
menu_setprop(menu, MPROP_NUMBER_COLOR, "\r");
menu_display(id, menu, 0);
return PLUGIN_CONTINUE;
}
public cb_disabled(id, menu, key)
{
return ITEM_DISABLED;
}
public menu_hats(id, menu, key)
{
if(!is_user_connected(id) || !(0 <= key <= sizeof(ACCESORIOS)))
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
if(key == 0)
{
if (!g_accesorio[id]) zp_colored_print(id, "^x04[ZP]^x01 No llevas un accesorio.");
else
{
new ent = find_ent_by_owner(-1, ent_cm, id);
entity_set_model(ent, "");
entity_set_edict(ent, EV_ENT_aiment, 0);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_NONE);
entity_set_origin(ent, Float:{8192.0,8192.0,8192.0});
g_accesorio[id] = 0;
zp_colored_print(id, "^x04[ZP]^x01 Ahora no llevas un accesorio.");
new info[33];
get_user_info(id, info_nm, info, charsmax(info));
for (new i = 0; i < 2; i++)
{
info[i] = 0;
}
set_user_info(id, info_nm, info);
client_cmd(id, "setinfo ^"%s^" ^"%s^"", info_nm, info);
}
}
else
{
g_accesorio[id] = key;
new ent = find_ent_by_owner(-1, ent_cm, id);
entity_set_model(ent, ACCESORIOS[key-1][model]);
entity_set_edict(ent, EV_ENT_aiment, id);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FOLLOW);
new info[33];
get_user_info(id, info_nm, info, charsmax(info));
new sznum[3];
num_to_str(key, sznum, 2);
for (new i = 0; i < 2; i++)
{
info[i] = sznum[i];
}
set_user_info(id, info_nm, info);
client_cmd(id, "setinfo ^"%s^" ^"%s^"", info_nm, info);
zp_colored_print(id, "^x04[ZP]^x01 Ahora llevas un accesorio (%c%s%c).", '^3', ACCESORIOS[key-1][nombre], '^1');
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
stock zp_colored_print(id, const msg[], any:...)
{
static message[191];
vformat(message, 190, msg, 3);
static msgSayText;
if (!msgSayText)
msgSayText = get_user_msgid("SayText");
message_begin(id ? MSG_ONE : MSG_BROADCAST, msgSayText, _, id);
write_byte(33);
write_string(message);
message_end();
}
PD; elijan otro guardado para dicho plugin solo es un ejemplo para que no busquen tutoriales de como crear hats
(05/07/2018, 11:09 PM)meTaLiCroSS escribió: Esa es la diferencia, por eso no cualquier mandril puede programar->>
(24/09/2020, 11:10 PM)☆ LaZy escribió: Te comiste un parentesis e.e
Código PHP:while (g_damagedealt[attacker] >= (ammodamage / (g_happytime + 1)) && g_level[attacker] < MAX_NIVEL))
(04/05/2020, 01:26 PM)Ipolito escribió: Te ayudaria pero hablas en modo simio/uga uga y no entiendo nada de lo que decis
(16/05/2014, 08:22 AM)mongito100 escribió: Esto debería ir en tutoriales para q después un moderador/neeeeeel lo ponga en el tacho
(08/04/2020, 05:10 PM)asgasgasgasgasg escribió: bola de estupidos con retrasomental hijos de la gran puta por que putas ayudan a todo mundo y no a mi pedi un midnight dakness para zp y nadie me lo hizo malditos basuras bastardos tontos estupidos virgenes de mierda no van a conseguri nada tontos mierdaaaaaaaaaaaaaaaaaaaaaaaaaa
(26/07/2020, 12:37 AM)Hypnotize escribió:
(26/07/2020, 07:21 PM)Ricardo01 escribió: Que problema tenés conmigo LA CONCHA DE TU MADRE.... La re mil que te parió te crees porque tenés "47" de recuperación eres todo anda hacerte coger seguramente le pagaste a alguien para que te dé reputación porque eres una basura de persona... Jamás vi una persona tan basura eh ignorante como vos...
(26/07/2020, 08:12 PM)Ricardo01 escribió: SOS pelotuda o te haces me tenés en cosas que nada que ver.... Man no tenes vida? Que estás tan aldp2 que haces todo esto? Busca una novia oh anda a pajearte un rato. Debes ser un gordo con lente que tiene poster de anime de culo virgen de mierda..
(26/07/2020, 08:25 PM)Ricardo01 escribió: Y que tiene? Lo ví me gustó y lo puse aparte? Que problema tenés conmigo si yo no te hice nada.. yo tiro post no es obligación que me ayudes... Nose que carajo te pasa conmigo. De la nada me empezaste a bardear y etc. Si tenés problema con tu familia o tu vida. agarratela con ellos no con gente que no conoces..
(26/07/2020, 11:18 PM)Ricardo01 escribió: Buena te crees porque sabes programar se crees superior pelotudo de mierda. Yo voy a crear todas las cuentas que quieras la concha de tu madre gordo virgen. Anda a mirar porno de anime. Yo te voy a insultar todo lo que quiera pelotudo... Te crees superior y crees que tenés derecho a molestar a otras personas que ni conoces... Aparte que me importa si sabes programa nadie te pide ayuda acá. Son millones no eres el único..
Mis Aportes
Juegos Del Hambre + MySQL
[ZP] Addon Sistema de Códigos MySQL + APP
Admin Vencimiento MySQL + APP
RangosCSGO + MySQL + Skins
Sistema de Cuentas por GRIP
[ZP] Addon Sistema de Códigos SQL
Tienda por Natives
Rangos CSGO + Knifes
TutorCZ para CS16
Hats
[ZE] Experiencia al llegar a la meta
Granadas CSGO
Crear tablas SQL desde .ini
Tienda BaseBuilder
[ZP] Addon Sistema de Códigos MySQL Simple Comando
[ZA] Clases de Humano Por Reset
Comando por tiempo
[ GUÍA ] Modulo gRIP
[ GUÍA ] ZP Pipe Bomb
[ GUÍA ] ZP Bomba Aniquiladora
[PHP] Obtener datos del servidor
Juegos Del Hambre + MySQL
[ZP] Addon Sistema de Códigos MySQL + APP
Admin Vencimiento MySQL + APP
RangosCSGO + MySQL + Skins
Sistema de Cuentas por GRIP
[ZP] Addon Sistema de Códigos SQL
Tienda por Natives
Rangos CSGO + Knifes
TutorCZ para CS16
Hats
[ZE] Experiencia al llegar a la meta
Granadas CSGO
Crear tablas SQL desde .ini
Tienda BaseBuilder
[ZP] Addon Sistema de Códigos MySQL Simple Comando
[ZA] Clases de Humano Por Reset
Comando por tiempo
[ GUÍA ] Modulo gRIP
[ GUÍA ] ZP Pipe Bomb
[ GUÍA ] ZP Bomba Aniquiladora
[PHP] Obtener datos del servidor