if(strcmp(cmd, "/maddogdm", true) == 0) { if(indeathmatch[playerid] == 1) { SendClientMessage(playerid, COLOR_RED, "Type /kill to leave the DM FIRST."); return 1; } else { new Float:maddogspawn[9][3] = { // Positions, (X, Y, Z and Facing Angle) {1266.3718,-780.3331,1084.0078}, {1253.6959,-786.6283,1084.0149}, {1268.9158,-786.1834,1084.0149}, {1266.7693,-809.4655,1084.0078}, {1234.0151,-811.4605,1084.0078}, {1275.4358,-826.8328,1085.6328}, {1280.6829,-815.3812,1089.9375}, {1283.4325,-785.7381,1089.9375}, {1278.5106,-772.6031,1091.9063} }; new rand = random(sizeof(maddogspawn)); SetPlayerPos(playerid,maddogspawn[rand][0],maddogspawn[rand][1],maddogspawn[rand][2],maddogspawn[rand][3],maddogspawn[rand][4],maddogspawn[rand][5],maddogspawn[rand][6],maddogspawn[rand][7],maddogspawn[rand][8]); |
if(strcmp(cmd, "/maddogdm", true) == 0) { if(indeathmatch[playerid] == 1) { SendClientMessage(playerid, COLOR_RED, "Type /kill to leave the DM FIRST."); return 1; } else { new Float:maddogspawn[9][3] = { // Positions, (X, Y, Z and Facing Angle) {1266.3718,-780.3331,1084.0078}, {1253.6959,-786.6283,1084.0149}, {1268.9158,-786.1834,1084.0149}, {1266.7693,-809.4655,1084.0078}, {1234.0151,-811.4605,1084.0078}, {1275.4358,-826.8328,1085.6328}, {1280.6829,-815.3812,1089.9375}, {1283.4325,-785.7381,1089.9375}, {1278.5106,-772.6031,1091.9063} }; new rand = random(sizeof(maddogspawn)); SetPlayerPos(playerid,maddogspawn[rand][0],maddogspawn[rand][1],maddogspawn[rand][2],maddogspawn[rand][3],maddogspawn[rand][4],maddogspawn[rand][5],maddogspawn[rand][6],maddogspawn[rand][7],maddogspawn[rand][8]); SetPlayerInterior(playerid, 5); SendClientMessage(playerid, COLOR_RED, "------------Mad Dogs DM------------"); SendClientMessage(playerid, COLOR_GREEN, "Welcome to Maddogdm"); SendClientMessage(playerid, COLOR_RED, "----------------------------"); format(string,sizeof(string),"%s (Id:%d) Has Teleported to MadDogDM! (/maddogdm)",PlayerName,playerid); SendClientMessageToAll(COLOR_GREEN, "string"); SetPlayerPos(playerid, 1299.14,-794.77,1084.00); indeathmatch[playerid] = 1; return 1; } } |
(200) : error 032: array index out of bounds (variable "maddogspawn") |
maddogspawn[rand][0],maddogspawn[rand][1],maddogspawn[rand][2],maddogspawn[rand][3],maddogspawn[rand][4],maddogspawn[rand][5],maddogspawn[rand][6],maddogspawn[rand][7],maddogspawn[rand][8]
maddogspawn[rand][0],maddogspawn[rand][1],maddogspawn[rand][2]);
SetPlayerPos(playerid,maddogspawn[rand][0],maddogspawn[rand][1],maddogspawn[rand][2]);
new Float:maddogspawn[9][3] =
new Float:maddogspawn[][3] =