Occupied Rooms ???
#1

Hello,

I wanted to create an interior (in which you go with /enter) but i want the script to check if someone is already inside.

So if someone is inside they would get a message like "Can't go inside right now, it's occupied!" so i started it like this:

On the top of my script i put:

new InRoom[MAX_PLAYERS];

Then i put this in OnPlayerConnect:

InRoom[playerid] = 0;

And then i made my check like this:
pawn Код:
if(InRoom[playerid] == 1)
     {
      SendClientMessage(playerid, 0xF6345BAA, "Can't go inside sorry ..");
      return 1;
     }
It worked when i was alone on the server, but will it work for others ?

For instance, if i enter that interior could another player enter aswell ? (with my code)

Please tell my if this code is ok, or if it's not please tell me how to fix it. THANKS
Reply


Messages In This Thread
Occupied Rooms ??? - by Zeromanster - 25.06.2009, 06:56
Re: Occupied Rooms ??? - by bigcomfycouch - 25.06.2009, 07:11
Re: Occupied Rooms ??? - by Zeromanster - 25.06.2009, 07:23
Re: Occupied Rooms ??? - by dice7 - 25.06.2009, 07:46
Re: Occupied Rooms ??? - by Joe Staff - 25.06.2009, 08:10

Forum Jump:


Users browsing this thread: 1 Guest(s)