[Duvida] Criando Spawn de Veiculos
#1

Eu fiz o seguinte,
pawn Код:
new Carro[92] [1]=
{
400,
401,
402,
404,
405,
410,
411,
412,
413,
415,
148,
419,
421,
422,
424,
426,
429,
434,
439,
442,
445,
451,
458,
459,
466,
467,
468,
470,
471,
474,
475,
477,
478,
479,
480,
482,
489,
490,
491,
492,
494,
495,
496,
500,
502,
503,
504,
505,
506,
507,
516,
517,
518,
526,
527,
533,
534,
535,
536,
540,
541,
542,
543,
545,
546,
547,
549,
550,
551,
552,
554,
555,
558,
559,
560,
561,
562,
565,
566,
567,
571,
575,
576,
579,
580,
585,
587,
589,
600,
602,
603,
604,
605
};
new Float:RandomSpawn[92][3] =
{
415,2062.4138,-1903.6830,13.3181,359.8134,40,1); //
604,2508.0796,-1665.5142,13.1794,11.6435,68,76); //
605,2484.1667,-1655.1429,13.1535,88.8484,32,8); //
602,2488.2546,-1683.9706,13.2237,266.5580,69,1); //
605,2391.1199,-1484.4899,23.6484,90.8714,32,8); //
605,2390.5950,-1503.8427,23.6566,89.7804,32,8); //
565,2390.8462,-1493.8940,23.4651,90.3072,42,42); //
405,2404.0869,-1397.2898,23.9753,0.1062,24,1); //
409,2357.9233,-1363.8906,23.7868,0.5076,1,1); //
561,2376.0532,-1320.6210,23.7146,0.0664,67,8); //
605,2308.5898,-1204.3284,24.2202,359.9602,32,8); //
422,2365.4431,-1190.3610,27.4951,2.7153,113,36); //
554,2346.1997,-1221.6276,22.6135,359.8214,45,32); //
554,2326.8162,-1236.1893,22.5858,273.1820,45,32); //
411,2428.0386,-1227.9675,24.8388,0.0968,112,1); //
411,2471.8716,-1261.9703,26.5632,88.7069,112,1); //
541,2329.2834,-1159.4053,26.5091,265.8669,60,1); //
541,2417.6172,-1536.1808,23.6249,270.0393,60,1); //
541,2533.2539,-1538.0400,23.2046,178.7989,60,1); //
573,2505.7720,-1535.7721,24.2764,177.8415,115,43); //
573,2520.0503,-1536.6014,24.1805,179.3782,115,43); //
541,2456.0525,-1360.2104,23.5402,359.9703,68,8); //
496,2148.7190,-1148.0879,24.1439,88.1131,66,72); //
492,2161.5134,-1178.0007,23.5896,271.7982,77,26); //
536,4148.4453,-1199.3743,23.6042,269.9963,9,1); //
536,2095.3479,-1106.6298,24.7660,66.4097,9,1); //
536,2061.6584,-3205.7181,23.5942,179.8084,9,1); //
536,1978.3427,-1103.8130,25.2879,353.0037,9,1); //
506,1993.7432,-1274.7590,23.5247,0.0365,7,7); //
560,1842.8489,-1309.2710,13.0924,179.4075,37,0); //
471,2134.0803,-1466.8768,23.3642,0.1191,103,111); //
412,2232.5752,-1379.8491,23.7425,271.6036,25,8); //
412,2337.4390,-1436.7982,23.7478,181.0840,25,8); //
412,2182.2104,-1688.4814,13.5710,171.1236,25,8); //
413,2100.7188,-1782.7739,13.4742,174.4854,105,1); //
411,2122.1042,-1783.8521,13.1161,358.5478,0,0); //
411,1964.1541,-1747.0056,13.1890,89.6810,0,0); //
411,1841.2042,-1871.1147,13.1168,180.4409,0,0); //
411,2044.0548,-1658.7777,13.2740,179.0315,0,0); //
411,2043.4640,-1757.6118,13.1890,269.5319,0,0); //
411,2051.4646,-1677.9176,13.1895,269.2330,0,0); //
411,1992.8884,-1592.6776,13.3056,45.3265,0,0); //
494,1782.0472,-1702.2584,13.4304,1.1390,42,33); //
494,1651.4556,-1308.6467,15.0178,269.1400,42,33); //
494,1720.1365,-1204.8623,21.4188,358.3211,42,33); //
491,1622.1725,-2094.0348,23.5851,90.7515,52,66); //
494,1449.5437,-1344.5391,13.3552,179.6391,42,33); //
494,1826.7988,-1807.8705,13.3699,358.8819,42,33); //
494,1042.5806,-1739.4984,13.3552,0.0047,42,33); //
451,1066.1664,-1357.3846,13.1071,0.7113,125,125); //
560,1061.1851,-1136.7827,23.4442,87.2577,56,29); //
405,841.3453,-1153.3568,23.5312,270.5454,24,1); //
451,298.8773,-1731.7770,4.0295,85.7222,125,125); //
474,327.7201,-1809.6517,4.2391,180.5414,81,1); //
422,337.3411,-1809.7257,4.4995,358.7898,97,25); //
421,317.9251,-1809.6475,4.3058,180.2355,13,1); //
424,324.5994,-1788.1240,4.5453,0.6328,2,2); //
424,759.7960,-1710.9063,6.2521,2.4737,2,2); //
526,686.4935,-1568.9863,14.0181,356.7767,9,39); //
540,544.4917,-1508.8530,14.2197,359.3523,42,42); //
536,479.9673,-1516.9900,19.9714,187.6172,12,1); //
541,338.3904,-1617.2798,32.6775,0.0961,58,8); //
411,199.8223,-1216.5898,14.5637,198.7949,0,0); //
410,592.4506,-1298.7008,14.4179,195.9008,9,1); //
404,717.8137,-1198.1129,18.9852,334.8023,119,50); //
405,847.8671,-1153.2949,23.5676,270.5563,24,1); //
533,813.9497,-1360.0759,13.5976,269.0167,77,1); //
411,782.2745,-1619.4725,13.1364,91.5081,0,0); //
445,1115.2203,-1698.7517,13.6013,180.5833,35,35); //
440,1261.1743,-1796.3348,13.5073,358.8004,32,32); //
411,1479.6548,-1843.8619,13.2805,267.8659,56,56); //
499,1609.2104,-1669.8209,13.5464,0.9788,109,32); //
411,1208.9135,-1091.4047,25.7352,179.4181,56,56); //
411,1216.3612,-1092.0460,25.6097,181.6434,56,56); //
411,1583.3933,-1047.0696,23.6333,130.1372,56,56); //
411,1617.8823,-1009.6440,23.6275,179.1156,56,56); //
411,1309.2723,-865.7914,39.3052,90.7262,56,56); //
411,1172.2158,-881.3440,43.0425,96.9431,56,56); //
411,1110.4718,-926.8543,42.9068,90.9105,56,56); //
411,441.3755,-1297.4241,14.9118,214.2565,56,56); //
411,584.0862,-1237.7592,17.4034,292.5240,56,56); //
411,-88.8428,-1583.4794,2.3443,288.0249,56,56); //
411,158.0529,-1754.9810,4.5332,0.5295,56,56); //
411,1157.4635,-1836.0801,13.3498,179.0543,56,56); //
411,1148.7687,-1838.3495,13.2997,178.7614,56,56); //
411,1276.3115,-2020.7505,58.6912,268.7211,56,56); //
411,1247.3856,-2020.2762,59.5117,265.2542,56,56); //
411,1247.0895,-2057.9565,59.5128,268.2894,56,56); //
411,2418.8853,-2117.4678,13.1487,357.2481,56,56); //
411,2755.4067,-2442.6033,13.2843,180.5480,56,56); //
411,2755.8435,-2472.4990,13.2598,181.3024,56,56); //
405,958.4723,-811.8684,96.5211,120.6701,36,1); //
405,792.9007,-793.1324,66.3740,94.7482,36,1); //
};//*/
E no OnVehicleSpawn
pawn Код:
new rand = random(sizeof(RandomSpawn));
    RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    new rand = random(sizeof(Carro));
    Carro[rand][0], Carro[rand][1], Carro[rand][2]);
