PDA

View Full Version : Random


iulicxd
01/08/2015, 12:17 PM
new Float:RandomParkCars[][] =
{
356.8561,-1809.7686,4.6121,359.1091, // park1
353.4862,-1809.7162,4.6103,359.1091, // park2
350.2979,-1809.6667,4.6086,359.1091, // park3
347.0753,-1809.6167,4.6070,359.1091, // park4
343.7505,-1809.5648,4.6052,359.1091, // park5
340.5344,-1809.5148,4.6036,359.1091, // park6
337.2722,-1809.4640,4.6019,359.1091, // park7
334.2323,-1809.4166,4.6003,359.1091, // park8
330.8539,-1809.3608,4.5835,359.1148, // park9
327.6654,-1809.3114,4.5676,359.1148, // park10
324.4244,-1809.2610,4.5514,359.1148, // park11
321.2482,-1809.2115,4.5355,359.1148, // park12
318.0663,-1809.1619,4.5197,359.1148, // park13
314.9019,-1809.2312,4.5015,359.1148, // park14
311.5410,-1809.3922,4.4804,359.1148, // park15
311.7782,-1788.5498,4.6690,180.0998, // park16
315.0164,-1788.5444,4.7226,180.0998, // park17
318.0948,-1788.5393,4.7736,180.0998, // park18
321.2874,-1788.5341,4.8265,180.0998, // park19
324.6415,-1788.5286,4.8821,180.0998, // park20
327.9621,-1788.5228,4.9371,180.0998, // park21
331.0729,-1788.5177,4.9887,180.0998, // park22
334.2681,-1788.5125,5.0416,180.0998, // park23
337.4106,-1788.5073,5.0937,180.0998, // park24
1648.4381,-1136.8616,23.9987,0.6124, // park25
1652.9142,-1136.8137,23.9986,0.6124, // park26
1657.3401,-1136.7666,23.9985,0.6124, // park27
1661.9474,-1136.7177,23.9984,0.6124, // park28
1666.2585,-1136.6715,23.9984,0.6124, // park29
1676.5724,-1129.4301,23.9987,89.2766, // park30
1676.6295,-1124.9031,23.9986,89.2766, // park31
1676.6884,-1120.2716,23.9985,89.2766, // park32
1676.7463,-1115.6943,23.9985,89.2766, // park33
1676.8027,-1111.2108,23.9984,89.2766, // park34
1676.8558,-1106.9768,23.9983,89.2766, // park35
1676.9144,-1102.3378,23.9982,89.2766, // park36
1676.9722,-1097.7683,23.9982,89.2766, // park37
1687.8615,-1085.9097,23.9985,359.7547, // park38
1692.5303,-1085.9291,23.9984,359.7547, // park39
1696.9587,-1085.9480,23.9983,359.7547, // park40
1701.6815,-1085.9681,23.9983,359.7547, // park41
1705.8772,-1085.9861,23.9982,359.7547, // park42
1726.3325,-1085.4763,24.0163,359.5186, // park43
1731.1650,-1085.5172,24.0380,359.5186, // park44
1735.4161,-1085.5532,24.0571,359.5186, // park45
1740.1243,-1085.5928,24.0782,359.5186, // park46
1744.4771,-1085.6290,24.0978,359.5186, // park47
1749.0222,-1085.6671,24.1182,359.5186, // park48
1753.5308,-1085.7050,24.1385,359.5186, // park49
1758.3336,-1085.7452,24.1601,359.5186, // park50
1762.6202,-1085.7820,24.1793,359.5186, // park51
1767.2494,-1085.8208,24.2001,359.5186, // park52
1771.5785,-1085.8571,24.2196,359.5186, // park53
1776.1357,-1085.8955,24.2401,359.5186, // park54
1780.5540,-1085.9326,24.2599,359.5186, // park55
1785.4093,-1085.9733,24.2817,359.5186, // park56
1789.7406,-1086.0096,24.3012,359.5186, // park57
1794.1149,-1086.0465,24.3208,359.5186, // park58
1798.7306,-1086.0856,24.3416,359.5186, // park59
1803.0500,-1086.1221,24.3610,359.5186, // park60
1783.9984,-1025.5647,24.0533,153.6045, // park61
1779.7511,-1023.4568,24.0532,153.6045, // park62
1775.8641,-1021.5276,24.0531,153.6045, // park63
1771.7107,-1019.4664,24.0530,153.6045, // park64
1767.8287,-1017.5399,24.0530,153.6045, // park65
1761.8284,-1015.4996,24.0533,167.9357, // park66
1757.2499,-1014.5212,24.0532,167.9357, // park67
1752.9734,-1013.6073,24.0531,167.9357, // park68
1748.6882,-1012.6914,24.0531,167.9357, // park69
1744.2217,-1011.7367,24.0530,167.9357, // park70
1739.7407,-1010.7790,24.0530,167.9357, // park71
1735.3035,-1009.8307,24.0529,167.9357, // park72
1730.9861,-1008.9082,24.0528,167.9357, // park73
1726.3820,-1007.9243,24.0528,167.9357, // park74
1721.5494,-1006.8871,24.0055,172.6406, // park75
1716.9866,-1006.2979,23.9949,172.6406, // park76
1712.4945,-1005.7176,23.9844,172.6406, // park77
1708.0319,-1005.1411,23.9740,172.6406, // park78
1703.8660,-1004.6031,23.9643,172.6406, // park79
1695.6603,-1005.7783,23.9986,200.2351, // park80
1691.2166,-1007.4164,23.9986,200.2351, // park81
1687.0502,-1008.9523,23.9985,200.2351, // park82
1682.5999,-1009.5991,23.9908,197.2526, // park83
1678.3646,-1010.9144,23.9908,197.2526, // park84
1674.0238,-1012.2625,23.9907,197.2526, // park85
1664.9669,-1014.7950,23.9908,190.8952, // park86
1660.4030,-1015.6735,24.1648,190.8952, // park87
1656.4370,-1016.4368,24.1648,190.8952, // park88
1651.6453,-1017.3592,24.1647,190.8952, // park89
1645.3921,-1016.6746,23.9908,163.0584, // park90
1641.0688,-1015.3577,23.9908,163.0584, // park91
1636.7067,-1014.0291,23.9907,163.0584, // park92
1632.4211,-1012.7234,23.9906,163.0584, // park93
1627.9720,-1011.3682,23.9906,163.0584, // park94
1623.8574,-1010.1147,23.9905,163.0584, // park95
1617.9462,-1008.8248,23.9952,177.1260, // park96
1613.4318,-1008.5982,23.9951,177.1260, // park97
1608.7955,-1008.3655,23.9951,177.1260, // park98
1604.3217,-1008.5917,23.9937,177.1260, // park99
1598.9552,-1008.7178,23.9985,185.9445, // park100
1594.8104,-1009.1493,23.9985,185.9445, // park101
1590.3566,-1009.6129,23.9984,185.9445, // park102
1585.9293,-1010.0739,23.9983,185.9445, // park103
1581.2305,-1010.5633,23.9983,185.9445, // park104
1576.4872,-1010.7422,23.9987,179.4695, // park105
1571.9060,-1010.6998,23.9986,179.4695, // park106
1567.4064,-1010.6581,23.9985,179.4695, // park107
1562.7345,-1011.5652,23.9984,179.4695, // park108
1558.4181,-1011.5253,23.9983,179.4695, // park109
1542.1440,-1025.1470,23.9986,343.4695, // park110
1546.4221,-1026.4166,23.9985,343.4695, // park111
1550.7527,-1027.7018,23.9985,343.4695, // park112
1555.1854,-1029.0176,23.9984,343.4695, // park113
1559.5316,-1030.3077,23.9983,343.4695, // park114
1563.3702,-1031.4475,23.9983,343.4695, // park115
1569.7751,-1034.5537,24.0049,322.2187, // park116
1573.3501,-1037.3250,24.0153,322.2187, // park117
1576.6520,-1039.8842,24.0249,322.2187, // park118
1584.0363,-1047.5087,23.9986,308.6951, // park118
1586.7432,-1050.8882,23.9985,308.6951, // park119
1589.5420,-1054.3826,23.9985,308.6951, // park120
1592.3209,-1057.8521,23.9984,308.6951, // park121
1616.9712,-1119.2073,23.9986,270.5951, // park122
1617.0162,-1123.5582,23.9985,270.5951, // park123
1617.0634,-1128.1018,23.9985,270.5951, // park124
1617.1104,-1132.6082,23.9984,270.5951, // park125
1617.1595,-1137.3395,23.9983,270.5951, // park126
1657.7119,-1111.5237,24.0009,270.6454, // park127
1657.6624,-1107.1191,24.0111,270.6454, // park128
1657.6119,-1102.6210,24.0216,270.6454, // park129
1657.5635,-1098.3046,24.0316,270.6454, // park130
1657.5093,-1093.4883,24.0427,270.6454, // park131
1657.4604,-1089.1630,24.0527,270.6454, // park132
1657.4125,-1084.8682,24.2164,270.6454, // park133
1657.3652,-1080.6406,24.2262,270.6454, // park134
1649.4531,-1111.6384,24.0063,88.7564, // park135
1649.5481,-1107.2584,24.0062,88.7564, // park136
1649.6514,-1102.4985,24.0062,88.7564, // park137
1649.7495,-1097.9851,24.0061,88.7564, // park138
1649.8430,-1093.6769,24.0060,88.7564, // park139
1649.9427,-1089.0751,24.0060,88.7564, // park140
1650.0370,-1084.7346,24.0059,88.7564, // park141
1650.1360,-1080.1736,24.0058,88.7564, // park142
1630.0177,-1107.4740,23.9986,269.5855, // park143
1630.0487,-1103.1674,23.9987,269.5855, // park144
1630.0817,-1098.5785,23.9987,269.5855, // park145
1630.1132,-1094.2186,23.9988,269.5855, // park146
1630.1472,-1089.5024,23.9989,269.5855, // park147
1630.1792,-1085.0681,23.9989,269.5855, // park148
1620.9113,-1085.1218,23.9986,86.9917, // park149
1620.8484,-1089.8805,24.0023,89.4828, // park150
1620.8124,-1093.8494,24.0206,89.4828, // park151
1620.7705,-1098.4827,24.0420,89.4828, // park152
1620.7280,-1103.2024,24.0638,89.4828, // park153
1620.6893,-1107.5062,24.0837,89.4828, // park154
1627.2633,-1038.0592,23.9908,358.5771, // park155
1631.7607,-1038.1708,23.9908,358.5771, // park156
1636.5179,-1038.2889,23.9907,358.5771, // park157
1640.8267,-1038.3961,23.9906,358.5771, // park158
1645.3328,-1038.5079,23.9906,358.5771, // park159
1649.7827,-1038.6183,23.9905,358.5771, // park160
1654.1761,-1038.7275,23.9904,358.5771, // park161
1658.7166,-1038.8402,23.9904,358.5771, // park162
1658.8059,-1046.2382,23.9909,180.7092, // park163
1654.2231,-1046.2952,23.9908,180.7092, // park164
1649.7560,-1046.3503,23.9907,180.7092, // park165
1645.3633,-1046.4050,23.9906,180.7092, // park166
1640.7555,-1046.4619,23.9905,180.7092, // park167
1636.2484,-1046.5179,23.9905,180.7092, // park168
1631.7467,-1046.5734,23.9904,180.7092, // park169
1627.5099,-1046.6256,23.9903,180.7092, // park170
1680.9271,-1044.1394,23.9929,181.4235, // park171
1685.4640,-1044.0269,24.0034,181.4235, // park172
1689.6273,-1043.9236,24.0130,181.4235, // park173
1694.4386,-1043.8041,24.0242,181.4235, // park174
1698.8134,-1043.6952,24.0343,181.4235, // park175
1703.5642,-1043.5769,24.0454,181.4235, // park176
1707.7617,-1043.7000,24.0547,181.4235, // park177
1712.2766,-1043.5879,24.0652,181.4235, // park178
1712.1841,-1036.2773,24.0063,0.1714, // park179
1707.8236,-1036.2905,24.0064,0.1714, // park180
1703.2306,-1036.3044,24.0065,0.1714, // park181
1698.8022,-1036.3177,24.0065,0.1714, // park182
1694.5311,-1036.3308,24.2798,0.1714, // park183
1689.8470,-1036.3450,24.2799,0.1714, // park184
1685.3264,-1036.3586,24.2799,0.1714, // park185
1680.9401,-1036.3718,24.2800,0.1714, // park186
1691.2944,-1060.7463,24.0064,1.1253, // park187
1695.6384,-1060.6583,24.2322,1.1253, // park188
1700.6389,-1060.5601,24.2321,1.1253, // park189
1704.7206,-1060.4799,24.2320,1.1253, // park190
1709.3271,-1060.3893,24.2319,1.1253, // park191
1713.5895,-1060.3055,24.2319,1.1253, // park192


new Random = random(sizeof(RandomParkCars));
CarInfo[veh_index][Vposx] = RandomParkCars[Random][0];
CarInfo[veh_index][Vposy] = RandomParkCars[Random][1];
CarInfo[veh_index][Vposz] = RandomParkCars[Random][2];
CarInfo[veh_index][Vposa] = RandomParkCars[Random][3];


D:\SAMP Servers and Tools\Freedom (Engine Ultra)\Freedom (Engine Ultra)\gamemodes\gm.pwn(1394) : error 032: array index out of bounds (variable "RandomParkCars")
D:\SAMP Servers and Tools\Freedom (Engine Ultra)\Freedom (Engine Ultra)\gamemodes\gm.pwn(1395) : error 032: array index out of bounds (variable "RandomParkCars")
D:\SAMP Servers and Tools\Freedom (Engine Ultra)\Freedom (Engine Ultra)\gamemodes\gm.pwn(1396) : error 032: array index out of bounds (variable "RandomParkCars")

CodeStyle175
01/08/2015, 12:18 PM
new Float:RandomParkCars[][] -> new Float:RandomParkCars[][4]

iulicxd
01/08/2015, 12:20 PM
new Float:RandomParkCars[][] -> new Float:RandomParkCars[][4]

Thanks bro +1 rep :)