11.11.2009, 01:11
the numbers in the defines aren't just "to help the compiler." The pre-processer essentially does a Ctrl+h
replace: TEAM_GANG
with : 0
and I would recommend putting the number in braces () so it would be
replace: TEAM_LSPD
with : (1)
UNLESS you plan on doing something like this, which i am not even sure works, and looks pretty sloppy.
[pawn]
#define TEAM_GOOD 1
#define _LSPD 1
#define _LSFD 2
#define TEAM_BAD 2
#define _ROBBERS 1
#define _WHITE_HOUSE 2
[pawn]
you could then do something (again not sure on this) like this:
that would be teamid 11.
replace: TEAM_GANG
with : 0
and I would recommend putting the number in braces () so it would be
replace: TEAM_LSPD
with : (1)
UNLESS you plan on doing something like this, which i am not even sure works, and looks pretty sloppy.
[pawn]
#define TEAM_GOOD 1
#define _LSPD 1
#define _LSFD 2
#define TEAM_BAD 2
#define _ROBBERS 1
#define _WHITE_HOUSE 2
[pawn]
you could then do something (again not sure on this) like this:
pawn Код:
if (teamid == TEAM_GOOD_LSPD)