E esta me dando erros porque?
PS: Sou iniciante no pawn
Reply
#2

pawn Код:
new Carro[92] =
{
pawn Код:
new Float:RandomSpawn[92][3] =
{
415,2062.4138,-1903.6830,13.3181,359.8134,40,1); //
Aн tem 6 valores e vocк sу declarou 3.
Alйm disso vocк estб misturando inteiros com decimais.
Reply
#3

Modificado ficou:
pawn Код:
new Carro[92]=
{
400,
401,
402,
404,
405,
410,
411,
412,
413,
415,
148,
419,
421,
422,
424,
426,
429,
434,
439,
442,
445,
451,
458,
459,
466,
467,
468,
470,
471,
474,
475,
477,
478,
479,
480,
482,
489,
490,
491,
492,
494,
495,
496,
500,
502,
503,
504,
505,
506,
507,
516,
517,
518,
526,
527,
533,
534,
535,
536,
540,
541,
542,
543,
545,
546,
547,
549,
550,
551,
552,
554,
555,
558,
559,
560,
561,
562,
565,
566,
567,
571,
575,
576,
579,
580,
585,
587,
589,
600,
602,
603,
604,
605
};
e
pawn Код:
new Float:RandomSpawn[92][3] =
{
415,2062.4138,-1903.6830,13.3181,359.8134); //
604,2508.0796,-1665.5142,13.1794,11.6435); //
605,2484.1667,-1655.1429,13.1535,88.8484); //
602,2488.2546,-1683.9706,13.2237,266.5580); //
605,2391.1199,-1484.4899,23.6484,90.8714); //
605,2390.5950,-1503.8427,23.6566,89.7804); //
565,2390.8462,-1493.8940,23.4651,90.3072); //
405,2404.0869,-1397.2898,23.9753,0.1062); //
409,2357.9233,-1363.8906,23.7868,0.5076); //
561,2376.0532,-1320.6210,23.7146,0.0664); //
605,2308.5898,-1204.3284,24.2202,359.9602); //
422,2365.4431,-1190.3610,27.4951,2.7153); //
554,2346.1997,-1221.6276,22.6135,359.8214); //
554,2326.8162,-1236.1893,22.5858,273.1820); //
411,2428.0386,-1227.9675,24.8388,0.0968); //
411,2471.8716,-1261.9703,26.5632,88.7069); //
541,2329.2834,-1159.4053,26.5091,265.8669); //
541,2417.6172,-1536.1808,23.6249,270.0393); //
541,2533.2539,-1538.0400,23.2046,178.7989); //
573,2505.7720,-1535.7721,24.2764,177.8415); //
573,2520.0503,-1536.6014,24.1805,179.3782); //
541,2456.0525,-1360.2104,23.5402,359.9703); //
496,2148.7190,-1148.0879,24.1439,88.1131); //
492,2161.5134,-1178.0007,23.5896,271.7982); //
536,2148.4453,-1199.3743,23.6042,269.9963); //
536,2095.3479,-1106.6298,24.7660,66.4097); //
536,2061.6584,-1205.7181,23.5942,179.8084); //
536,1978.3427,-1103.8130,25.2879,353.0037); //
506,1993.7432,-1274.7590,23.5247,0.0365); //
560,1842.8489,-1309.2710,13.0924,179.4075); //
471,2134.0803,-1466.8768,23.3642,0.1191); //
412,2232.5752,-1379.8491,23.7425,271.6036); //
412,2337.4390,-1436.7982,23.7478,181.0840); //
412,2182.2104,-1688.4814,13.5710,171.1236); //
413,2100.7188,-1782.7739,13.4742,174.4854); //
411,2122.1042,-1783.8521,13.1161,358.5478); //
411,1964.1541,-1747.0056,13.1890,89.6810); //
411,1841.2042,-1871.1147,13.1168,180.4409); //
411,2044.0548,-1658.7777,13.2740,179.0315); //
411,2043.4640,-1757.6118,13.1890,269.5319); //
411,2051.4646,-1677.9176,13.1895,269.2330); //
411,1992.8884,-1592.6776,13.3056,45.3265); //
494,1782.0472,-1702.2584,13.4304,1.1390); //
494,1651.4556,-1308.6467,15.0178,269.1400); //
494,1720.1365,-1204.8623,21.4188,358.3211); //
491,1622.1725,-1094.0348,23.5851,90.7515); //
494,1449.5437,-1344.5391,13.3552,179.6391); //
494,1826.7988,-1807.8705,13.3699,358.8819); //
494,1042.5806,-1739.4984,13.3552,0.0047); //
451,1066.1664,-1357.3846,13.1071,0.7113); //
560,1061.1851,-1136.7827,23.4442,87.2577); //
405,841.3453,-1153.3568,23.5312,270.5454); //
451,298.8773,-1731.7770,4.0295,85.7222); //
474,327.7201,-1809.6517,4.2391,180.5414); //
422,337.3411,-1809.7257,4.4995,358.7898); //
421,317.9251,-1809.6475,4.3058,180.2355); //
424,324.5994,-1788.1240,4.5453,0.6328); //
424,759.7960,-1710.9063,6.2521,2.4737); //
526,686.4935,-1568.9863,14.0181,356.7767); //
540,544.4917,-1508.8530,14.2197,359.3523); //
536,479.9673,-1516.9900,19.9714,187.6172); //
541,338.3904,-1607.2798,32.6775,0.0961); //
411,599.8223,-1296.5898,14.5637,198.7949); //
410,592.4506,-1298.7008,14.4179,195.9008); //
404,727.8137,-1198.1129,18.9852,334.8023); //
405,847.8671,-1153.2949,23.5676,270.5563); //
533,893.9497,-1360.0759,13.5976,269.0167); //
411,782.2745,-1619.4725,13.1364,91.5081); //
445,1135.2203,-1698.7517,13.6013,180.5833); //
440,1261.1743,-1796.3348,13.5073,358.8004); //
411,1479.6548,-1843.8619,13.2805,267.8659); //
499,1609.2104,-1669.8209,13.5464,0.9788); //
411,1208.9135,-1091.4047,25.7352,179.4181); //
411,1216.3612,-1092.0460,25.6097,181.6434); //
411,1583.3933,-1047.0696,23.6333,130.1372); //
411,1617.8823,-1009.6440,23.6275,179.1156); //
411,1309.2723,-865.7914,39.3052,90.7262); //
411,1172.2158,-881.3440,43.0425,96.9431); //
411,1110.4718,-926.8543,42.9068,90.9105); //
411,441.3755,-1297.4241,14.9118,214.2565); //
411,584.0862,-1237.7592,17.4034,292.5240); //
411,-88.8428,-1583.4794,2.3443,288.0249); //
411,158.0529,-1754.9810,4.5332,0.5295); //
411,1157.4635,-1836.0801,13.3498,179.0543); //
411,1148.7687,-1838.3495,13.2997,178.7614); //
411,1276.3115,-2020.7505,58.6912,268.7211); //
411,1247.3856,-2020.2762,59.5117,265.2542); //
411,1247.0895,-2057.9565,59.5128,268.2894); //
411,2418.8853,-2117.4678,13.1487,357.2481); //
411,2755.4067,-2442.6033,13.2843,180.5480); //
411,2755.8435,-2472.4990,13.2598,181.3024); //
405,958.4723,-811.8684,96.5211,120.6701); //
405,792.9007,-793.1324,66.3740,94.7482); //
};//*/
Mas da-me os erros
pawn Код:
... : error 018: initialization data exceeds declared size
...(242) : warning 213: tag mismatch
... : error 001: expected token: "}", but found ")"
... : error 010: invalid function or declaration
...(1930) : warning 215: expression has no effect
...(1930) : warning 215: expression has no effect
...(1930) : warning 215: expression has no effect
...(1930) : error 001: expected token: ";", but found ")"
...(1930) : error 029: invalid expression, assumed zero
...(1930) : warning 215: expression has no effect
...(1931) : error 021: symbol already defined: "rand"
...(1932) : warning 215: expression has no effect
...(1932) : error 001: expected token: ";", but found "["
...(1932) : error 029: invalid expression, assumed zero
...(1932) : warning 215: expression has no effect
...(1932) : error 001: expected token: ";", but found "]"
...(1932) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
Reply
#4

