hi, i was making one class for my server but when i go to test it, the cass appear but the weapons explotion no :/
Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <engine>
#include <fakemeta>
#include <CodMod>
#include <sockets>
#include <CStrike>
#include <ColorChat>
#include <fun>
#define VERSION "1.0"
#define AUTHOR "Porta0123"
new const nazwaH[] = "Balas explosiva[PREMIUM]"; //nombre
new const opisH[] = "Tus balas explotan(1/5)"; //descripcción
new const bronieH = 1<<CSW_M4A1
new const zdrowieH = 20; //vida
new const kondycjaH = 10; //condición
new const inteligencjaH = 10; //inteligencia
new const wytrzymaloscH = 10; //fuerza
new sprite_explode
new bool:ma_explosive[33] = false
public plugin_precache()
{
sprite_explode = precache_model("sprites/zerogxplode.spr")
}
public plugin_init() {
register_plugin(nazwaH, VERSION, AUTHOR)
cod_register_class(nazwaH, opisH, bronieH, zdrowieH, kondycjaH, inteligencjaH, wytrzymaloscH)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_m4a1", "fw_primer_atake", 1)
}
public cod_class_enabled(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
ma_explosive[id] = true
client_print_color(id, BLUE, "%s by Porta0123",nazwaH)
}
else
{
ma_explosive[id] = false
client_print_color(id,RED, "no puedes usar esta clase")
}
}
public fw_primer_atake(atack)
{
if(is_user_connected(atack) && ma_explosive[atack] == true)
{
new origin_nuevo[3]
get_user_origin(atack, origin_nuevo, 3)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, origin_nuevo)
write_byte(TE_EXPLOSION)
write_coord(origin_nuevo [0])
write_coord(origin_nuevo [1])
write_coord(origin_nuevo [2])
write_short(sprite_explode)
write_byte(90)
write_byte(0)
write_byte(0)
message_end()
}
}
i search in my server /logs/ but i cant found it and in server console too...