Aw check right
|Added in version 4.1|
int aw_check_right (int citizen, char *str)
Checks if a particular citizen would be granted rights by the provided string.
None (returns immediately)
This method requires that a bot instance has been created. It does not matter to which universe or world it is connected.
- Citizen number to check.
- String containing a rights list.
The string must be formatted according the rules for rights lists:
0 ... tourists any# ... citizen number - ... exclusion sign #~# ... citizen range * ... everyone , blank ... delimiters
For example, "1~2300,-512~1024" would grant rights to citizen number in the range between 1 to 2300, but will deny rights to citizen numbers in the range between 512 to 1024.
- If the citizen number would be granted rights by the rights string.
- Not granted rights. It is also returned if no instance has been created.
Check for rights.
#define RIGHTS "1~2300,-512~1024" aw_create ("", 0, NULL); if (aw_check_right (176, RIGHTS)) printf ("Citizen# 176 has rights assigned\n"); else printf ("Citizen# 176 has no rights assigned\n");