AMXX-BG.INFO zm_vip.inc

zm_vip

************************************************************************** ZM VIP 2.0.0 inlcude file Author: aaarnas To make extra items, classes controlable by ZM VIP, add: #include <zm_vip> at the end of other #include's in plugin .sma file. Then compile plugin and add to server. You don't need to change anything. Just include this file to plugin and go on. Easy! **************************************************************************** Geek stuf: If you writing other plugins (not items or classes) or having problem with compability error, you can disable it (if you know what you are doing) by adding: #define ZM_VIP_DISABLE_AUTO_CONVERT at the top of plugin. For example, if you want to include <zm_vip> to extra item plugin and won't affect it to use with zombie VIP (left for main mod), add this define to the top of plugin and plugin will remains the same and you will be able to use all <zm_vip> natives and forwards. **************************************************************************

Constants

Name Description
ZV_DURATION_IGNORE = -1
ZV_DURATION_PERMANENT
ZV_DURATION_TILL_DISCONNECT = ~'t'
ZV_DURATION_TILL_MAP = ~('t'|'m')
AT_ALL
AT_MULTIJUMP = (1<<0)
AT_ARMOR = (1<<1)
AT_UNLIMITED_CLIP = (1<<2)
AT_NO_FALL_DMG = (1<<3)
AT_DAMAGE_REWARD = (1<<4)
AT_EXTRA_DMG = (1<<5)
AT_EXTRA_HP = (1<<6)
AT_EXTRA_GRAVITY = (1<<7)
AT_EXTRA_FRAGS = (1<<8)
AT_EXTRA_KILL_AMMO = (1<<9)
AT_EXTRA_ARMOR = (1<<10)
AT_EXTRA_INFECT_AMMO = (1<<11)
AT_EXTRA_INFECT_HEALTH = (1<<12)
AT_EXTRA_ITEMS = (1<<12)
AT_VIP_MODEL = (1<<14)
AT_VIP_CLASS = (1<<15)
AT_CHATTAG = (1<<16)
AT_VIPINSCORE = (1<<17)
AT_CUSTOM_S = (1<<18)
AT_CUSTOM_T = (1<<19)
AT_CUSTOM_U = (1<<20)
AT_CUSTOM_V = (1<<21)
AT_CUSTOM_W = (1<<22)
AT_CUSTOM_X = (1<<23)
AT_CUSTOM_Y = (1<<24)
AT_NONE = (1<<25)
zp_force_buy_extra_item = zv_force_buy_extra_item
zp_get_extra_item_id = zv_get_extra_item_id
zp_extra_item_selected = zv_extra_item_selected
zp_register_extra_item = zv_register_extra_item2
zp_register_zombie_class = zv_register_zombie_class
zp_items_register = zv_items_register
zp_class_zombie_register = zv_class_zombie_register
zp_class_human_register = zv_class_human_register

Functions

Name Description
zv_get_user_flags Returns having player VIP flags. If @return > 0 - player is VIP. @id - player id
zv_set_user_flags Set VIP flags for player. @id - player id, 0 - all players @duration - time (in seconds), how long player will have VIP. Can be used ZV_DURATION_ constants. @flags - flags, what attributes VIP player will have. All AT_ constants, or use AT_ALL for all attributes. If you want to just give a VIP status without any abbilities, use AT_NONE flag. Because VIP can't exist without any flags set, having only this dummy flag, player can remain in VIP status on the system. @return - [true - VIP created/updated succesfully, false - used ZV_DURATION_IGNORE for player, that doesn't have VIP or player is not connected to server] NOTE: if id = 0, always returns true. Examples: If you want to set a new VIP: //player will get VIP privilegies for 2 days and only multijump and armor abbilities zv_set_user_flags(id, 60*60*24*2, AT_MULTIJUMP|AT_ARMOR) //player will get VIP all VIP privilegies for 30 days (1 month) zv_set_user_flags(id, 60*60*24*30, AT_ALL) Update existing: //update current user flags (adde extra gravity). Privilegie duration remains the same. //NOTE: if zv_set_user_flags(id, ZV_DURATION_IGNORE... will be called on player, that don't have privilegies //function will return false and no action will be taken. You need to set duration for first time. zv_set_user_flags(id, ZV_DURATION_IGNORE, zv_get_user_flags(id)|AT_EXTRA_GRAVITY)
zv_remove_user_flags Remove player VIP privilegie @id - player id, 0 - all players @return - [true - success, false - player not connected or doesn't have privilegies] NOTE: if id = 0, always returns true.
zv_get_vips_num Get count of currently existing registered VIPs @return - VIP'S count;
zv_force_buy_extra_item
zv_get_extra_item_id
zv_register_extra_item
zv_register_extra_item2
zv_register_zombie_class
zv_items_register
zv_class_zombie_register
zv_class_human_register

Forwards

Name Description
zv_extra_item_selected