Raised This Month: $ Target: $400
 0% 

id + any_defined_value in set_task()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-24-2012 , 19:10   Re: id + any_defined_value in set_task()
Reply With Quote #7

Quote:
Originally Posted by hornet View Post
Code:
#define TASK_PRIMARY      1001 #define TASK_SECONDARY    1002
You should space them with the max players available (ie. 1001, 1033, 1065, etc.)

Usually you will see authors use an enum to do this:
Code:
enum += 32
{
   TASK_ONE = 1001,
   TASK_TWO,
   TASK_THREE,
   //etc.
}
If you used your examples, primary task for id 2 (1001+2) would have the same task id as secondary task for id 1 (1002+1). This would only be problematic if you need to check, change, or remove tasks though.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode