04.12.2012, 13:36
bom gente eu to tentando colocar umas imagems randomicas na tela do login, nao sao bem imagem mas sim posicoes, ao invez do player ficar em uma so posicao as posicoes vao mudando e vae mostrando outros lugares a cada 5 segundos.
eu fa fiz tudiin mas ta com esse erro ae na public: array index outr of bounds (variable camera)
meu codigo:
o erro aparece nas linhas : setplayerpos, setplayerlookat e setplayercameraposy
eu fa fiz tudiin mas ta com esse erro ae na public: array index outr of bounds (variable camera)
meu codigo:
Код:
new Float:camera[42][3] = { {-2343.1233,2332.7126,4.9844}, {-2342.2234,2518.0281,2.8143}, {-2356.7388,2539.7715,19.5486}, {-2499.4106,2605.7681,58.4691}, {180.7142,-1403.9919,46.2522}, {-2098.5769,-2774.9558,44.7372}, {-2694.3662,-253.4055,7.0078}, {-2690.0039,-253.4742,6.9909}, {-2851.4280,238.5864,11.2916}, {-2804.8254,545.0164,6.6052}, {-2870.0327,918.4926,44.1354}, {-2870.2593,910.3209,44.3906}, {-2854.2017,987.7276,42.0547}, {-2862.8813,1017.3004,38.2339},//fim playerposepose {-2346.1858,2335.1338,4.9844}, {-2343.9036,2513.8940,2.4296}, {-2355.7419,2537.8477,17.1334}, {-2500.2407,2602.7773,59.2098}, {181.4239,-1400.8236,46.6435}, {-2101.6453,-2775.3242,44.5348}, {-2694.6399,-256.8124,7.0516}, {-2686.0781,-252.6662,6.9380}, {-2851.5193,235.2050,11.6340}, {-2806.5613,549.4806,6.6835}, {-2871.9360,915.9246,44.3906}, {-2871.6521,914.0192,44.3906}, {-2850.9714,986.1791,42.4343}, {-2864.8843,1019.8088,37.7624},// fim do lookat {-2343.1233,2332.7126,4.9844}, {-2342.2234,2518.0281,2.8143}, {-2356.7388,2539.7715,19.5486}, {-2499.4106,2605.7681,58.4691}, {180.7142,-1403.9919,46.2522}, {-2098.5769,-2774.9558,44.7372}, {-2694.3662,-253.4055,7.0078}, {-2690.0039,-253.4742,6.9909}, {-2851.4280,238.5864,11.2916}, {-2804.8254,545.0164,6.6052}, {-2870.0327,918.4926,44.1354}, {-2870.2593,910.3209,44.3906}, {-2854.2017,987.7276,42.0547}, {-2862.8813,1017.3004,38.2339}// fim do camerapose }; //imagems radomicas forward mycam(playerid); new countdacamera[MAX_PLAYERS]; new cccam[MAX_PLAYERS]; new cameratemp = 3000; //em OnPlayerDisconnect cccam[playerid] = 0; // no final do gm. public mycam(playerid) { if(cccam[playerid] <= 3) { new rand; rand = random(sizeof(camera)); SetPlayerPos(playerid, camera[rand][0], camera[rand][1], camera[rand][2], camera[rand][3], camera[rand][4], camera[rand][5], camera[rand][6], camera[rand][7], camera[rand][8], camera[rand][9], camera[rand][10], camera[rand][11], camera[rand][12], camera[rand][13]);//erro ta aki SetPlayerCameraLookAt(playerid, camera[rand][14], camera[rand][15], camera[rand][16], camera[rand][17], camera[rand][18], camera[rand][19], camera[rand][20], camera[rand][21], camera[rand][22], camera[rand][23], camera[rand][24], camera[rand][25], camera[rand][26], camera[rand][27]); //aki SetPlayerCameraPos(playerid, camera[rand][28], camera[rand][29], camera[rand][30], camera[rand][31], camera[rand][32], camera[rand][33], camera[rand][34], camera[rand][35], camera[rand][36], camera[rand][37], camera[rand][38], camera[rand][39], camera[rand][40], camera[rand][41]);// e aki } else { KillTimer(countdacamera[playerid]); } cccam[playerid]++; } // na public OnPlayerRequestClass ou na sua public que checa o login. countdacamera[playerid] = SetTimerEx("mycam",cameratemp,true,"i",playerid);