04.05.2009, 15:37
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:
Thnx!!!
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.");
}
}
}