CMD:enter(playerid, params[])
{
for(new h = 1; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
{
if(GetPlayerVirtualWorld(playerid) == HouseInfo[h][hWorld])
{
if(HouseInfo[h][hLocked] == 0)
{
if(HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] == 0.000000)
{
SendErrorMessage(playerid, "No exterior set for this house contact an Lead Admin");
}
SetPlayerPos(playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]);
SetPlayerFacingAngle(playerid, HouseInfo[h][hExitA]);
SetPlayerInterior(playerid, HouseInfo[h][hInsideInt]);
SetPlayerVirtualWorld(playerid, HouseInfo[h][hInsideWorld]);
InsideHouse[playerid] = h;
TogglePlayerControllable(playerid,0);
GameTextForPlayer(playerid, "~r~Loading Objects", 3000, 5);
SetTimerEx("LoadInterior", 3000, false, "i", playerid);
return 1;
}
else SendErrorMessage(playerid, "This house is locked.");
if(HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] == 0.0) return SendErrorMessage(playerid, "No exterior set for this house contact an Lead Admin");
Код:
if(HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] == 0.0) return SendErrorMessage(playerid, "No exterior set for this house contact an Lead Admin"); |
if(HouseInfo[h][hEntranceX] == 0.0 && HouseInfo[h][hEntranceY] == 0.0 && HouseInfo[h][hEntranceZ] == 0.0) { SendErrorMessage(playerid, "There's no exterior set for this house, please contact a Lead Admin."); }
if(!HouseInfo[h][hEntranceX] && !HouseInfo[h][hEntranceY] && !HouseInfo[h][hEntranceZ])
Код:
if(HouseInfo[h][hEntranceX] && HouseInfo[h][hEntranceY] && HouseInfo[h][hEntranceZ] == 0.000000) { SendErrorMessage(playerid, "There's no exterior set for this house, please contact a Lead Admin."); } |
You need to check each variable individually.
pawn Код:
EDIT: Neither that, editing the post won't help. |
You need to check each variable individually.
pawn Код:
EDIT: Neither that, editing the post won't help. |
if(HouseInfo[h][hEntranceX] == 0.0 && HouseInfo[h][hEntranceY] == 0.0 && HouseInfo[h][hEntranceZ] == 0.0)