dcmd_exit(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid) && PLAYERLIST_authed[playerid] == 1){
for(new h = 0; h <= MAX_HOUSES; h++)
{
if(PlayerToPoint(3.0, playerid, HousesCoords[HouseInfo[h][hLevel]][0], HousesCoords[HouseInfo[h][hLevel]][1], HousesCoords[HouseInfo[h][hLevel]][2]))
{
TeleportPlayer(playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ], 0, 0, 0);
}
}
}
return true;
}
dcmd_exit(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid) && PLAYERLIST_authed[playerid] == 1){
for(new h = 0; h <= MAX_HOUSES; h++)
{
if(PlayerToPoint(3.0, playerid, HousesCoords[HouseInfo[h][hLevel]][0], HousesCoords[HouseInfo[h][hLevel]][1], HousesCoords[HouseInfo[h][hLevel]][2]))
{
TeleportPlayer(playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ], 0, 0, 0);
return 1;
}
}
}
return 1;
}
new array[9000];
array[9001] = 5; //OVER NINE THOUSAAAAAAAND!
|
Originally Posted by Joe Staff
Most likely, one of your variables is calling a cell which is outside of the array's limit.
pawn Код:
|
new Float:HousesCoords[13][3] = {
{222.9534, 1287.7649, 1082.1406}, // Sml - 1 bedroom
{261.0827, 1284.6899, 1080.2578}, // Sml - 1 bedroom
{260.6734, 1237.7909, 1084.2578}, // Sml - 1 bedroom
{376.7426, 1417.3226, 1081.3281}, // Sml - 1 bedroom
{295.2874, 1473.2769, 1080.2578}, // Med - 2 bedroom
{2270.1050, -1210.3917, 1047.5625}, // Med - 2 bedroom
{327.9431, 1478.3801, 1084.4375}, // Med - 2 bedroom
{447.1211, 1397.8444, 1084.3047}, // Med - 2 bedroom
{2196.0063, -1204.6326, 1049.0234}, // Lrg - 3 bedroom
{235.3416, 1187.2882, 1080.2578}, // Lrg - 3 bedroom
{490.9987, 1399.4164, 1080.2578}, // Lrg - 3 bedroom
{227.1212, 1114.1840, 1080.9972}, // Lrg - 4 bedroom
{225.6624, 1022.5345, 1084.0145} // Xlrg - 4 bedrooms
};
HousesCoords[HouseInfo[h][hLevel]][0]
HouseInfo[h][hLevel]