if(!BusinessData[i][Closed])
{
if(!strcmp(BusinessInteriors[][e_businessint], "Unavailable"))
{
Player_GoToBusiness(playerid, i);
}
}
else
{
Error(playerid, "You can't enter this business right now.");
}
}
new
BusinessInteriors[][e_businessint] = {
{"24/7 1", -25.884498, -185.868988, 1003.546875, 17},
{"24/7 2", 6.091179, -29.271898, 1003.549438, 10},
{"24/7 3", -30.946699, -89.609596, 1003.546875, 18},
{"24/7 4", -25.132598, -139.066986, 1003.546875, 16},
{"24/7 5", -27.312299, -29.277599, 1003.557250, 4},
{"24/7 6", -26.691598, -55.714897, 1003.546875, 6},
{"Ammunation 1", 286.148986, -40.644397, 1001.515625, 1},
{"Ammunation 2", 286.800994, -82.547599, 1001.515625, 4},
{"Ammunation 3", 296.919982, -108.071998, 1001.515625, 6},
{"Ammunation 4", 314.820983, -141.431991, 999.601562, 7},
{"Ammunation 5", 316.524993, -167.706985, 999.593750, 6},
{"Sex Shop", -103.559165, -24.225606, 1000.718750, 3},
{"Binco", 207.737991, -109.019996, 1005.132812, 15},
{"Didier Sachs", 204.332992, -166.694992, 1000.523437, 14},
{"ProLaps", 207.054992, -138.804992, 1003.507812, 3},
{"Sub Urban", 203.777999, -48.492397, 1001.804687, 1},
{"Victim", 226.293991, -7.431529, 1002.210937, 5},
{"Zip", 161.391006, -93.159156, 1001.804687, 18},
{"Alhambra", 493.390991, -22.722799, 1000.679687, 17},
{"Bar", 501.980987, -69.150199, 998.757812, 11},
{"Burger Shot", 375.962463, -65.816848, 1001.507812, 10},
{"Cluckin' Bell", 369.579528, -4.487294, 1001.858886, 9},
{"Well Stacked Pizza", 373.825653, -117.270904, 1001.499511, 5},
{"Strip Club", 1204.809936, -11.586799, 1000.921875, 2},
{"Pleasure Domes", -2640.762939, 1406.682006, 906.460937, 3},
{"Barber 1", 411.625976, -21.433298, 1001.804687, 2},
{"Barber 2", 418.652984, -82.639793, 1001.804687, 3},
{"Barber 3", 412.021972, -52.649898, 1001.898437, 12},
{"Tatoo Parlour", -204.439987, -26.453998, 1002.273437, 16},
{"Unavailable", 0.0, 0.0, 0.0, 0}
};
Need more information the your code
use bucle Foreach in your first code ? |
if(!strcmp(BusinessInteriors[][e_businessint], "Unavailable"))
if(!strcmp(BusinessInteriors[WHY NO VALUE?][e_businessint], "Unavailable"))
if(!strcmp(BusinessInteriors[i][e_businessint], "Unavailable"))
Player_GoToBusiness(playerid, businessid)
{
if(BusinessInteriors[ BusinessData[businessid][Type] ][InteriorName], "Unavailable")) return 0;
SetPVarInt(playerid, "BusinessPickup", gettime() + 8);
InBusiness[playerid] = businessid;
SetPlayerVirtualWorld(playerid, businessid);
new type = BusinessData[businessid][Type];
SetPlayerInterior(playerid, BusinessInteriors[type][InteriorID]);
SetPlayerPos(playerid, BusinessInteriors[type][InteriorX], BusinessInteriors[type][InteriorY], BusinessInteriors[type][InteriorZ]);
if(Player_OwnsBusiness(playerid, businessid))
{
BusinessData[businessid][LastVisited] = gettime();
BusinessData[businessid][Save] = true;
}
Info(playerid, "Use {3498DB}/business {FFFFFF}to open the business menu.");
Info(playerid, "Use {3498DB}/exitbiz {FFFFFF}to leave the business.");
return 1;
}