Mass function
#1

Okay so this is my job code
Код:
#define JOB_COURIER (1)
#define JOB_MECHANIC (2)
#define JOB_TAXI (3)
#define JOB_UNLOADER (4)
#define JOB_MINER (5)
#define JOB_FOOD_VENDOR (6)
#define JOB_GARBAGE (7)
#define JOB_SORTER (8)
#define JOB_WEAPON_SMUGGLER (9)
how can i put this into a function so JOB_ALL = all jobs listed above?
Код:
	        if (PlayerData[playerid][pJob] != JOB_ALL)
			return SendErrorMessage(playerid, "You don't have the appropriate job.");
Reply
#2

Perhaps you should just do the opposite and define JOB_NONE as being 0.
Reply
#3

You can do what Vince said, and make anything more than 0 a job - a very easy method, or you can make a define that checks if the jobid is 1-9.
Reply
#4

Yea thanks I did what vince said
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)