03.08.2017, 18:33
I can't enter to a bussiness, but I can enter to a house.
Код:
CMD:enter(playerid, params[]) { if(!LoggedIn[playerid])return true; if(!IsPlayerInAnyVehicle(playerid)) { for(new i = 0; i < MAX_HOUSES; i++) { if(HouseData[i][HouseID] != 0) { if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseData[i][HouseExterior][0], HouseData[i][HouseExterior][1], HouseData[i][HouseInterior][2])) { if(HouseData[i][HouseLocked] == 0) { SetPlayerPos(playerid, HouseData[i][HouseInterior][0], HouseData[i][HouseInterior][1], HouseData[i][HouseInterior][2]); SetPlayerFacingAngle(playerid, HouseData[i][HouseInterior][3]); SetPlayerInterior(playerid, HouseData[i][HouseInteriorID]); SetPlayerVirtualWorld(playerid, HouseData[i][HouseID]); } else return SendClientMessage(playerid, COLOR_WHITE, "Ez a hбz zбrva van!"); } } } for(new i = 0; i < MAX_BIZ; i++) { if(BizData[i][BizID] != 0) { if(IsPlayerInRangeOfPoint(playerid, 2.0, BizData[i][BizExterior][0], BizData[i][BizExterior][1], BizData[i][BizInterior][2])) { if(BizData[i][BizLocked] == 0) { SetPlayerPos(playerid, BizData[i][BizInterior][0], BizData[i][BizInterior][1], BizData[i][BizInterior][2]); SetPlayerFacingAngle(playerid, BizData[i][BizInterior][3]); SetPlayerInterior(playerid, BizData[i][BizInteriorID]); SetPlayerVirtualWorld(playerid, BizData[i][BizID]); } else return SendClientMessage(playerid, COLOR_WHITE, "Ez a biznisz zбrva van!"); } } } } return true; }