05.10.2011, 12:46
idk your whole code but i gess that in the [owner] would not have [0]
try this
pawn Код:
CMD:enter(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
for(new x; x < houseid; x++)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, House[x][EnterPos][0], House[x][EnterPos][1], House[x][EnterPos][2]))
{
if(!strcmp(pname, House[x][owner],false))
{
SetPlayerPos(playerid, House[x][TelePos][0], House[x][TelePos][1], House[x][TelePos][2]);
SetPlayerInterior(playerid, House[x][interiors]);
SetPlayerVirtualWorld(playerid, 15500000 + x);
}
else return SendClientMessage(playerid, COLOR_RED, "This house is not yours!");
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, House[x][TelePos][0], House[x][TelePos][1], House[x][TelePos][2]))
{
SetPlayerPos(playerid, House[x][EnterPos][0], House[x][EnterPos][1], House[x][EnterPos][2]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
return 1;
}