View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-20-2017 , 11:26   Re: [INC/STOCK] menu_set_timeout
Reply With Quote #9

Task ids are just numbers, doesn't matter how you save them. That will be decided by plugin's internal design. For example, if you want to index an array by some predefined values enum could be handy.

Example from WC3FT mod, where tasks are separated by player ids:
Code:
#define TASK_ITEMS		0		// Showing items in the HUD
#define TASK_SPAWN		32		// Respawning from revive
#define TASK_ITEM_SCROLL	64		// Respawning after death from an item
#define TASK_VENGEANCE		96		// Respawning from having vengeance (warden ultimate)
...
Can be simplified with an enum:
Code:
enum ( += 32 )
{
    TASK_ITEMS,
    TASK_SPAWN,
    TASK_ITEM_SCROLL,
    TASK_VENGEANCE,
...
__________________

Last edited by Emp`; 02-20-2017 at 11:56. Reason: added example from WC3FT mod
HamletEagle is online now