Confused about code
#1

The problem is when i have used my command to set the HouseClosed[playerid] to 0.
I want it to be like this: Only eros can enter the house, and the rest will get the message that the house is closed. The problem: Everyone can still enter when the house is closed, can somebody help me?

Im actually a little bit confused about my own code.
Also the HouseClosed[ID] must be eros's house. Dont get it how

This gets called when a player enters the checkpoint to enter the house:

pawn Код:
new Name[MAX_PLAYER_NAME+1];
new ID;

for(new i=0; i<MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i)) {
    GetPlayerName(i, Name, sizeof(Name));
    ID = GetPlayerID(Name);

    if(strcmp(Name, "Eros")) {
      if(HouseClosed[ID] == 1) return SendClientMessage(playerid, COLOR_RED, "This House Is Currently Closed To Visitors.");
    }
  }
}
Thnx!!!
Reply


Messages In This Thread
Confused about code - by Robbin237 - 04.05.2009, 15:37
Re: Strcmp not working again... - by Diler - 04.05.2009, 15:40
Re: Confused about code - by Robbin237 - 04.05.2009, 15:45
Re: Confused about code - by Joe Staff - 04.05.2009, 15:55

Forum Jump:


Users browsing this thread: 1 Guest(s)