Everyone can enter
#2

idk your whole code but i gess that in the [owner] would not have [0]

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;
}
try this
Reply


Messages In This Thread
Everyone can enter - by Stefans94 - 05.10.2011, 12:18
Re: Everyone can enter - by Pharrel - 05.10.2011, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)