Quote:
Originally Posted by NiHiLaNTh
Yes. But you forgot to check in Reload method whether player has spas12.
|
Thank you ^^.
I fixed that problem but now I tried to change weapon speed but the Reload Animation is loop 2-3 times in 1 bullet load and it only stop at 8 ammo (maxium of normal weapon) but not 9 as I set it If I use this:
PHP Code:
public Event_CurWeapon(id)
{
if(!is_player(id, 1))
return
static CSWID; CSWID = read_data(2)
if((CSWID == CSW_SPAS12 && g_OldWeapon[id] == CSW_SPAS12) && Get_BitVar(g_Had_Spas12, id))
{
static Ent; Ent = fm_get_user_weapon_entity(id, CSW_SPAS12)
if(!pev_valid(Ent)) return
set_pdata_float(Ent, 46, SPEED, 4)
set_pdata_float(Ent, 47, SPEED, 4)
}
g_OldWeapon[id] = CSWID
}
This one is work but on the server, the reload animation didn't work at all and if I hold attack button, the next attack time seem to be increase each bullet shoot
PHP Code:
public Event_CurWeapon(id)
{
if(!is_player(id, 1))
return
static CSWID; CSWID = read_data(2)
if((CSWID == CSW_SPAS12 && g_OldWeapon[id] == CSW_SPAS12) && Get_BitVar(g_Had_Spas12, id))
{
static Ent; Ent = fm_get_user_weapon_entity(id, CSW_SPAS12)
if(!pev_valid(Ent)) return
set_pdata_float(Ent, 46, get_pdata_float(Ent, 46, 4) * SPEED, 4)
set_pdata_float(Ent, 47, get_pdata_float(Ent, 46, 4) * SPEED, 4)
}
g_OldWeapon[id] = CSWID
}
SOLVED: Set attack speed at Ham_Weapon_PrimaryAttack Post
__________________