14.05.2014, 21:57
I am creating a vehicle thing. I need to check to see if the players vehicle that they are in is on an array. please help me
this is what i have so far.
array:
Check to see if its on there:
please help me
this is what i have so far.
array:
Code:
new RandomRegularVehicle[][3] = { // Positions, (model, low price, high price) {400, 20000, 21000}, {401, 18000, 19000}, {404, 18000, 19000}, {405, 19000, 20000}, {410, 16000, 17000}, {412, 21000, 22000}, {418, 14000, 15000}, {419, 15000, 16000}, {421, 17000, 18000}, {422, 22000, 23000}, {426, 20000, 21000}, {436, 16000, 17000}, {439, 21000, 22000}, {445, 19000, 20000}, {458, 21000, 22000}, {466, 23000, 24000}, {467, 23000, 24000}, {474, 25000, 26000}, {475, 21000, 22000}, {479, 19000, 20000}, {489, 23000, 24000}, {491, 17000, 18000}, {492, 18000, 19000}, {500, 24000, 26000}, {505, 22000, 24000}, {507, 18000, 21000}, {516, 19000, 22000}, {517, 16000, 20000}, {518, 17000, 21000}, {526, 20000, 24000}, {527, 20000, 24000}, {529, 18000, 22000}, {533, 24000, 27000}, {534, 19000, 23000}, {535, 25000, 32000}, {536, 24000, 31000}, {540, 19000, 22000}, {542, 16000, 21000}, {543, 20000, 24000}, {545, 24000, 30000}, {546, 19000, 22000}, {547, 19000, 22000}, {549, 17000, 22000}, {550, 23000, 26000}, {551, 21000, 26000}, {554, 25000, 34000}, {558, 24000, 26000}, {560, 28000, 37000}, {561, 23000, 35000}, {562, 27000, 35000}, {565, 32000, 37000}, {566, 19000, 24000}, {567, 24000, 32000}, {575, 22000, 26000}, {576, 21000, 24000}, {579, 26000, 33000}, {580, 21000, 24000}, {585, 21000, 26000}, {587, 32000, 43000}, {589, 27000, 35000}, {600, 23000, 31000}, {602, 32000, 42000} };
Code:
if(CarInfo[idx][cModel] != RandomRegularVehicle[][0]) return SendClientMessage(playerid, COLOR_RED, "You cannot sell this type of vehicle here");