Vocк nгo arrumou isso ainda...

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
new Float:RandomSpawn[92][3] =
{
415,2062.4138,-1903.6830,13.3181,359.8134,40,1); //
Aн tem 6 valores e vocк sу declarou 3.
Alйm disso vocк estб misturando inteiros com decimais.
Reply
#5

Aguarde um pouco
Reply
#6

Tб como agora?
Reply
#7

Й suposto estar assim?= 2062.4138,-1903.6830,13.3181,359.8134
Reply
#8

Quote:
Originally Posted by blackscripter
Посмотреть сообщение
Й suposto estar assim?= 2062.4138,-1903.6830,13.3181,359.8134
Se tiver desse jeito, vocк tem que usar

pawn Код:
new Float:RandomSpawn[92][4] =
Reply
#9

Ja esta, e tenho 10 erros
pawn Код:
(238) : error 018: initialization data exceeds declared size
(242) : warning 213: tag mismatch
(242) : warning 213: tag mismatch
(242) : error 001: expected token: "}", but found ")"
(335) : error 010: invalid function or declaration
(1930) : warning 215: expression has no effect
(1930) : warning 215: expression has no effect
(1930) : warning 215: expression has no effect
(1930) : error 001: expected token: ";", but found ")"
(1930) : error 029: invalid expression, assumed zero
(1930) : warning 215: expression has no effect
(1931) : error 021: symbol already defined: "rand"
(1932) : warning 215: expression has no effect
(1932) : error 001: expected token: ";", but found "["
(1932) : error 029: invalid expression, assumed zero
(1932) : warning 215: expression has no effect
(1932) : error 001: expected token: ";", but found "]"
(1932) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)