11.06.2010, 18:57
Hey,i have the /enter command,it will enter to house,it should be if Explored is same as hId,but when my Explored is 1 i can enter any houses even if hId is 2,i hope you understood.thanks
Код:
if(strcmp(cmdtext, "/enter", true) == 0)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3 ,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
new Houseid;
Houseid = HouseInfo[ playerid ] [ hId ];
if(PlayerStatistics [playerid] [Explored] == Houseid)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
}
else GameTextForPlayer(playerid, "~r~You have to Explore this first!", 5000, 6);
}
}
return 1;
}

