Post by ShaunCraft15 on May 3, 2022 9:34:04 GMT
Hello i have a problem at this plugin i made it but i need to add this natives: zp_class_zombie_register, zp_class_zombie_register_kb, zp_class_zombie_register_claw.....etc plz do
something
something
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <zombie_plague_special>
#include <zp50_class_zombie>
#define PLUGIN "[ZPSP ADDON] ZP50 Subplugins Compatibility (Alpha)"
#define VERSION "0.1"
#define AUTHOR "ShaunCraft"
#define LIBRARY_CORE "zp50_core"
#define LIBRARY_NEMESIS "zp50_class_nemesis"
#define LIBRARY_SURVIVOR "zp50_class_survivor"
#define LIBRARY_GFIRE "zp50_grenade_fire"
#define LIBRARY_GFROST "zp50_grenade_frost"
enum _:TOTAL_FORWARDS
{
FW_GAMEMODES_START = 0,
FW_GAMEMODES_END,
FW_GAMEMODES_CHOOSE_PRE,
FW_GAMEMODES_CHOOSE_POST,
FW_CORE_INFECT_PRE,
FW_CORE_INFECT,
FW_CORE_INFECT_POST,
FW_CORE_CURE_PRE,
FW_CORE_CURE,
FW_CORE_CURE_POST,
FW_ITEMS_SELECT_PRE,
FW_ITEMS_SELECT_POST,
FW_USER_UNFROZEN,
FW_USER_LAST_ZOMBIE,
FW_USER_LAST_HUMAN
}
new g_Forwards[TOTAL_FORWARDS]
new g_ForwardResult
new Array:g_ZombieClassHealth
new g_ClawModels[33], g_KnockBack[33], g_Model[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_cfg()
{
ArrayPushCell(g_ZombieClassHealth, 1800)
}
public plugin_natives()
{
// Library Registerations
register_library(LIBRARY_CORE)
register_library(LIBRARY_NEMESIS)
register_library(LIBRARY_SURVIVOR)
register_library(LIBRARY_GFIRE)
register_library(LIBRARY_GFROST)
if(LibraryExists(LIBRARY_CORE, LibType_Library))
{
register_native("zp_core_is_zombie", "native_is_zombie", 1)
register_native("zp_core_is_first_zombie", "native_is_first_zombie", 1)
register_native("zp_core_is_last_zombie", "native_is_last_zombie", 1)
register_native("zp_core_is_last_human", "native_is_last_human", 1)
register_native("zp_core_infect", "native_core_infect", 1)
register_native("zp_core_cure", "native_core_cure", 1)
register_native("zp_core_force_cure", "native_force_cure", 1)
register_native("zp_core_force_infect", "native_force_infect", 1)
register_native("zp_core_get_zombie_count", "native_core_zcount", 1)
register_native("zp_core_get_human_count", "native_core_hcount", 1)
}
else if(LibraryExists(LIBRARY_NEMESIS, LibType_Library))
{
register_native("zp_class_nemesis_get", "native_is_nemesis", 1)
register_native("zp_class_nemesis_set", "native_set_nemesis", 1)
register_native("zp_class_nemesis_get_count", "native_core_ncount", 1)
}
else if(LibraryExists(LIBRARY_SURVIVOR, LibType_Library))
{
register_native("zp_class_survivor_get", "native_is_survivor", 1)
register_native("zp_class_survivor_set", "native_set_survivor", 1)
register_native("zp_class_survivor_get_count", "native_core_scount", 1)
}
register_native("zp_class_zombie_get_current", "native_get_zcurrent", 1)
register_native("zp_class_zombie_get_next", "native_get_znext", 1)
register_native("zp_class_zombie_set_next", "native_set_znext", 1)
register_native("zp_ammopacks_get", "native_ap_get", 1)
register_native("zp_ammopacks_set", "native_ap_set", 1)
register_native("zp_class_zombie_get_max_health", "native_zclass_get_maxhp", 1)
register_native("zp_flashlight_get_charge", "native_flashlight_get_charge", 1)
register_native("zp_flashlight_set_charge", "native_flashlight_set_charge", 1)
register_native("zp_items_force_buy", "native_items_forcebuy", 1)
register_native("zp_items_get_id", "native_items_get_id", 1)
register_native("zp_class_zombie_get_id", "native_zclass_get_id", 1)
register_native("zp_items_register", "native_items_register", 1)
register_native("zp_grenade_fire_get", "native_grenade_fget", 1)
register_native("zp_grenade_fire_set", "native_grenade_fset", 1)
register_native("zp_grenade_frost_get", "native_grenade_frget", 1)
register_native("zp_grenade_frost_set", "native_grenade_frset", 1)
register_native("zp_class_zombie_register", "native_class_zombie_register", 1)
g_ZombieClassHealth = ArrayCreate(1, 1)
}
public zp_extra_item_selected(id, itemid)
{
ExecuteForward(g_Forwards[FW_ITEMS_SELECT_POST], g_ForwardResult, id, itemid)
}
public zp_extra_item_selected_pre(id, itemid)
{
ExecuteForward(g_Forwards[FW_ITEMS_SELECT_PRE], g_ForwardResult, id, itemid)
}
public zp_game_mode_selected(gameid, id)
{
ExecuteForward(g_Forwards[FW_GAMEMODES_CHOOSE_POST], g_ForwardResult, id, gameid)
}
public zp_round_started(gamemode, id)
{
ExecuteForward(g_Forwards[FW_GAMEMODES_START], g_ForwardResult, gamemode)
}
public zp_round_ended(winteam)
{
ExecuteForward(g_Forwards[FW_GAMEMODES_END], g_ForwardResult, winteam)
}
public native_is_zombie(id)
{
return zp_get_user_zombie(id)
}
public native_is_nemesis(id)
{
return zp_get_user_nemesis(id)
}
public native_is_survivor(id)
{
return zp_get_user_survivor(id)
}
public native_is_first_zombie(id)
{
return zp_get_user_first_zombie(id)
}
public native_is_last_zombie(id)
{
return zp_get_user_last_zombie(id)
}
public native_is_last_human(id)
{
return zp_get_user_last_human(id)
}
public native_get_zcurrent(id)
{
return zp_get_user_zombie_class(id)
}
public native_get_znext(id)
{
return zp_get_user_next_class(id)
}
public native_set_znext(id, classid)
{
return zp_set_user_zombie_class(id, classid)
}
public native_ap_get(id)
{
return zp_get_user_ammo_packs(id)
}
public native_ap_set(id, amount)
{
return zp_set_user_ammo_packs(id, amount)
}
public native_zclass_get_maxhp(id, classid)
{
return zp_get_zombie_maxhealth(ArrayGetCell(g_ZombieClassHealth, classid))
}
public native_flashlight_get_charge(id)
{
return zp_get_user_batteries(id)
}
public native_flashlight_set_charge(id, charge)
{
return zp_set_user_batteries(id, charge)
}
public native_core_infect(id, attacker)
{
return zp_infect_user(id, attacker);
}
public native_core_cure(id, attacker)
{
return zp_disinfect_user(id, attacker);
}
public native_force_cure(id)
{
return zp_disinfect_user(id)
}
public native_force_infect(id)
{
return zp_infect_user(id)
}
public native_set_nemesis(id)
{
return zp_make_user_nemesis(id)
}
public native_set_survivor(id)
{
return zp_make_user_survivor(id)
}
public native_items_forcebuy(id, itemid, ignorecost)
{
return zp_force_buy_extra_item(id, itemid, ignorecost)
}
public native_core_zcount()
{
return zp_get_zombie_count()
}
public native_core_hcount()
{
return zp_get_human_count()
}
public native_core_scount()
{
return zp_get_survivor_count()
}
public native_core_ncount()
{
return zp_get_nemesis_count()
}
public native_items_get_id(name[32])
{
get_string(1, name, charsmax(name))
return zp_get_extra_item_id(name);
}
public native_zclass_get_id(name[32])
{
get_string(1, name, charsmax(name))
return zp_get_zombie_class_id(name);
}
public native_items_register(name[32], cost)
{
return zp_register_extra_item(name, cost, ZP_TEAM_ANY)
}
public native_grenade_fget(id)
{
return zp_get_user_burn(id)
}
public native_grenade_fset(id, set)
{
return zp_set_user_burn(id, set)
}
public native_grenade_frget(id)
{
return zp_get_user_frozen(id)
}
public native_grenade_frset(id, set)
{
return zp_set_user_frozen(id, set)
}
public native_class_zombie_register(name[32], desc[32], hp, speed, gravity)
{
new index
return zp_register_zombie_class(name, desc, g_Model[index], g_ClawModels[index], hp, speed, gravity, g_KnockBack[index])
}