new Float:gPrisonSpawns[][20] = { {1535.6071,-1687.4871,2622.3782,}, {1531.0410,-1685.8628,2626.4785,}, {1526.4408,-1687.0918,2622.3782,}, {1526.3402,-1686.2773,2622.3782}, {1521.7162,-1686.3339,2622.3782}, {1530.7864,-1686.0039,2626.4785}, {1526.3381,-1685.8701,2626.4785}, {1521.3617,-1686.2174,2626.4785}, {1517.1804,-1686.5599,2626.4785}, {1512.1564,-1686.0719,2626.4785}, {1535.5720,-1665.2375,2622.3782}, {1531.0294,-1665.3390,2622.3782}, {1527.4852,-1663.4081,2626.0366}, {1526.3124,-1664.8875,2622.3782}, {1521.3252,-1665.5321,2622.3782}, {1534.6390,-1665.9731,2626.4785}, {1530.3339,-1666.4111,2626.4785}, {1525.2550,-1665.7960,2626.4785}, {1515.9534,-1666.4740,2626.4785}, {1520.8258,-1665.8053,2626.4785}, {1511.3445,-1666.5243,2626.4785} };
Код:
new Float:gPrisonSpawns[][20] = { {1535.6071,-1687.4871,2622.3782,}, {1531.0410,-1685.8628,2626.4785,}, {1526.4408,-1687.0918,2622.3782,}, {1526.3402,-1686.2773,2622.3782}, ... {1511.3445,-1666.5243,2626.4785} }; |
new Float:gPrisonSpawns[21][3] = {
{1535.6071,-1687.4871,2622.3782},
{1531.0410,-1685.8628,2626.4785},
{1526.4408,-1687.0918,2622.3782},
...
C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3849) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3850) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3851) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3852) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3853) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(3854) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(20794) : error 032: array index out of bounds (variable "gPrisonSpawns") C:\Documents and Settings\Liviu\My Documents\ulrp\ulrp\gamemodes\ULRP.pwn(20795) : error 032: array index out of bounds (variable "gPrisonSpawns")
new Float:gPrisonSpawns[21][3] =
{
{1535.6071,-1687.4871,2622.3782},
{1531.0410,-1685.8628,2626.4785},
{1526.4408,-1687.0918,2622.3782},
{1526.3402,-1686.2773,2622.3782},
{1521.7162,-1686.3339,2622.3782},
{1530.7864,-1686.0039,2626.4785},
{1526.3381,-1685.8701,2626.4785},
{1521.3617,-1686.2174,2626.4785},
{1517.1804,-1686.5599,2626.4785},
{1512.1564,-1686.0719,2626.4785},
{1535.5720,-1665.2375,2622.3782},
{1531.0294,-1665.3390,2622.3782},
{1527.4852,-1663.4081,2626.0366},
{1526.3124,-1664.8875,2622.3782},
{1521.3252,-1665.5321,2622.3782},
{1534.6390,-1665.9731,2626.4785},
{1530.3339,-1666.4111,2626.4785},
{1525.2550,-1665.7960,2626.4785},
{1515.9534,-1666.4740,2626.4785},
{1520.8258,-1665.8053,2626.4785},
{1511.3445,-1666.5243,2626.4785}
};
SetPlayerPos(playerid,gPrisonSpawns[5][0],gPrisonSpawns[5][1],gPrisonSpawns[5][2]);
else if(PlayerInfo[playerid][pJailed] == 3) { if(!PlayerInfo[playerid][pWakeMsgSend]) { SendClientMessage(playerid, COLOR_PURPLE, "** You wake up in Prison **"); } SetPlayerToTeamColor(playerid); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; IntEntered[playerid] = 0; rand = random(sizeof(gPrisonSpawns)); // Warp the player SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]); SetPlayerPos(playerid, gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5]); SetPlayerPos(playerid, gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]); SetPlayerFacingAngle(playerid, 90); return 1;
new rand; BroadCast(COLOR_BLUE, string); PlayerInfo[suspect][pJailTime] = time*3600; format(string, sizeof(string), "You are jailed for %d hours.", PlayerInfo[suspect][pJailTime]); SendClientMessage(suspect, COLOR_WHITE, string); format(string,sizeof(string),"%s prisons %s for %d mins, %d bail",sendername,giveplayer,PlayerInfo[suspect][pJailTime], JailPrice[suspect]); OnPlayerDataSave(suspect); CopLog(string); PlayerInfo[suspect][pJailed] = 3; rand = random(sizeof(gPrisonSpawns)); // Warp the player SetPlayerPos(suspect, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]); SetPlayerPos(suspect, gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5]); SetPlayerPos(suspect, gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]);
SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);
SetPlayerPos(playerid, gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5]);
SetPlayerPos(playerid, gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]);
rand = random(sizeof(gPrisonSpawns));
SetPlayerPos(playerid, gPrisonSpawns[rand][0], gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);