Aw has world right
Jump to navigation
Jump to search
Minimum requirements | ||
---|---|---|
Added in version 4.1 |
int aw_has_world_right (int citizen, AW_ATTRIBUTE right)
Description
Checks if a citizen has been granted a certain world right.
Callback
None (returns immediately)
Notes
Instance must have entered a world in order to execute this method successfully.
Argument
- citizen
- Citizen number.
- right
- World right attribute.
The provided world right attribute must be one of the following:
- AW_WORLD_BOTS_RIGHT
- AW_WORLD_BUILD_RIGHT
- AW_WORLD_EJECT_RIGHT
- AW_WORLD_EMINENT_DOMAIN_RIGHT
- AW_WORLD_ENTER_RIGHT
- AW_WORLD_PUBLIC_SPEAKER_RIGHT
- AW_WORLD_SPEAK_RIGHT
- AW_WORLD_SPECIAL_COMMANDS_RIGHT
- AW_WORLD_SPECIAL_OBJECTS_RIGHT
- AW_WORLD_TERRAIN_RIGHT
- AW_WORLD_VOIP_RIGHT
- AW_WORLD_V4_OBJECTS_RIGHT
Argument attributes
None
Return values
- 0
- Citizen has not been granted the right. Also returned if an error occurred.
- 1
- Citizen has been granted the right.
Returned attributes
None
Usage
Check for build rights in world.
if (aw_has_world_right (176, AW_WORLD_BUILD_RIGHT)) printf ("Citizen# 176 may build in this world\n"); else printf ("Citizen# 176 must not build in this world\n");