Créditos Allied Mod
O Tutorial está em Inglês
THIS IS A TUTORIAL FOR ZOMBIE PLAGUE 5.0:
1. Manage included files
PHP Code:
[font=monospace]
2. Make an item's id and register it in plugin_precache()
PHP Code:
3. If you want the item for only one team(human/survivor/nemesis/zombie) the make make a forward (more here):
PHP Code:
4. When i player was succesfully buyed a extra item
PHP Code:
Quote: Any way in zp50's forwards if you are blocking use "return;" value
----------------------------------------
equip items for other classes
If you want only for humans here:
PHP Code:
Or for zombies here:
PHP Code:
Or for nemesis here:
PHP Code:
Or for survivor here:
PHP Code:
O Tutorial está em Inglês
THIS IS A TUTORIAL FOR ZOMBIE PLAGUE 5.0:
1. Manage included files
PHP Code:
[font=monospace]
Código:
#include < amxmodx>
#include < zp50_core > // engine
#include < zp50_items > // extra items
#include < zp50_class_nemesis > // nemesis
#include < zp50_class_survivor > // survivor
2. Make an item's id and register it in plugin_precache()
PHP Code:
Código:
new g_item_id
public plugin_prechache()
{
g_item_id = zp_items_register("", ) // no more teams!
}
3. If you want the item for only one team(human/survivor/nemesis/zombie) the make make a forward (more here):
PHP Code:
Código:
public zp_fw_items_select_pre(id, itemid, ignorecost)
{
//check our item id
if (itemid == g_item_id)
{
// if you want it for only nemesis use this:
if (zp_core_is_zombie(id) && !zp_core_is_zombie(id) && zp_class_survivor_get(id))
{
// Return values
return ZP_ITEM_DONT_SHOW;
}
}
// here the main extra item's return value (if you want it to exist or not)
return ZP_ITEM_AVAILABLE;
}
4. When i player was succesfully buyed a extra item
PHP Code:
Código:
public zp_fw_items_select_post(id, itemid, ignorecost)
{
// check our extra item
if (itemid == g_item_id)
{
// do your command
}
// should always have a return value for sure
return ZP_ITEM_AVAILABLE;
}
[/font]
Quote: Any way in zp50's forwards if you are blocking use "return;" value
----------------------------------------
equip items for other classes
If you want only for humans here:
PHP Code:
Código:
if (zp_class_nemesis_get(id) || zp_core_is_zombie(id) || zp_class_survivor_get(id))
return ZP_ITEM_DONT_SHOW;
Or for zombies here:
PHP Code:
Código:
if (zp_class_nemesis_get(id) || !zp_core_is_zombie(id) || zp_class_survivor_get(id))
return ZP_ITEM_DONT_SHOW;
Or for nemesis here:
PHP Code:
Código:
if (zp_class_nemesis_get(id))
return ZP_ITEM_AVAILABLE; // Or something like this
if (!zp_core_is_zombie(id) || zp_core_is_zombie(id) || zp_class_survivor_get(id))
return ZP_ITEM_DONT_SHOW;
Or for survivor here:
PHP Code:
Código:
if (zp_class_survivor_get(id))
return ZP_ITEM_AVAILABLE; // Or something like this
if (zp_class_nemesis_get(id) || zp_core_is_zombie(id) || !zp_core_is_zombie(id))
return ZP_ITEM_DONT_SHOW;