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. **************************************************************************
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 | — |