15/03/2019, 04:50 PM
(Última modificación: 15/03/2019, 08:03 PM por Reverant. Edited 4 times in total.)
Hola, como lo adapto a mi zp?
Creo que extraje lo que preciso para crear el menu, se que falta la velocidad, y la disminución de daño, pero estoy mas impulsado a las armas..
Código PHP:
/*---------------plugin_init-----------------*/
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_awp", "fw_Weapon_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_mp5navy", "fw_Weapon_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_ak47", "fw_Weapon_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_m4a1", "fw_Weapon_PrimaryAttack_Post", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_deagle", "fw_Weapon_PrimaryAttack_Post", 1)
/*----------------------*/
public fw_Weapon_PrimaryAttack_Post(weapon)
{
if (!pev_valid(weapon)) return HAM_IGNORED
static id; id = pev(weapon, pev_owner)
if (g_round_mod != MODO_CARNAGE || !g_mejoras_gr[id][1] && !g_mejoras_gr[id][3])
return HAM_IGNORED
static Float:push[3]
/*****************
* HABILIDAD RECOIL
******************/
if (g_mejoras_gr[id][1]) pev(id, pev_punchangle, push)
switch (g_mejoras_gr[id][1])
{
case 1: push[0] += -(push[0] * 20 / 100)
case 2: push[0] += -(push[0] * 35 / 100)
case 3: push[0] += -(push[0] * 50 / 100)
case 4: push[0] += -(push[0] * 70 / 100)
case 5: push[0] += -(push[0] * 90 / 100)
}
if (g_mejoras_gr[id][1]) set_pev(id, pev_punchangle, push)
/****************************
* HABILIDAD VELOCIDAD DISPARO
*****************************/
if (get_user_weapon(id) == CSW_MP5NAVY || get_user_weapon(id) == CSW_AWP)
{
switch (g_mejoras_gr[id][3])
{
case 1:
{
set_pdata_float(weapon, 46, get_pdata_float(weapon, 46, 4) - (get_pdata_float(weapon, 46, 4) * 7 / 100), 4)
set_pdata_float(weapon, 47, get_pdata_float(weapon, 47, 4) - (get_pdata_float(weapon, 47, 4) * 7 / 100), 4)
set_pdata_float(weapon, 48, get_pdata_float(weapon, 48, 4) - (get_pdata_float(weapon, 48, 4) * 7 / 100), 4)
}
case 2:
{
set_pdata_float(weapon, 46, get_pdata_float(weapon, 46, 4) - (get_pdata_float(weapon, 46, 4) * 13 / 100), 4)
set_pdata_float(weapon, 47, get_pdata_float(weapon, 47, 4) - (get_pdata_float(weapon, 47, 4) * 13 / 100), 4)
set_pdata_float(weapon, 48, get_pdata_float(weapon, 48, 4) - (get_pdata_float(weapon, 48, 4) * 13 / 100), 4)
}
case 3:
{
set_pdata_float(weapon, 46, get_pdata_float(weapon, 46, 4) - (get_pdata_float(weapon, 46, 4) * 20 / 100), 4)
set_pdata_float(weapon, 47, get_pdata_float(weapon, 47, 4) - (get_pdata_float(weapon, 47, 4) * 20 / 100), 4)
set_pdata_float(weapon, 48, get_pdata_float(weapon, 48, 4) - (get_pdata_float(weapon, 48, 4) * 20 / 100), 4)
}
case 4:
{
set_pdata_float(weapon, 46, get_pdata_float(weapon, 46, 4) - (get_pdata_float(weapon, 46, 4) * 24 / 100), 4)
set_pdata_float(weapon, 47, get_pdata_float(weapon, 47, 4) - (get_pdata_float(weapon, 47, 4) * 24 / 100), 4)
set_pdata_float(weapon, 48, get_pdata_float(weapon, 48, 4) - (get_pdata_float(weapon, 48, 4) * 24 / 100), 4)
}
case 5:
{
set_pdata_float(weapon, 46, get_pdata_float(weapon, 46, 4) - (get_pdata_float(weapon, 46, 4) * 30 / 100), 4)
set_pdata_float(weapon, 47, get_pdata_float(weapon, 47, 4) - (get_pdata_float(weapon, 47, 4) * 30 / 100), 4)
set_pdata_float(weapon, 48, get_pdata_float(weapon, 48, 4) - (get_pdata_float(weapon, 48, 4) * 30 / 100), 4)
}
}
}
return HAM_IGNORED
}
Creo que extraje lo que preciso para crear el menu, se que falta la velocidad, y la disminución de daño, pero estoy mas impulsado a las armas..