I need some help with an entrance.
#1

Hello,

How do I make an entrance to be locked for all the players on the server?

Let's say we've door A which's a faction door. Only the leader can lock the door.
I tried doing:
PHP код:
doorLockedMAX_PLAYERS ]; 
and for example:
PHP код:
CMD:lockdoorplayeridcmdtext[] ) {
    if(
IsPlayerConnected(playerid))
    {
        new 
string[128]; // the if player is leader etc I know how to do it this is just an example
        
format(stringsizeof(string), "%s has locked door A"GetOOCName(playerid));
        
SendMessageToAll(exampleredstring);
        foreach( new 
Player )
        {
            
doorLocked 1;
        }
        return 
1;
    }
    return 
0;

How do I check if the door's locked & if it is to unlock it, I think I got an idea how to do that but the real question's:
If I do it that way, wouldn't the players that just connect have doorLocked = 0; meaning they can enter the specified door?

To sum it all up, I want someone to show me how to make a door be locked & unlocked for everyone on the server and when it's locked to be locked on those that join too.
Reply


Messages In This Thread
I need some help with an entrance. - by zork - 25.02.2015, 17:21
Re: I need some help with an entrance. - by ReD_HunTeR - 25.02.2015, 17:57
Re: I need some help with an entrance. - by zork - 25.02.2015, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)