Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MAX_BROTHEL_ROOMS 3
- new
- bool:gBrothel_RoomTaken[MAX_BROTHEL_ROOMS]
- ;
- // In the command:
- if(!strcmp(cmdtext, "/blabla", true)) {
- if(Brothel_GetFreeRoom() == -1) {
- return SendClientMessage(playerid, -1, "No free rooms.");
- }
- }
- // Check if a room is free:
- Brothel_GetFreeRoom() {
- for(new i = MAX_BROTHER_ROOMS; --i >= 0;) {
- if(!gBrother_RoomTaken[i]) {
- return i;
- }
- }
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement