enter command
#3

pawn Код:
YCMD:enter(playerid, params[], help)
{
        #pragma unused params
        #pragma unused help
        new h = GetClosetHouseID(playerid);
        if(h == -1) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"There is no house.");
        if(House[h][On_Sell] == 0 && House[h][Lock] == 0)
        {
            SetPlayerPos(playerid,House[h][ExitX],House[h][ExitY],House[h][ExitZ]);
            SetPlayerInterior(playerid,House[h][IntID]);
            SetPlayerVirtualWorld(playerid,House[h][VW]);
        }
        else return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"House is locked/Is not on sale.");
        if(strcmp(House[h][Owner],GetName(playerid),false) == 0)
        {
        new Year, Month, Day;
        getdate(Year, Month, Day);
        House[h][DayEnter] = Day;
        House[h][MonthEnter] = Month;
        CheckHouse(h);
        }
        return 1;
}
YCMD:exit(playerid, params[], help)
{
        #pragma unused params
        #pragma unused help
        new h = GetClosetHouseIntID(playerid);
        if(h == -1) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"There is no house.");
        SetPlayerPos(playerid,House[h][EnterX],House[h][EnterY],House[h][EnterZ]);
        SetPlayerInterior(playerid,0);
        SetPlayerVirtualWorld(playerid,0);
        return 1;
}
Reply


Messages In This Thread
enter command - by Mustafa6155 - 16.10.2012, 13:29
Re: enter command - by Abhishek. - 16.10.2012, 13:51
Re: enter command - by Roel - 16.10.2012, 13:56
AW: enter command - by Mustafa6155 - 16.10.2012, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)